remove alt_aliases, as we should not use it for the room name

This commit is contained in:
Bruno Windels 2020-08-21 18:11:53 +02:00
parent d5d0154873
commit acec7c8f33

View file

@ -73,7 +73,6 @@ function processStateEvent(data, event) {
const content = event.content; const content = event.content;
data = data.cloneIfNeeded(); data = data.cloneIfNeeded();
data.canonicalAlias = content.alias; data.canonicalAlias = content.alias;
data.altAliases = content.alt_aliases;
} }
return data; return data;
} }
@ -129,7 +128,6 @@ class SummaryData {
this.joinCount = copy ? copy.joinCount : 0; this.joinCount = copy ? copy.joinCount : 0;
this.heroes = copy ? copy.heroes : null; this.heroes = copy ? copy.heroes : null;
this.canonicalAlias = copy ? copy.canonicalAlias : null; this.canonicalAlias = copy ? copy.canonicalAlias : null;
this.altAliases = copy ? copy.altAliases : null;
this.hasFetchedMembers = copy ? copy.hasFetchedMembers : false; this.hasFetchedMembers = copy ? copy.hasFetchedMembers : false;
this.lastPaginationToken = copy ? copy.lastPaginationToken : null; this.lastPaginationToken = copy ? copy.lastPaginationToken : null;
this.avatarUrl = copy ? copy.avatarUrl : null; this.avatarUrl = copy ? copy.avatarUrl : null;
@ -165,9 +163,6 @@ export class RoomSummary {
if (this._data.canonicalAlias) { if (this._data.canonicalAlias) {
return this._data.canonicalAlias; return this._data.canonicalAlias;
} }
if (Array.isArray(this._data.altAliases) && this._data.altAliases.length !== 0) {
return this._data.altAliases[0];
}
if (Array.isArray(this._data.heroes) && this._data.heroes.length !== 0) { if (Array.isArray(this._data.heroes) && this._data.heroes.length !== 0) {
return this._data.heroes.join(", "); return this._data.heroes.join(", ");
} }