Commit Graph

72 Commits

Author SHA1 Message Date
Casey 2006d489c3
I think formatting works properly now?
When boosting something, status contents are not stored in status
itself, but rather in the `status.reblog`. Since it'd be really awkward
to check for boosts too, I just decided to add separate `@property` that
returns either reblog or status itself, depending on the value of
`status.reblog`. That required a bit of tweaking. Also now we're using
ExtendedInterpolation, so you can do the `${tokens.telegram}` and add
separate section for your secrets.
TODO: add support for environment variables (maybe)

For those who's wondering how manual check for boost would look in the
template, here ya go :)

{% if status.reblog %}Boost from <a \
href="{{status.reblog.account.url}}">{{status.reblog.account.name}}</a>
{% if status.reblog.spoiler_text %}{{status.reblog.spoiler_text}}
<tg-spoiler>{% endif %}{{status.reblog.content_flathtml}}\
{% if status.reblog.spoiler_text %}</tg-spoiler>{% endif %}
{% else %}
{% if status.spoiler_text %}{{status.spoiler_text}}
<tg-spoiler>{% endif %}{{status.content_flathtml}}\
{% if status.spoiler_text %}</tg-spoiler>{% endif %}
{% endif %}

<a href="{{status.link}}">Link to post</a>

You asked for this :)
2022-08-31 18:12:38 +03:00
Casey 881b1e1532
Custom formatting? 2022-08-31 16:19:39 +03:00
Casey 87a74898eb
Why there's so many exceptions to catch?
And why there's TimeoutError and asyncio.exceptions.TimeoutError?
2022-08-31 12:34:25 +03:00
Casey 0e59717c91
Whoopsie
forgot that TimeoutError is not the same as WebSocketException
2022-08-31 00:27:34 +03:00
Casey 01a384161c
Changed some filters 2022-08-30 21:20:15 +03:00
Casey 26c23643c8
Fixed filter type guessing 2022-08-30 16:34:48 +03:00
Casey 7c2760783b
Ignore case in tags and removed debug print 2022-08-30 15:54:05 +03:00
Casey 209d1a9072
Pleroma: fallback value in account.discoverable 2022-08-30 13:25:05 +03:00
Casey 0274bbe186
Various filter fixes 2022-08-29 17:17:57 +03:00
Casey 8b7c381870
BaseIntegration.__call__ → BaseIntegration() 2022-08-29 10:34:23 +03:00
Casey f048cf07a9
FILTERS!!! AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 2022-08-29 10:28:51 +03:00
Casey bba6168f2b
Added a all other filters 2022-08-28 01:05:14 +03:00
Casey d19a3d2005
Added mention filter 2022-08-27 16:16:36 +03:00
Casey 4d7a9be45f
Added combined filter 2022-08-27 15:47:51 +03:00
Casey ae8a1ddf34
The Beginning Of Filters
Also Flake8 cleanup and other stuff
2022-08-27 14:27:42 +03:00
Casey 9024f14f40
Added silent notification option (Closes #9) 2022-08-26 21:24:36 +03:00
Casey 855596c666
Fixed #8 (I think?) 2022-08-26 19:06:03 +03:00
Casey 8088cca8f0
Added polls and reconnect. Closes #1 & #7, I hope- 2022-08-26 18:37:36 +03:00
Casey 239957bb81
Imports cleanup, also fixed #4 2022-08-26 14:32:55 +03:00
Casey 60f18c8d22
Added Discord integration
Check `config.ini` for more details.

Also now `private` posts are not forwarded. That may be changed with
filters (coming sometime soon).
2022-08-26 02:03:06 +03:00
Casey 35903c6cb4
Missing newline 2022-08-24 08:52:34 +03:00
Casey a8b413a632
Changed folder name +TODO 2022-08-24 08:28:18 +03:00