remember any room avatars set on matrix-side
This commit is contained in:
		| @@ -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 || {} | ||||
|   | ||||
| @@ -42,6 +42,7 @@ function diffKState(actual, target) { | ||||
| 	const diff = {} | ||||
| 	// go through each key that it should have | ||||
| 	for (const key of Object.keys(target)) { | ||||
| 		if (!key.includes("/")) throw new Error(`target kstate's key "${key}" does not contain a slash separator; if a blank state_key was intended, add a trailing slash to the kstate key.`) | ||||
| 		if (key in actual) { | ||||
| 			// diff | ||||
| 			try { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Cadence Ember
					Cadence Ember