mx-puppet-bridge
Advanced tools
Comparing version 0.1.5 to 0.1.6
@@ -142,7 +142,13 @@ "use strict"; | ||
const stateEventContent = { | ||
emoticons: {}, | ||
images: {}, | ||
pack: { | ||
usage: ["emoticon"], | ||
}, | ||
}; | ||
for (const e of emotes) { | ||
if (e.name && e.avatarMxc) { | ||
stateEventContent.emoticons[e.name] = { url: e.avatarMxc }; | ||
const name = e.name[0] === ":" && e.name[e.name.length - 1] === ":" | ||
? e.name.substring(1, e.name.length - 1) | ||
: e.name; | ||
stateEventContent.images[name] = { url: e.avatarMxc }; | ||
} | ||
@@ -149,0 +155,0 @@ } |
{ | ||
"name": "mx-puppet-bridge", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"description": "Matrix Puppeting Bridge library", | ||
@@ -23,3 +23,3 @@ "repository": { | ||
"dependencies": { | ||
"@sorunome/matrix-bot-sdk": "^0.5.8", | ||
"@sorunome/matrix-bot-sdk": "^0.5.13", | ||
"better-sqlite3": "^7.4.1", | ||
@@ -26,0 +26,0 @@ "blurhash": "^1.1.3", |
@@ -27,3 +27,3 @@ /* | ||
interface IPoniesRoomEmotesContent { | ||
emoticons: { | ||
images: { | ||
[key: string]: { | ||
@@ -36,3 +36,4 @@ url: string; | ||
avatar_url?: string; | ||
short?: string; | ||
usage?: string[]; | ||
attribution?: string; | ||
}; | ||
@@ -153,7 +154,13 @@ } | ||
const stateEventContent: IPoniesRoomEmotesContent = { | ||
emoticons: {}, | ||
images: {}, | ||
pack: { | ||
usage: ["emoticon"], | ||
}, | ||
}; | ||
for (const e of emotes) { | ||
if (e.name && e.avatarMxc) { | ||
stateEventContent.emoticons[e.name] = {url: e.avatarMxc}; | ||
const name = e.name[0] === ":" && e.name[e.name.length - 1] === ":" | ||
? e.name.substring(1, e.name.length - 1) | ||
: e.name; | ||
stateEventContent.images[name] = {url: e.avatarMxc}; | ||
} | ||
@@ -160,0 +167,0 @@ } |
Sorry, the diff of this file is not supported yet
1253909
23615