You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-09-01 21:21:58 +03:00
Check m.room.name event actually has a name in the content before using it. This should fix the recent disasters with #android being shown as 'undefined' (or crashing vector).
This commit is contained in:
@@ -438,7 +438,7 @@ function calculateRoomName(room, userId) {
|
||||
// check for an alias, if any. for now, assume first alias is the
|
||||
// official one.
|
||||
var mRoomName = room.currentState.getStateEvents("m.room.name", "");
|
||||
if (mRoomName) {
|
||||
if (mRoomName && mRoomName.getContent() && mRoomName.getContent().name) {
|
||||
return mRoomName.getContent().name;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user