update cdn handling
This commit is contained in:
@@ -1275,11 +1275,16 @@ class ChannelClientState {
|
||||
m.attachments?.isNotEmpty == true &&
|
||||
m.attachments?.any((e) {
|
||||
final url = e.imageUrl ?? e.assetUrl;
|
||||
if (url == null || !url.contains('stream-io-cdn.com')) {
|
||||
if (url == null || !url.contains('')) {
|
||||
return false;
|
||||
}
|
||||
final uri = Uri.parse(url);
|
||||
if (uri.host != 'stream-io-cdn.com' ||
|
||||
uri.queryParameters['Expires'] == null) {
|
||||
return false;
|
||||
}
|
||||
final expiration =
|
||||
DateTime.parse(Uri.parse(url).queryParameters['Expires']);
|
||||
DateTime.parse(uri.queryParameters['Expires']);
|
||||
return expiration.isBefore(DateTime.now());
|
||||
}) ==
|
||||
true)
|
||||
|
||||
@@ -21,7 +21,7 @@ dependencies:
|
||||
rxdart: ^0.25.0
|
||||
scrollable_positioned_list: ^0.1.8
|
||||
jiffy: ^3.0.1
|
||||
flutter_svg: ^0.19.1
|
||||
flutter_svg: ^0.19.3
|
||||
flutter_portal: ^0.3.0
|
||||
cached_network_image: ^2.5.0
|
||||
shimmer: ^1.1.2
|
||||
|
||||
Reference in New Issue
Block a user