go icon indicating copy to clipboard operation
go copied to clipboard

Add support for join rule handling

Open maltee1 opened this issue 1 year ago • 7 comments

maltee1 avatar Aug 19 '24 18:08 maltee1

somehow, portal.handleMatrixJoinRules doesn't seem to be called upon receiving a join rule event

maltee1 avatar Aug 20 '24 19:08 maltee1

Probably missing the event handler in the matrix connector

tulir avatar Aug 20 '24 19:08 tulir

I implemented that, but it doesn't even get there. Seems portal.handleMatrixEvent isn't even called. I'm confused.

There should be some kind of debug output mentioning the event type, even if there is no handler, right? This is all I get:

{"level":"debug","transaction_id":"1359356","content":{"pdu":1,"unstable_edu":0,"unstable_to_device":0},"time":"2024-08-20T21:52:42.00156651+02:00","message":"Starting handling of transaction"}
{"level":"debug","transaction_id":"1359356","time":"2024-08-20T21:52:42.001723684+02:00","message":"Finished dispatching events from transaction"}

maltee1 avatar Aug 20 '24 19:08 maltee1

Portal is in the central bridge module, it only gets events that the matrix connector registers handlers for

tulir avatar Aug 20 '24 19:08 tulir

then why is portal.handleMatrixPowerLevels called even though this branch doesn't have a handler for power levels?

maltee1 avatar Aug 20 '24 19:08 maltee1

https://github.com/mautrix/go/commit/b899ef773f8f9ca4ff216d89abe0cae278bbc64a

tulir avatar Aug 20 '24 20:08 tulir

oh...

maltee1 avatar Aug 20 '24 20:08 maltee1