Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
foreign
/
customer-service
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
fea0bdc8
authored
Oct 09, 2021
by
Sixong.Zhu
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
event
parent
add19259
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
8 deletions
store/index.ts
store/index.ts
View file @
fea0bdc8
...
...
@@ -42,7 +42,7 @@ function filterMessages(
);
}
cons
t
removeRegisterChatEvents
:
(()
=>
void
)[]
=
[];
le
t
removeRegisterChatEvents
:
(()
=>
void
)[]
=
[];
async
function
preCacheImgs
(
msgs
:
any
[])
{
await
Promise
.
all
(
...
...
@@ -541,18 +541,12 @@ export default {
}
state
[
ChatStore
.
STATE_FUNC_ON_NEW_MSG
](
e
);
};
if
(
chatId
==
null
)
{
if
(
!
chatId
)
{
xim
.
off
(
"msg"
,
onNewMsg
);
xim
.
on
(
"msg"
,
onNewMsg
);
return
;
}
const
onMsgRead
:
ChatNotifyListener
=
async
(
e
)
=>
{
if
(
process
.
env
.
VUE_APP_API_CLIENT_ID
!==
"teamix-fast-service-merchant"
)
{
return
;
}
if
(
chatId
!==
e
.
chat_id
)
return
;
const
msgs
=
state
[
ChatStore
.
STATE_CHAT_MSG_HISTORY
];
if
(
msgs
==
null
)
return
;
...
...
@@ -655,6 +649,7 @@ export default {
commit
(
ChatStore
.
MUTATION_INITING_CHAT
);
removeRegisterChatEvents
.
forEach
((
k
)
=>
k
());
removeRegisterChatEvents
=
[];
await
dispatch
(
ChatStore
.
ACTION_GET_CHAT_MEMBERS
);
await
Promise
.
all
([
dispatch
(
ChatStore
.
ACTION_REGISTER_EVENT
),
...
...
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