[IMPROVEMENT] Show toast when a message is starred/unstarred (#1616)

Co-authored-by: Diego Mello <diegolmello@gmail.com>
This commit is contained in:
devyaniChoubey 2020-03-17 22:05:37 +05:30 committed by GitHub
parent 779cacbe3e
commit 589e2e2666
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -294,6 +294,7 @@ class MessageActions extends React.Component {
const { message } = this.props;
try {
await RocketChat.toggleStarMessage(message.id, message.starred);
EventEmitter.emit(LISTENER, { message: message.starred ? I18n.t('Message_unstarred') : I18n.t('Message_starred') });
} catch (e) {
log(e);
}

View File

@ -264,6 +264,8 @@ export default {
Message_actions: 'Message actions',
Message_pinned: 'Message pinned',
Message_removed: 'Message removed',
Message_starred: 'Message starred',
Message_unstarred: 'Message unstarred',
message: 'message',
messages: 'messages',
Message: 'Message',