Chatwoot/app/javascript/shared/mixins/messageFormatterMixin.js
Sojan Jose 4216d63311
feat: Ability to reply to specific tweets (#1117)
Ability to choose a specific tweet to reply to

Fixes #982
Co-authored-by: Pranav Raj S <pranav@thoughtwoot.com>
2020-08-11 09:57:42 +05:30

17 lines
434 B
JavaScript

import MessageFormatter from '../helpers/MessageFormatter';
export default {
methods: {
formatMessage(message, isATweet) {
const messageFormatter = new MessageFormatter(message, isATweet);
return messageFormatter.formattedMessage;
},
truncateMessage(description = '') {
if (description.length < 100) {
return description;
}
return `${description.slice(0, 97)}...`;
},
},
};