Add test for muc_respect_autojoin
This commit is contained in:
parent
b81fa43a74
commit
298300e890
1
dev.html
1
dev.html
@ -30,6 +30,7 @@
|
|||||||
notify_all_room_messages: [
|
notify_all_room_messages: [
|
||||||
'discuss@conference.conversejs.org'
|
'discuss@conference.conversejs.org'
|
||||||
],
|
],
|
||||||
|
muc_respect_autojoin: false,
|
||||||
// bosh_service_url: 'http://chat.example.org:5280/http-bind/',
|
// bosh_service_url: 'http://chat.example.org:5280/http-bind/',
|
||||||
bosh_service_url: 'https://conversejs.org/http-bind/', // Please use this connection manager only for testing purposes
|
bosh_service_url: 'https://conversejs.org/http-bind/', // Please use this connection manager only for testing purposes
|
||||||
message_archiving: 'always',
|
message_archiving: 'always',
|
||||||
|
@ -154,6 +154,7 @@
|
|||||||
[{'category': 'pubsub', 'type': 'pep'}],
|
[{'category': 'pubsub', 'type': 'pep'}],
|
||||||
['http://jabber.org/protocol/pubsub#publish-options']
|
['http://jabber.org/protocol/pubsub#publish-options']
|
||||||
);
|
);
|
||||||
|
await test_utils.waitUntil(() => _converse.bookmarks);
|
||||||
let jid = 'lounge@localhost';
|
let jid = 'lounge@localhost';
|
||||||
_converse.bookmarks.create({
|
_converse.bookmarks.create({
|
||||||
'jid': jid,
|
'jid': jid,
|
||||||
@ -171,6 +172,17 @@
|
|||||||
'nick': ' Othello'
|
'nick': ' Othello'
|
||||||
});
|
});
|
||||||
expect(_.isUndefined(_converse.chatboxviews.get(jid))).toBeFalsy();
|
expect(_.isUndefined(_converse.chatboxviews.get(jid))).toBeFalsy();
|
||||||
|
|
||||||
|
// Check that we don't auto-join if muc_respect_autojoin is false
|
||||||
|
_converse.muc_respect_autojoin = false;
|
||||||
|
jid = 'balcony@conference.shakespeare.lit';
|
||||||
|
_converse.bookmarks.create({
|
||||||
|
'jid': jid,
|
||||||
|
'autojoin': true,
|
||||||
|
'name': 'Balcony',
|
||||||
|
'nick': ' Othello'
|
||||||
|
});
|
||||||
|
expect(_.isUndefined(_converse.chatboxviews.get(jid))).toBe(true);
|
||||||
done();
|
done();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user