mirror of
https://github.com/maunium/stickerpicker.git
synced 2025-07-17 22:43:33 +02:00
Make Element Desktop send telegram sticker info
Element Desktop removes additional properties in the sticker info, but not the media info. Element Android removes them in both currently. This commit moves the net.maunium.telegram.sticker property to the media info. This can be combined with a change to mautrix-telegram that bridges telegram-imported matrix stickers to matrix stickers.
This commit is contained in:
@ -47,6 +47,11 @@ window.onmessage = event => {
|
||||
}
|
||||
|
||||
export function sendSticker(content) {
|
||||
if (content["info"]["net.maunium.telegram.sticker"] === undefined) {
|
||||
// Old sticker, move the property to its new location
|
||||
content["info"]["net.maunium.telegram.sticker"] = content["net.maunium.telegram.sticker"];
|
||||
delete content["net.maunium.telegram.sticker"];
|
||||
}
|
||||
const data = {
|
||||
content: { ...content },
|
||||
// `name` is for Element Web (and also the spec)
|
||||
|
Reference in New Issue
Block a user