mirror of
https://github.com/chatwoot/chatwoot.git
synced 2026-06-25 21:09:04 +08:00
Co-authored-by: Pranav Raj S <[email protected]> Co-authored-by: Nithin David Thomas <[email protected]>
18 lines
414 B
JavaScript
18 lines
414 B
JavaScript
import MessageFormatter from '../helpers/MessageFormatter';
|
|
|
|
export default {
|
|
methods: {
|
|
formatMessage(message) {
|
|
const messageFormatter = new MessageFormatter(message);
|
|
return messageFormatter.formattedMessage;
|
|
},
|
|
truncateMessage(description = '') {
|
|
if (description.length < 100) {
|
|
return description;
|
|
}
|
|
|
|
return `${description.slice(0, 97)}...`;
|
|
},
|
|
},
|
|
};
|