1
0
mirror of https://github.com/nextcloud/ocsms.git synced 2026-08-23 22:32:54 +00:00

Add local support for twemoji.

Adds twemoji support, with the twemoji library and graphics hosted on the local NextCloud install.
This commit is contained in:
Greg Ross
2018-07-02 14:31:08 -04:00
committed by Loïc Blot
parent e6a2214bc9
commit 967a60b4c3
5687 changed files with 2862 additions and 7 deletions
+6 -5
View File
@@ -97,11 +97,12 @@ var Conversation = new Vue({
// Return (int) msgCount, (str) htmlConversation
formatConversation: function (jsondata) {
// Improve jQuery performance
let buf = false;
// Improve JS performance
let msgClass = '';
let msgCount = 0;
let buf = false;
// Improve JS performance
let msgClass = '';
let msgCount = 0;
let self = this;
let twemojiOptions = { base: OC.generateUrl('/apps/ocsms/js/twemoji/')};
$.each(jsondata["conversation"], function (id, vals) {
if (vals["type"] == 1) {
@@ -124,7 +125,7 @@ var Conversation = new Vue({
'id': id,
'type': msgClass,
'date': new Date(id * 1),
'content': vals['msg']
'content': twemoji.parse(escapeHTML(vals['msg']), twemojiOptions)
});
buf = true;
msgCount++;