Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Rocket.Chat
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RocketChat
Rocket.Chat
Commits
67355659
Unverified
Commit
67355659
authored
2 years ago
by
Kevin Aleman
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[FIX] Omnichannel inquiries being updated even if not needed (#26692)
parent
df8b9dc0
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
apps/meteor/server/models/raw/LivechatInquiry.ts
+4
-1
4 additions, 1 deletion
apps/meteor/server/models/raw/LivechatInquiry.ts
apps/meteor/server/modules/listeners/listeners.module.ts
+11
-0
11 additions, 0 deletions
apps/meteor/server/modules/listeners/listeners.module.ts
with
15 additions
and
1 deletion
apps/meteor/server/models/raw/LivechatInquiry.ts
+
4
−
1
View file @
67355659
...
...
@@ -87,6 +87,9 @@ export class LivechatInquiryRaw extends BaseRaw<ILivechatInquiryRecord> implemen
}
async
unlockAll
():
Promise
<
UpdateResult
|
Document
>
{
return
this
.
updateMany
({},
{
$unset
:
{
locked
:
1
,
lockedAt
:
1
}
});
return
this
.
updateMany
(
{
$or
:
[{
lockedAt
:
{
$exists
:
true
}
},
{
locked
:
{
$exists
:
true
}
}]
},
{
$unset
:
{
locked
:
1
,
lockedAt
:
1
}
},
);
}
}
This diff is collapsed.
Click to expand it.
apps/meteor/server/modules/listeners/listeners.module.ts
+
11
−
0
View file @
67355659
...
...
@@ -169,6 +169,17 @@ export class ListenersModule {
});
}
// Don't do notifications for updating inquiries when the only thing changing is the queue metadata
if
(
clientAction
===
'
updated
'
&&
diff
?.
hasOwnProperty
(
'
lockedAt
'
)
&&
diff
?.
hasOwnProperty
(
'
locked
'
)
&&
diff
?.
hasOwnProperty
(
'
_updatedAt
'
)
&&
Object
.
keys
(
diff
).
length
===
3
)
{
return
;
}
notifications
.
streamLivechatQueueData
.
emitWithoutBroadcast
(
inquiry
.
_id
,
{
...
inquiry
,
clientAction
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment