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
a9febe8d
Commit
a9febe8d
authored
9 years ago
by
Marcelo Schmidt
Browse files
Options
Downloads
Patches
Plain Diff
Fix #1709 hide mentions for edited messages when keep history is enabled
parent
ac4fa327
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
packages/rocketchat-lib/server/models/Messages.coffee
+2
-1
2 additions, 1 deletion
packages/rocketchat-lib/server/models/Messages.coffee
packages/rocketchat-mentions-flextab/server/publications/mentionedMessages.coffee
+1
-1
1 addition, 1 deletion
...ions-flextab/server/publications/mentionedMessages.coffee
with
3 additions
and
2 deletions
packages/rocketchat-lib/server/models/Messages.coffee
+
2
−
1
View file @
a9febe8d
...
@@ -24,8 +24,9 @@ RocketChat.models.Messages = new class extends RocketChat.models._Base
...
@@ -24,8 +24,9 @@ RocketChat.models.Messages = new class extends RocketChat.models._Base
return
@
find
query
,
options
return
@
find
query
,
options
findByMentionAndRoomId
:
(
username
,
rid
,
options
)
->
find
Visible
ByMentionAndRoomId
:
(
username
,
rid
,
options
)
->
query
=
query
=
_hidden
:
{
$ne
:
true
}
"mentions.username"
:
username
"mentions.username"
:
username
"rid"
:
rid
"rid"
:
rid
...
...
This diff is collapsed.
Click to expand it.
packages/rocketchat-mentions-flextab/server/publications/mentionedMessages.coffee
+
1
−
1
View file @
a9febe8d
...
@@ -8,7 +8,7 @@ Meteor.publish 'mentionedMessages', (rid, limit=50) ->
...
@@ -8,7 +8,7 @@ Meteor.publish 'mentionedMessages', (rid, limit=50) ->
unless
user
unless
user
return
this
.
ready
()
return
this
.
ready
()
cursorHandle
=
RocketChat
.
models
.
Messages
.
findByMentionAndRoomId
(
user
.
username
,
rid
,
{
sort
:
{
ts
:
-
1
},
limit
:
limit
}).
observeChanges
cursorHandle
=
RocketChat
.
models
.
Messages
.
find
Visible
ByMentionAndRoomId
(
user
.
username
,
rid
,
{
sort
:
{
ts
:
-
1
},
limit
:
limit
}).
observeChanges
added
:
(
_id
,
record
)
->
added
:
(
_id
,
record
)
->
record
.
mentionedList
=
true
record
.
mentionedList
=
true
publication
.
added
(
'rocketchat_mentioned_message'
,
_id
,
record
)
publication
.
added
(
'rocketchat_mentioned_message'
,
_id
,
record
)
...
...
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