mautrix / discord

A Matrix-Discord puppeting bridge
https://go.mau.fi/mautrix-discord
GNU Affero General Public License v3.0
240 stars 22 forks source link

Bot does not respond to invites from users that aren't on the same home server #108

Closed JohnnyJayJay closed 5 months ago

JohnnyJayJay commented 1 year ago

I'm a bit confused as to what is going on. I have a setup with conduit as a homeserver and the following permission settings:

"*": relay
"@discordbridge:matrix.devcord.club": admin
"@johnny:yatrix.org": admin

The only weird (non-info) thing in the logs are these messages that always appear after starting the service:

mautrix-discord  | 2023-07-28T11:22:14Z ERR Failed to update room name error="failed to PUT /_matrix/client/v3/rooms/!n4fJ0eO9Wzu1Zdtjbp:matrix.devcord.club/state/m.room.name/: M_FORBIDDEN (HTTP 403): M_FORBIDDEN: Event is not authorized." channel_id=588374933277769728 channel_receiver= room_id=!n4fJ0eO9Wzu1Zdtjbp:matrix.devcord.club
mautrix-discord  | 2023-07-28T11:22:14Z ERR Failed to update room topic error="failed to PUT /_matrix/client/v3/rooms/!n4fJ0eO9Wzu1Zdtjbp:matrix.devcord.club/state/m.room.topic/: M_FORBIDDEN (HTTP 403): M_FORBIDDEN: Event is not authorized." channel_id=588374933277769728 channel_receiver= room_id=!n4fJ0eO9Wzu1Zdtjbp:matrix.devcord.club
mautrix-discord  | 2023-07-28T11:22:14Z WRN Failed to update m.bridge error="failed to PUT /_matrix/client/v3/rooms/!n4fJ0eO9Wzu1Zdtjbp:matrix.devcord.club/state/m.bridge/fi.mau.discord://discord/445994327152263179/588374933277769728: M_FORBIDDEN (HTTP 403): M_FORBIDDEN: Event is not authorized." channel_id=588374933277769728 channel_receiver= room_id=!n4fJ0eO9Wzu1Zdtjbp:matrix.devcord.club
mautrix-discord  | 2023-07-28T11:22:14Z WRN Failed to update uk.half-shot.bridge error="failed to PUT /_matrix/client/v3/rooms/!n4fJ0eO9Wzu1Zdtjbp:matrix.devcord.club/state/uk.half-shot.bridge/fi.mau.discord://discord/445994327152263179/588374933277769728: M_FORBIDDEN (HTTP 403): M_FORBIDDEN: Event is not authorized." channel_id=588374933277769728 channel_receiver= room_id=!n4fJ0eO9Wzu1Zdtjbp:matrix.devcord.club

But this just seems to be related to permissions the bot has (or doesn't have) in one of the rooms. The way I see it, it's not connected to the problem.

The problem is this: I can DM the bot and invite it to rooms on the @discordbridge:matrix.devcord.club account and it will respond/join. I can set it up, bridge channels and it will also relay messages from other users. The only thing that doesn't work is inviting it from another account such as @johnny:yatrix.org. It just does not respond. Once it is in a room with this account, it responds to commands etc. just fine. It just doesn't react to invites.

I would be fine with working around this by having my homeserver account invite it everywhere I need it, but unfortunately there doesn't seem to be a way to "re-invite" someone in Matrix? So in the channel(s) where I tried inviting it with @johnny, I cannot get it to join anymore.

tulir commented 1 year ago

That probably means the server didn't send the invite event to the bridge.

Room admins can disinvite users in Matrix.

JohnnyJayJay commented 1 year ago

That probably means the server didn't send the invite event to the bridge.

But why would it send some, but not others? It's consistent. You're saying this is an issue with the homeserver?

avdb13 commented 5 months ago

That probably means the server didn't send the invite event to the bridge.

Room admins can disinvite users in Matrix.

A command to control invite rejection for the bot would be a possible solution I guess?