Skip to content
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

Merged
merged 12 commits into from
Jul 26, 2017

Conversation

MartinSchoeler
Copy link
Contributor

Add text to file messages notifications

@RocketChat/core

screen shot 2017-07-24 at 2 15 12 pm

@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-7559 July 24, 2017 17:40 Inactive
@sampaiodiego
Copy link
Member

I would love to see this on push notifications as well

@MartinSchoeler MartinSchoeler temporarily deployed to rocket-chat-pr-7559 July 25, 2017 13:09 Inactive
@MartinSchoeler
Copy link
Contributor Author

Update: Added Push notification support
screenshot_20170725-100038

@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-7559 July 25, 2017 15:47 Inactive
@@ -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');
Copy link
Member

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');
Copy link
Member

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

@MartinSchoeler MartinSchoeler temporarily deployed to rocket-chat-pr-7559 July 25, 2017 16:59 Inactive
@MartinSchoeler MartinSchoeler temporarily deployed to rocket-chat-pr-7559 July 25, 2017 17:26 Inactive
@MartinSchoeler MartinSchoeler temporarily deployed to rocket-chat-pr-7559 July 26, 2017 19:42 Inactive
@MartinSchoeler
Copy link
Contributor Author

Added Support for emojis in notifications and pushes.
screen shot 2017-07-26 at 4 45 26 pm

It renders the unicode emojis in the notification, so it should be compatible with most browsers.
Changing the title since it does more than add file uploads.

@MartinSchoeler MartinSchoeler changed the title [NEW] Add file upload to notifications [NEW] Improve notifications Jul 26, 2017
@@ -13,9 +13,10 @@ Package.onUse(function(api) {
'rocketchat:lib'
]);

api.addFiles('emojiPicker.js', 'client');
api.addFiles('emojiPicker.js', ['client', 'server']);
Copy link
Member

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');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

callbacks

@RocketChat RocketChat deleted a comment Jul 26, 2017
@rodrigok rodrigok changed the title [NEW] Improve notifications [NEW] Show emojis and file uploads on notifications Jul 26, 2017
@rodrigok rodrigok merged commit d3c2b75 into develop Jul 26, 2017
@rodrigok rodrigok deleted the add-file-upload-notification branch July 26, 2017 23:04
@rodrigok rodrigok added this to the 0.58.0 milestone Jul 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants