Commit 65806d54 by hweeeeeei

修复推送空指针问题

parent ec9a1154
......@@ -121,16 +121,16 @@ public class ImConversationServiceImpl extends BaseServiceImpl<ImConversationMap
// 根据appKey查询application
ImApplication imApplication = imApplicationService.getOneByAppKey(curentJwtToken.getAppKey());
// 该应用 是否允许创建重复会话 0不允许 1允许
// 该应用 是否允许创建重复一对一会话 0不允许 1允许
if (imApplication.getRepeatSessionStatus() != null && imApplication.getRepeatSessionStatus() == 0) {
// 判断是否已经存在会话
// 判断是否已经存在一对一会话
// size() == 1 为单聊不允许重复创建 两个用户如果已经创建过会话,不能重复创建会话
if (imConversationCreate.getClientIds().size() == 1) {
ImClient client2 = imClientService.getOne(new QueryWrapper<ImClient>().lambda()
.eq(ImClient::getFkAppid, createClient.getFkAppid())
.eq(ImClient::getClientId, imConversationCreate.getClientIds().get(0)));
// 是否存在重复会话
// 是否存在重复一对一会话
Integer repetitionConversation = getRepetitionConversation(createClient.getId(), client2.getId());
if (repetitionConversation != 0) {
......@@ -145,7 +145,7 @@ public class ImConversationServiceImpl extends BaseServiceImpl<ImConversationMap
}
} else {
//创建重复会话时对比扩展字段 1是
//创建重复一对一会话时对比扩展字段 1是
if (imApplication.getContrastExtendedFieldStatus() == 1) {
// 被邀请client
......
......@@ -119,6 +119,11 @@ public class PushTask {
}
private void android(PushModel pushModel, ImClient imClientReceiver, ImApplication imApplication) {
if (imApplication.getAndroidPushChannel() == null) {
return;
}
// 安卓推送通道,友盟:1;firebase:2; 信鸽3
if (imApplication.getAndroidPushChannel() == 1) {
log.info("友盟");
......@@ -152,6 +157,11 @@ public class PushTask {
}
private void ios(PushModel pushModel, ImClient imClientReceiver, ImApplication imApplication) {
if (imApplication.getIosPushChannel() == null) {
return;
}
// ios推送通道,友盟:1;firebase:2; apns原生:3
if (imApplication.getIosPushChannel() == 1) {
log.info("友盟");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment