diff --git a/lib/chat/ChatPage.dart b/lib/chat/ChatPage.dart index 1a33fd9..0da9f09 100644 --- a/lib/chat/ChatPage.dart +++ b/lib/chat/ChatPage.dart @@ -216,7 +216,7 @@ class _ChatPageState extends State { MsgModel msg = MsgHandler.createSendMsg( ChatType.valueOf(originMsg.msgType), originMsg.msgContent); msg.extraInfo = originMsg.extraInfo; - if(originMsg.extraFile.contains('http')){ + if(originMsg.extraFile==null ||originMsg.extraFile.contains('http')){ msg.extraFile = originMsg.extraFile; }else{ msg.extraFile = UploadUtil().getFullUrl(originMsg.extraFile, originMsg.sessionId, originMsg.channelType); diff --git a/lib/chat/group_chat_view.dart b/lib/chat/group_chat_view.dart index 631d9c7..ef5d1cc 100644 --- a/lib/chat/group_chat_view.dart +++ b/lib/chat/group_chat_view.dart @@ -113,7 +113,7 @@ class _GroupChatPageState extends State { channelType: ChatChannelType.Group); msg.extraInfo = originMsg.extraInfo; // msg.extraFile = originMsg.extraFile; - if(originMsg.extraFile.contains('http')){ + if(originMsg.extraFile==null ||originMsg.extraFile.contains('http')){ msg.extraFile = originMsg.extraFile; }else{ msg.extraFile = UploadUtil().getFullUrl(originMsg.extraFile, originMsg.sessionId, originMsg.channelType);