Add power level to Matrix user if they're admin

This commit is contained in:
Tulir Asokan
2018-08-26 16:19:50 +03:00
parent f78fb72622
commit 0d45b5b857
2 changed files with 12 additions and 4 deletions

View File

@ -118,6 +118,9 @@ func (cud *ChatUpdateData) UnmarshalJSON(data []byte) error {
return err
}
cud.NameChange.SetBy = strings.Replace(cud.NameChange.SetBy, OldUserSuffix, NewUserSuffix, 1)
for index, jid := range cud.PermissionChange.JIDs {
cud.PermissionChange.JIDs[index] = strings.Replace(jid, OldUserSuffix, NewUserSuffix, 1)
}
return nil
}