Unified pending/requesting checking
This commit is contained in:
parent
2354a27832
commit
00af792899
12
converse.js
12
converse.js
@ -3228,16 +3228,8 @@
|
|||||||
|
|
||||||
showInRoster: function () {
|
showInRoster: function () {
|
||||||
var chatStatus = this.get('chat_status');
|
var chatStatus = this.get('chat_status');
|
||||||
if (converse.show_only_online_users && chatStatus !== 'online') {
|
if ((converse.show_only_online_users && chatStatus !== 'online')
|
||||||
// If pending or requesting, show
|
|| (converse.hide_offline_users && chatStatus === 'offline')) {
|
||||||
if ((this.get('ask') === 'subscribe')
|
|
||||||
|| (this.get('subscription') === 'from')
|
|
||||||
|| (this.get('requesting') === true)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (converse.hide_offline_users && chatStatus === 'offline') {
|
|
||||||
// If pending or requesting, show
|
// If pending or requesting, show
|
||||||
if ((this.get('ask') === 'subscribe')
|
if ((this.get('ask') === 'subscribe')
|
||||||
|| (this.get('subscription') === 'from')
|
|| (this.get('subscription') === 'from')
|
||||||
|
@ -436,7 +436,6 @@
|
|||||||
});
|
});
|
||||||
waits(50);
|
waits(50);
|
||||||
spyOn(this.rosterview, 'update').andCallThrough();
|
spyOn(this.rosterview, 'update').andCallThrough();
|
||||||
waits(50);
|
|
||||||
runs($.proxy(function () {
|
runs($.proxy(function () {
|
||||||
expect(this.rosterview.$el.is(':visible')).toEqual(true);
|
expect(this.rosterview.$el.is(':visible')).toEqual(true);
|
||||||
expect(this.rosterview.update).toHaveBeenCalled();
|
expect(this.rosterview.update).toHaveBeenCalled();
|
||||||
|
Loading…
Reference in New Issue
Block a user