修复 [在直播间中,只有普通消息才能收到推送弹窗]

This commit is contained in:
zlzw 2024-04-03 15:06:00 +08:00
parent 44fc3c651a
commit b285512914

View File

@ -26,6 +26,7 @@ import com.blankj.utilcode.util.Utils;
import com.facebook.appevents.AppEventsLogger; import com.facebook.appevents.AppEventsLogger;
import com.fm.openinstall.OpenInstall; import com.fm.openinstall.OpenInstall;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.pandoralive.shayu.R;
import com.shayu.phonelive.utils.LogUtils; import com.shayu.phonelive.utils.LogUtils;
import com.tencent.imsdk.v2.V2TIMGroupMemberInfo; import com.tencent.imsdk.v2.V2TIMGroupMemberInfo;
import com.tencent.imsdk.v2.V2TIMManager; 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.MessageChatNotifyManager;
import com.yunbao.common.utils.MessageSayHiNotifyManager; import com.yunbao.common.utils.MessageSayHiNotifyManager;
import com.yunbao.common.utils.SpUtil; import com.yunbao.common.utils.SpUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.live.activity.LiveActivity; import com.yunbao.live.activity.LiveActivity;
import com.yunbao.live.activity.SudGameActivity; import com.yunbao.live.activity.SudGameActivity;
import com.yunbao.live.socket.SocketReceiveBean; import com.yunbao.live.socket.SocketReceiveBean;
@ -273,7 +275,14 @@ public class AppContext extends CommonAppContext {
msg.what = Constants.SOCKET_WHAT_BROADCAST; msg.what = Constants.SOCKET_WHAT_BROADCAST;
try { try {
if (!"".equals(message.getContent()) && message.getContent() != null) { 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_")) { if (content.getContent().contains("_method_")) {
msg.obj = content.getContent(); msg.obj = content.getContent();
//观众页面 //观众页面