diff --git a/app/src/main/java/com/shayu/phonelive/AppContext.java b/app/src/main/java/com/shayu/phonelive/AppContext.java index d22f81d..a5b3e39 100644 --- a/app/src/main/java/com/shayu/phonelive/AppContext.java +++ b/app/src/main/java/com/shayu/phonelive/AppContext.java @@ -26,6 +26,7 @@ import com.blankj.utilcode.util.Utils; import com.facebook.appevents.AppEventsLogger; import com.fm.openinstall.OpenInstall; import com.google.gson.Gson; +import com.pandoralive.shayu.R; import com.shayu.phonelive.utils.LogUtils; import com.tencent.imsdk.v2.V2TIMGroupMemberInfo; import com.tencent.imsdk.v2.V2TIMManager; @@ -56,6 +57,7 @@ import com.yunbao.common.utils.L; import com.yunbao.common.utils.MessageChatNotifyManager; import com.yunbao.common.utils.MessageSayHiNotifyManager; import com.yunbao.common.utils.SpUtil; +import com.yunbao.common.utils.WordUtil; import com.yunbao.live.activity.LiveActivity; import com.yunbao.live.activity.SudGameActivity; import com.yunbao.live.socket.SocketReceiveBean; @@ -273,7 +275,14 @@ public class AppContext extends CommonAppContext { msg.what = Constants.SOCKET_WHAT_BROADCAST; try { if (!"".equals(message.getContent()) && message.getContent() != null) { - TextMessage content = (TextMessage) message.getContent(); + TextMessage content; + if (message.getContent() instanceof MessageChatCardContent) { + content = new TextMessage(WordUtil.getNewString(R.string.activity_msg_chat_list_card)); + } else if (message.getContent() instanceof TextMessage) { + content = (TextMessage) message.getContent(); + }else{ + return false; + } if (content.getContent().contains("_method_")) { msg.obj = content.getContent(); //观众页面