Don't try to sync power levels before creating room

This commit is contained in:
Tulir Asokan 2023-07-20 02:03:07 +03:00
parent d7d1abc3b7
commit ef8a60977f

View file

@ -800,6 +800,7 @@ func (portal *Portal) UpdateMetadata(user *User, info *gmproto.Conversation) []i
if portal.shouldSetDMRoomMetadata() {
update = portal.UpdateName(info.Name, false) || update
}
if portal.MXID != "" {
pls, err := portal.MainIntent().PowerLevels(portal.MXID)
if err != nil {
portal.zlog.Warn().Err(err).Msg("Failed to get power levels")
@ -811,6 +812,7 @@ func (portal *Portal) UpdateMetadata(user *User, info *gmproto.Conversation) []i
portal.zlog.Debug().Str("event_id", resp.EventID.String()).Msg("Updated power levels")
}
}
}
// TODO avatar
if update {