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
db267106
Unverified
Commit
db267106
authored
7 years ago
by
Diego Sampaio
Browse files
Options
Downloads
Patches
Plain Diff
Change categories to constants
parent
8f975bcb
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
.meteor/versions
+1
-1
1 addition, 1 deletion
.meteor/versions
packages/rocketchat-lib/server/lib/sendNotificationsOnMessage.js
+5
-2
5 additions, 2 deletions
...s/rocketchat-lib/server/lib/sendNotificationsOnMessage.js
with
6 additions
and
3 deletions
.meteor/versions
+
1
−
1
View file @
db267106
...
...
@@ -115,7 +115,7 @@ promise@0.10.0
raix:eventemitter@0.1.3
raix:eventstate@0.0.4
raix:handlebar-helpers@0.2.5
raix:push@3.
0.3-rc.7
raix:push@3.
2.0
raix:ui-dropped-event@0.0.7
random@1.0.10
rate-limit@1.0.8
...
...
This diff is collapsed.
Click to expand it.
packages/rocketchat-lib/server/lib/sendNotificationsOnMessage.js
+
5
−
2
View file @
db267106
...
...
@@ -3,6 +3,9 @@ import _ from 'underscore';
import
s
from
'
underscore.string
'
;
import
moment
from
'
moment
'
;
const
CATEGORY_MESSAGE
=
'
MESSAGE
'
;
const
CATEGORY_MESSAGE_NOREPLY
=
'
MESSAGE_NOREPLY
'
;
/**
* Replaces @username with full name
*
...
...
@@ -141,7 +144,7 @@ const sendPushNotifications = (userIdsToPushNotify = [], message, room, push_roo
usersTo
:
{
userId
:
userIdToNotify
},
category
:
canSendMessageToRoom
(
room
,
pushUsernames
[
userIdToNotify
])
?
'
MESSAGE
'
:
'
MESSAGE_NOREPLY
'
category
:
canSendMessageToRoom
(
room
,
pushUsernames
[
userIdToNotify
])
?
CATEGORY_
MESSAGE
:
CATEGORY_
MESSAGE_NOREPLY
});
});
}
...
...
@@ -301,7 +304,7 @@ RocketChat.callbacks.add('afterSaveMessage', function(message, room, userId) {
usersTo
:
{
userId
:
userOfMention
.
_id
},
category
:
canSendMessageToRoom
(
room
,
userOfMention
.
username
)
?
'
MESSAGE
'
:
'
MESSAGE_NOREPLY
'
category
:
canSendMessageToRoom
(
room
,
userOfMention
.
username
)
?
CATEGORY_
MESSAGE
:
CATEGORY_
MESSAGE_NOREPLY
});
return
message
;
}
...
...
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