knadh / tg-archive

A tool for exporting Telegram group chats into static websites like mailing list archives.
MIT License
829 stars 121 forks source link

Show stickers inline #112

Closed scarlion1 closed 11 months ago

scarlion1 commented 11 months ago

Stickers were one of the big appeals when Telegram came out!  but why you don't show the stickers inline?  I figured out how!

In template.html after {% if ext in ['mp4', 'webm', 'ogg', 'ogv', 'mov'] %} block add:

                                        {% elif ext in ['webp'] %}
                                            <a href="{{ config.media_dir }}/{{ m.media.url }}">
                                                <img src="{{ config.media_dir }}/{{ m.media.url }}" width="50%" />
                                            </a>

Is it acceptable?  I've never contributed like this before! 😳😅  Shall I make pull request?

knadh commented 11 months ago

Please do! Thank you.

scarlion1 commented 11 months ago

Alright should be easy enough... looks like animated stickers aren't supported though... it just shows an emoji in the space. The animated stickers are in TGS format if i download from Telegram desktop client, but i don't see any .tgs files in media dir. What causes that? Is there a way to at least get the .tgs file downloaded?

knadh commented 11 months ago

Fixed in https://github.com/knadh/tg-archive/pull/113