fix(ui): handle MessageInput enrichUrl exceptions.
Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
@@ -1104,8 +1104,12 @@ class StreamMessageInputState extends State<StreamMessageInput>
|
|||||||
var response = _ogAttachmentCache[url];
|
var response = _ogAttachmentCache[url];
|
||||||
if (response == null) {
|
if (response == null) {
|
||||||
final client = StreamChat.of(context).client;
|
final client = StreamChat.of(context).client;
|
||||||
response = await client.enrichUrl(url);
|
try {
|
||||||
_ogAttachmentCache[url] = response;
|
response = await client.enrichUrl(url);
|
||||||
|
_ogAttachmentCache[url] = response;
|
||||||
|
} catch (e, stk) {
|
||||||
|
return Future.error(e, stk);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user