-
Notifications
You must be signed in to change notification settings - Fork 10.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NEW] Show emojis and file uploads on notifications #7559
Conversation
I would love to see this on push notifications as well |
@@ -32,6 +32,9 @@ function replaceMentionedUsernamesWithFullNames(message, mentions) { | |||
*/ | |||
function notifyUser(userId, user, message, room, duration) { | |||
const UI_Use_Real_Name = RocketChat.settings.get('UI_Use_Real_Name') === true; | |||
if (!message.msg && message.attachments[0]) { | |||
message.msg = message.attachments[0].image_type ? TAPi18n.__('User_uploaded_image') : TAPi18n.__('User_uploaded_file'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not using user's language
@@ -159,7 +162,11 @@ RocketChat.callbacks.add('afterSaveMessage', function(message, room) { | |||
let push_message; | |||
//Set variables depending on Push Notification settings | |||
if (RocketChat.settings.get('Push_show_message')) { | |||
push_message = message.msg; | |||
if (message.msg === '' && message.attachments[0]) { | |||
push_message = message.attachments[0].image_type ? TAPi18n.__('User_uploaded_image') : TAPi18n.__('User_uploaded_file'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not using user's language
…to add-file-upload-notification
@@ -13,9 +13,10 @@ Package.onUse(function(api) { | |||
'rocketchat:lib' | |||
]); | |||
|
|||
api.addFiles('emojiPicker.js', 'client'); | |||
api.addFiles('emojiPicker.js', ['client', 'server']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use api.addFiles('emojiPicker.js');
instead of api.addFiles('emojiPicker.js', ['client', 'server']);
|
||
api.addFiles('sprites.css', 'client'); | ||
api.addFiles('callBacks.js', 'server'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
callbacks
Add text to file messages notifications
@RocketChat/core