Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wecloud_im_server
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hewei
wecloud_im_server
Commits
65806d54
Commit
65806d54
authored
Dec 13, 2021
by
hweeeeeei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复推送空指针问题
parent
ec9a1154
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
common/src/main/java/com/wecloud/im/service/impl/ImConversationServiceImpl.java
+4
-4
common/src/main/java/com/wecloud/im/ws/sender/PushTask.java
+10
-0
No files found.
common/src/main/java/com/wecloud/im/service/impl/ImConversationServiceImpl.java
View file @
65806d54
...
@@ -121,16 +121,16 @@ public class ImConversationServiceImpl extends BaseServiceImpl<ImConversationMap
...
@@ -121,16 +121,16 @@ public class ImConversationServiceImpl extends BaseServiceImpl<ImConversationMap
// 根据appKey查询application
// 根据appKey查询application
ImApplication
imApplication
=
imApplicationService
.
getOneByAppKey
(
curentJwtToken
.
getAppKey
());
ImApplication
imApplication
=
imApplicationService
.
getOneByAppKey
(
curentJwtToken
.
getAppKey
());
// 该应用 是否允许创建重复会话 0不允许 1允许
// 该应用 是否允许创建重复
一对一
会话 0不允许 1允许
if
(
imApplication
.
getRepeatSessionStatus
()
!=
null
&&
imApplication
.
getRepeatSessionStatus
()
==
0
)
{
if
(
imApplication
.
getRepeatSessionStatus
()
!=
null
&&
imApplication
.
getRepeatSessionStatus
()
==
0
)
{
// 判断是否已经存在会话
// 判断是否已经存在
一对一
会话
// size() == 1 为单聊不允许重复创建 两个用户如果已经创建过会话,不能重复创建会话
// size() == 1 为单聊不允许重复创建 两个用户如果已经创建过会话,不能重复创建会话
if
(
imConversationCreate
.
getClientIds
().
size
()
==
1
)
{
if
(
imConversationCreate
.
getClientIds
().
size
()
==
1
)
{
ImClient
client2
=
imClientService
.
getOne
(
new
QueryWrapper
<
ImClient
>().
lambda
()
ImClient
client2
=
imClientService
.
getOne
(
new
QueryWrapper
<
ImClient
>().
lambda
()
.
eq
(
ImClient:
:
getFkAppid
,
createClient
.
getFkAppid
())
.
eq
(
ImClient:
:
getFkAppid
,
createClient
.
getFkAppid
())
.
eq
(
ImClient:
:
getClientId
,
imConversationCreate
.
getClientIds
().
get
(
0
)));
.
eq
(
ImClient:
:
getClientId
,
imConversationCreate
.
getClientIds
().
get
(
0
)));
// 是否存在重复会话
// 是否存在重复
一对一
会话
Integer
repetitionConversation
=
getRepetitionConversation
(
createClient
.
getId
(),
client2
.
getId
());
Integer
repetitionConversation
=
getRepetitionConversation
(
createClient
.
getId
(),
client2
.
getId
());
if
(
repetitionConversation
!=
0
)
{
if
(
repetitionConversation
!=
0
)
{
...
@@ -145,7 +145,7 @@ public class ImConversationServiceImpl extends BaseServiceImpl<ImConversationMap
...
@@ -145,7 +145,7 @@ public class ImConversationServiceImpl extends BaseServiceImpl<ImConversationMap
}
}
}
else
{
}
else
{
//创建重复会话时对比扩展字段 1是
//创建重复
一对一
会话时对比扩展字段 1是
if
(
imApplication
.
getContrastExtendedFieldStatus
()
==
1
)
{
if
(
imApplication
.
getContrastExtendedFieldStatus
()
==
1
)
{
// 被邀请client
// 被邀请client
...
...
common/src/main/java/com/wecloud/im/ws/sender/PushTask.java
View file @
65806d54
...
@@ -119,6 +119,11 @@ public class PushTask {
...
@@ -119,6 +119,11 @@ public class PushTask {
}
}
private
void
android
(
PushModel
pushModel
,
ImClient
imClientReceiver
,
ImApplication
imApplication
)
{
private
void
android
(
PushModel
pushModel
,
ImClient
imClientReceiver
,
ImApplication
imApplication
)
{
if
(
imApplication
.
getAndroidPushChannel
()
==
null
)
{
return
;
}
// 安卓推送通道,友盟:1;firebase:2; 信鸽3
// 安卓推送通道,友盟:1;firebase:2; 信鸽3
if
(
imApplication
.
getAndroidPushChannel
()
==
1
)
{
if
(
imApplication
.
getAndroidPushChannel
()
==
1
)
{
log
.
info
(
"友盟"
);
log
.
info
(
"友盟"
);
...
@@ -152,6 +157,11 @@ public class PushTask {
...
@@ -152,6 +157,11 @@ public class PushTask {
}
}
private
void
ios
(
PushModel
pushModel
,
ImClient
imClientReceiver
,
ImApplication
imApplication
)
{
private
void
ios
(
PushModel
pushModel
,
ImClient
imClientReceiver
,
ImApplication
imApplication
)
{
if
(
imApplication
.
getIosPushChannel
()
==
null
)
{
return
;
}
// ios推送通道,友盟:1;firebase:2; apns原生:3
// ios推送通道,友盟:1;firebase:2; apns原生:3
if
(
imApplication
.
getIosPushChannel
()
==
1
)
{
if
(
imApplication
.
getIosPushChannel
()
==
1
)
{
log
.
info
(
"友盟"
);
log
.
info
(
"友盟"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment