Skip to content
Snippets Groups Projects

bugfix: allow users to reply to their own messages

Merged Emmanuel Vodor requested to merge 262_reply_to_message into beta
1 file
+ 2
7
Compare changes
  • Side-by-side
  • Inline
@@ -13,12 +13,6 @@ converse.plugins.add('sib-reply-to-message', {
}
api.listen.on('getMessageActionButtons', (el, buttons) => {
// Do not add if the message is from the current user
if (el.model.get('sender') === 'me') {
return buttons;
}
buttons.push({
'i18n_text': __('Reply'),
'handler': ev => {
@@ -32,8 +26,9 @@ converse.plugins.add('sib-reply-to-message', {
}
// Add mention to the initial author for MUCs
// Do not add the mention if you were the author of the original message
const nickname = el.model.get('nick');
if (el.model.get('type') === 'groupchat' && nickname.length) {
if (el.model.get('type') === 'groupchat' && el.model.get('sender') !== 'me' && nickname.length) {
chat_textarea.value += `@${nickname} `;
}
Loading