Add basic sticker receiving support
No support for moderator replies with stickers. If a user sends the bot a sticker, the thread will show that sticker's name. Not all stickers can be linked to directly (as they're not all regular images), so this feels like the best compromise.cshd
parent
f8f9204dac
commit
620ab79f71
|
@ -346,6 +346,16 @@ class Thread {
|
|||
messageContent = messageContent.trim();
|
||||
}
|
||||
|
||||
if (msg.stickers && msg.stickers.length) {
|
||||
const stickerLines = msg.stickers.map(sticker => {
|
||||
return `*<Message contains sticker "${sticker.name}">*`;
|
||||
});
|
||||
|
||||
messageContent += "\n\n" + stickerLines.join("\n");
|
||||
}
|
||||
|
||||
messageContent = messageContent.trim();
|
||||
|
||||
// Save DB entry
|
||||
let threadMessage = new ThreadMessage({
|
||||
message_type: THREAD_MESSAGE_TYPE.FROM_USER,
|
||||
|
|
Loading…
Reference in New Issue