You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-28 05:03:59 +03:00
add room method for alt_aliases
This commit is contained in:
@@ -866,6 +866,18 @@ Room.prototype.getCanonicalAlias = function() {
|
|||||||
return null;
|
return null;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get this room's alternative aliases
|
||||||
|
* @return {[string]} The room's alternative aliases, or an empty array
|
||||||
|
*/
|
||||||
|
Room.prototype.getAltAliases = function() {
|
||||||
|
const canonicalAlias = this.currentState.getStateEvents("m.room.canonical_alias", "");
|
||||||
|
if (canonicalAlias) {
|
||||||
|
return canonicalAlias.getContent().alt_aliases || [];
|
||||||
|
}
|
||||||
|
return [];
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add events to a timeline
|
* Add events to a timeline
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user