remember any room avatars set on matrix-side

This commit is contained in:
Cadence Ember
2023-08-23 12:39:37 +12:00
parent bfe9efe62e
commit 92cd628a6c
5 changed files with 40 additions and 7 deletions

View File

@@ -167,6 +167,8 @@ async function profileSetAvatarUrl(mxid, avatar_url) {
* @param {number} power
*/
async function setUserPower(roomID, mxid, power) {
assert(roomID[0] === "!")
assert(mxid[0] === "@")
// Yes it's this hard https://github.com/matrix-org/matrix-appservice-bridge/blob/2334b0bae28a285a767fe7244dad59f5a5963037/src/components/intent.ts#L352
const powerLevels = await getStateEvent(roomID, "m.room.power_levels", "")
const users = powerLevels.users || {}