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
9f9ac8ce
Commit
9f9ac8ce
authored
May 20, 2022
by
罗长华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整临时会话没有消息发出时,双方都不显示
parent
ef1b0a11
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
7 deletions
+9
-7
core/src/main/java/com/wecloud/im/action/NormalChatAction.java
+5
-4
core/src/main/java/com/wecloud/im/service/impl/ImConversationServiceImpl.java
+4
-3
No files found.
core/src/main/java/com/wecloud/im/action/NormalChatAction.java
View file @
9f9ac8ce
...
@@ -181,12 +181,13 @@ public class NormalChatAction {
...
@@ -181,12 +181,13 @@ public class NormalChatAction {
saveImInbox
(
imApplication
,
conversation
,
imMessageOnlineSend
.
getMsgId
(),
saveImInbox
(
imApplication
,
conversation
,
imMessageOnlineSend
.
getMsgId
(),
conversationMembers
,
SnowflakeUtil
.
getId
());
conversationMembers
,
SnowflakeUtil
.
getId
());
// 入库成功后 判断是否是临时会话 如果是,
检查接受方的
会话display状态是否是1(显示),如果不是,需要修改为是
// 入库成功后 判断是否是临时会话 如果是,
双方
会话display状态是否是1(显示),如果不是,需要修改为是
if
(
ChatTypeEnum
.
TEMP
.
getCode
().
equals
(
conversation
.
getChatType
()))
{
if
(
ChatTypeEnum
.
TEMP
.
getCode
().
equals
(
conversation
.
getChatType
()))
{
if
(
conversationMembers
.
getDisplayStatus
().
equals
(
0L
))
{
// 木有只有私聊一种临时会话类型
conversationMembers
.
setDisplayStatus
(
1L
);
for
(
ImConversationMembers
members
:
membersList
)
{
imConversationMembersService
.
updateById
(
conversationMembers
);
members
.
setDisplayStatus
(
1L
);
}
}
imConversationMembersService
.
updateBatchById
(
membersList
);
}
}
// 在线用户直接发消息
// 在线用户直接发消息
...
...
core/src/main/java/com/wecloud/im/service/impl/ImConversationServiceImpl.java
View file @
9f9ac8ce
...
@@ -1284,10 +1284,11 @@ public class ImConversationServiceImpl extends BaseServiceImpl<ImConversationMap
...
@@ -1284,10 +1284,11 @@ public class ImConversationServiceImpl extends BaseServiceImpl<ImConversationMap
List
<
ImConversationMembers
>
conversationMemberList
=
buildPrivateChatMembers
(
conversation
,
creator
,
List
<
ImConversationMembers
>
conversationMemberList
=
buildPrivateChatMembers
(
conversation
,
creator
,
memberClient
);
memberClient
);
if
(
isStranger
)
{
if
(
isStranger
)
{
// 如果是陌生人,刚创建会话的时候
,只有创建者可见会话 会话类型设置为临时会话
// 如果是陌生人,刚创建会话的时候
会话类型设置为临时会话 双方都不可见
conversation
.
setChatType
(
ChatTypeEnum
.
TEMP
.
getCode
());
conversation
.
setChatType
(
ChatTypeEnum
.
TEMP
.
getCode
());
ImConversationMembers
strangerConversationMember
=
conversationMemberList
.
get
(
1
);
for
(
ImConversationMembers
members
:
conversationMemberList
)
{
strangerConversationMember
.
setDisplayStatus
(
0L
);
members
.
setDisplayStatus
(
0L
);
}
}
}
this
.
save
(
conversation
);
this
.
save
(
conversation
);
this
.
imConversationMembersService
.
saveBatch
(
conversationMemberList
);
this
.
imConversationMembersService
.
saveBatch
(
conversationMemberList
);
...
...
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