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/packages/rocketchat-message-snippet/client/tabBar/views/snippetMessage.js

18 lines
504 B

import moment from 'moment';
Template.snippetMessage.helpers({
time() {
return moment(this.ts).format(RocketChat.settings.get('Message_TimeFormat'));
},
date() {
return moment(this.ts).format(RocketChat.settings.get('Message_DateFormat'));
},
own() {
if (this.u !== undefined && this.u && this.u._id === Meteor.userId()) {
return 'own';
}
},
body() {
return `<a href="/snippet/${ this._id }/${ encodeURIComponent(this.snippetName) }">${ _.escapeHTML(this.snippetName) }</a>`;
}
});