The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Rocket.Chat/app/ui-message/client/messageBox/messageBoxReplyPreview.js

19 lines
491 B

import { Template } from 'meteor/templating';
import './messageBoxReplyPreview.html';
Template.messageBoxReplyPreview.events({
'click .cancel-reply'(event) {
event.preventDefault();
event.stopPropagation();
const { mid } = event.currentTarget.dataset;
const $input = $(this.input);
this.input.focus();
const messages = $input.data('reply') || [];
const filtered = messages.filter(({ _id }) => _id !== mid);
$input.data('reply', filtered).trigger('dataChange');
},
});