matrix-js-sdk
f26154d0 - Add support for m.room.avatar: refactor avatar URLs

Commit
10 years ago
Add support for m.room.avatar: refactor avatar URLs BREAKING CHANGE. Scope each "getAvatarUrl" to be instance methods on the entity it relates to (Room and RoomMember respectively). By doing this, we can actually pull out specific state such as the `m.room.avatar` event more easily rather than keeping it in the global cesspit of `MatrixClient`. This was complicated by `getHttpUriForMxc` and `getIdenticonUri` which were attached to the HTTP API to pull out the `baseUrl` when crafting the URL. Pull out this dependency out and explicitly pass it in when crafting the URL. This is trivial to get from `MatrixClient.getHomeserverUrl()`.
Author
Parents
Loading