zhukov / webogram

Telegram web application, GPL v3
https://web.telegram.org
GNU General Public License v3.0
7.94k stars 2.36k forks source link

Support TGS #1876

Open aurium opened 5 years ago

aurium commented 5 years ago

Today a Animated Sticker is displayed as messageMediaUnsupported at message_media.html. I believe it shoud be recognized and displayed at message_attach_document.html like the common sticker.

The problem is i'm don't know how to define the Animated Sticker to it become recognized. If some one can help-me, I can display it using lottie.

I already tried to update Config.Schema.MTProto and Config.Schema.API with data from https://core.telegram.org/schema/json and https://core.telegram.org/schema/mtproto-json. and i add a constructorsIndex generator above:

Config.Schema.MTProto.constructorsIndex = {}
Config.Schema.MTProto.constructors.forEach((c, i)=> Config.Schema.MTProto.constructorsIndex[parseInt(c.id)] = i )
Config.Schema.API.constructorsIndex = {}
Config.Schema.API.constructors.forEach((c, i)=> Config.Schema.API.constructorsIndex[parseInt(c.id)] = i )

That don't work at all. And mtproto.js crash at line 1385 with "cant find constructor" error.

YurySolovyov commented 4 years ago

Refs #1874

I've looked at it, and i'm not sure either. It seems like it comes as messageMediaUnsupported from the backend. So I guess we need to tell backend that we can actually display animated stickers, so it will send us the required info. I could be wrong though.

aurium commented 4 years ago

Hi @zhukov, i'm glad to see you still working on this project. However i believe its a hard work to do alone and i believe you don't have so much time. What about to open this project to more commiters? Using a more contributor open strategy like Gnome, KDE, Inkscape, or something alike.