mirror of
https://mau.dev/mautrix/go.git
synced 2026-03-14 14:25:53 +01:00
bridgev2/portal: fix getting state events in roomIsPublic
Some checks failed
Some checks failed
This commit is contained in:
parent
1fac8ceb66
commit
75d54132ae
1 changed files with 5 additions and 1 deletions
|
|
@ -4295,7 +4295,11 @@ func looksDirectlyJoinable(rule *event.JoinRulesEventContent) bool {
|
|||
}
|
||||
|
||||
func (portal *Portal) roomIsPublic(ctx context.Context) bool {
|
||||
evt, err := portal.Bridge.Matrix.(MatrixConnectorWithArbitraryRoomState).GetStateEvent(ctx, portal.MXID, event.StateJoinRules, "")
|
||||
mx, ok := portal.Bridge.Matrix.(MatrixConnectorWithArbitraryRoomState)
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
evt, err := mx.GetStateEvent(ctx, portal.MXID, event.StateJoinRules, "")
|
||||
if err != nil {
|
||||
zerolog.Ctx(ctx).Warn().Err(err).Msg("Failed to get join rules to check if room is public")
|
||||
return false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue