Commit Graph

13 Commits

Author SHA1 Message Date
Aine
b9cf336a6d fix encrypted thread reply, fix From header in thread reply 2022-11-14 00:38:17 +02:00
Aine
97aacbf143 export MXID patterns parsing to external lib 2022-09-14 13:46:56 +03:00
Slavi Pantaleev
61cc9b21c5 Only auto-join rooms when invited by allowed users
Previously, anyone (even across federation) could invite you to a
room and the bot would join. It may not have provided a useful purpose,
but it still joined all rooms it was invited to.

We now only join rooms when we're invited by a person who is actually
allowed to use the bot.

Fixes https://gitlab.com/etke.cc/postmoogle/-/issues/17
2022-08-31 15:54:56 +03:00
Aine
1a87929567 rename files; show commands by access level 2022-08-29 15:19:07 +03:00
Slavi Pantaleev
a057654962 Put command access checks on the command level
Checking using `settings.Allowed` is odd. Not all commands are related
to setting configuration settings. Admin commands are coming in the
future, for which this is certainly not the case.

We now do access checks early on (during command processing), so command
handlers can be clean of access checks. If we're inside of a command
handler, the user is privileged to run it.
2022-08-29 10:27:53 +03:00
Aine
2da1aacc7a automatically remove mailboxes in empty rooms, fixes #3 2022-08-26 16:22:44 +03:00
Aine
b0c274491f refactor to context, remove sentry spans 2022-08-25 22:31:12 +03:00
Slavi Pantaleev
8507af670a exists -> ok 2022-08-25 21:44:06 +03:00
Slavi Pantaleev
a093de51c4 Remove some useless sentry spans 2022-08-25 21:41:25 +03:00
Slavi Pantaleev
06856adb86 Simplify code 2022-08-25 21:38:42 +03:00
Slavi Pantaleev
236a128129 Fix double membership=join event handling
This fixes the problem mentioned in 8e1aa5b11c.

Turns out that it's a long-standing Synapse bug:
https://github.com/matrix-org/synapse/issues/9768
2022-08-25 20:18:09 +03:00
Slavi Pantaleev
8e1aa5b11c [WIP] Send introduction text and help after the bot joins a room
This appears to work, except that the join event is triggered twice,
and we send the (introduction + help) twice.
2022-08-25 11:58:18 +03:00
Aine
c4b7a16e21 wip 2022-08-21 18:41:35 +03:00