1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-08-09 10:22:46 +03:00

Merge branches 'develop' and 't3chguy/remove_bluebird_12' of github.com:matrix-org/matrix-js-sdk into t3chguy/remove_bluebird_12

This commit is contained in:
Michael Telatynski
2019-12-04 23:44:04 +00:00
2 changed files with 14 additions and 6 deletions

View File

@@ -623,7 +623,9 @@ describe("Room", function() {
};
const setAliases = function(aliases, stateKey) {
if (!stateKey) {
stateKey = "flibble";
stateKey = aliases.length
? aliases[0].split(':').splice(1).join(':') // domain+port
: 'fibble';
}
room.addLiveEvents([utils.mkEvent({
type: "m.room.aliases", room: roomId, skey: stateKey, content: {
@@ -864,7 +866,7 @@ describe("Room", function() {
"(invite join_rules) rooms if a room name doesn't exist.", function() {
const alias = "#room_alias:here";
setJoinRule("invite");
setAliases([alias, "#another:one"]);
setAliases([alias, "#another:here"]);
room.recalculate();
const name = room.name;
expect(name).toEqual(alias);
@@ -874,7 +876,7 @@ describe("Room", function() {
"(public join_rules) rooms if a room name doesn't exist.", function() {
const alias = "#room_alias:here";
setJoinRule("public");
setAliases([alias, "#another:one"]);
setAliases([alias, "#another:here"]);
room.recalculate();
const name = room.name;
expect(name).toEqual(alias);