Fix presence exchange.
- Added 'show' element - 'busy' must be 'dnd'
This commit is contained in:
parent
dfc1b73d11
commit
49fd8a7ecd
10
converse.css
10
converse.css
|
@ -43,10 +43,6 @@
|
||||||
padding: 3px 0 3px 7px;
|
padding: 3px 0 3px 7px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chatbox a {
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.chat-head-chatbox {
|
.chat-head-chatbox {
|
||||||
background-color: rgb(89, 106, 114);
|
background-color: rgb(89, 106, 114);
|
||||||
background-color: rgba(89, 106, 114, 1);
|
background-color: rgba(89, 106, 114, 1);
|
||||||
|
@ -356,8 +352,8 @@ form.search-xmpp-contact input {
|
||||||
background: url(images/user_offline_panel.png) no-repeat 5px 2px;
|
background: url(images/user_offline_panel.png) no-repeat 5px 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#xmppchat-roster dd.current-xmpp-contact.busy,
|
#xmppchat-roster dd.current-xmpp-contact.dnd,
|
||||||
#xmppchat-roster dd.current-xmpp-contact.busy:hover {
|
#xmppchat-roster dd.current-xmpp-contact.dnd:hover {
|
||||||
background: url(images/user_busy_panel.png) no-repeat 5px 2px;
|
background: url(images/user_busy_panel.png) no-repeat 5px 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -634,7 +630,7 @@ input.custom-xmpp-status {
|
||||||
background: url(images/user_offline_panel.png) no-repeat left;
|
background: url(images/user_offline_panel.png) no-repeat left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdown a.busy {
|
.dropdown a.dnd {
|
||||||
background: url(images/user_busy_panel.png) no-repeat left;
|
background: url(images/user_busy_panel.png) no-repeat left;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
22
converse.js
22
converse.js
|
@ -559,7 +559,7 @@
|
||||||
this.insertStatusNotification(fullname+' '+'has gone offline');
|
this.insertStatusNotification(fullname+' '+'has gone offline');
|
||||||
} else if (presence_type === 'away') {
|
} else if (presence_type === 'away') {
|
||||||
this.insertStatusNotification(fullname+' '+'has gone away');
|
this.insertStatusNotification(fullname+' '+'has gone away');
|
||||||
} else if ((presence_type === 'busy') || (presence_type === 'dnd')) {
|
} else if ((presence_type === 'dnd')) {
|
||||||
this.insertStatusNotification(fullname+' '+'is busy');
|
this.insertStatusNotification(fullname+' '+'is busy');
|
||||||
} else if (presence_type === 'online') {
|
} else if (presence_type === 'online') {
|
||||||
this.$el.find('div.chat-event').remove();
|
this.$el.find('div.chat-event').remove();
|
||||||
|
@ -644,7 +644,7 @@
|
||||||
'<span id="xmpp-status-holder">'+
|
'<span id="xmpp-status-holder">'+
|
||||||
'<select id="select-xmpp-status">'+
|
'<select id="select-xmpp-status">'+
|
||||||
'<option value="online">Online</option>'+
|
'<option value="online">Online</option>'+
|
||||||
'<option value="busy">Busy</option>'+
|
'<option value="dnd">Busy</option>'+
|
||||||
'<option value="away">Away</option>'+
|
'<option value="away">Away</option>'+
|
||||||
'<option value="offline">Offline</option>'+
|
'<option value="offline">Offline</option>'+
|
||||||
'</select>'+
|
'</select>'+
|
||||||
|
@ -1419,10 +1419,10 @@
|
||||||
case 'unavailable':
|
case 'unavailable':
|
||||||
rank = 1;
|
rank = 1;
|
||||||
break;
|
break;
|
||||||
case 'away':
|
case 'xa':
|
||||||
rank = 2;
|
rank = 2;
|
||||||
break;
|
break;
|
||||||
case 'busy':
|
case 'away':
|
||||||
rank = 3;
|
rank = 3;
|
||||||
break;
|
break;
|
||||||
case 'dnd':
|
case 'dnd':
|
||||||
|
@ -1628,11 +1628,11 @@
|
||||||
if (show.text() === 'chat') {
|
if (show.text() === 'chat') {
|
||||||
presence_type = 'online';
|
presence_type = 'online';
|
||||||
} else if (show.text() === 'dnd') {
|
} else if (show.text() === 'dnd') {
|
||||||
presence_type = 'busy';
|
presence_type = 'dnd';
|
||||||
} else if (show.text() === 'xa') {
|
} else if (show.text() === 'xa') {
|
||||||
presence_type = 'offline';
|
presence_type = 'offline';
|
||||||
} else {
|
} else {
|
||||||
presence_type = show.text();
|
presence_type = show.text() || 'online';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1730,7 +1730,7 @@
|
||||||
$my_contacts.after($my_contacts.siblings('dd.current-xmpp-contact.offline').tsort('a', crit));
|
$my_contacts.after($my_contacts.siblings('dd.current-xmpp-contact.offline').tsort('a', crit));
|
||||||
$my_contacts.after($my_contacts.siblings('dd.current-xmpp-contact.unavailable').tsort('a', crit));
|
$my_contacts.after($my_contacts.siblings('dd.current-xmpp-contact.unavailable').tsort('a', crit));
|
||||||
$my_contacts.after($my_contacts.siblings('dd.current-xmpp-contact.away').tsort('a', crit));
|
$my_contacts.after($my_contacts.siblings('dd.current-xmpp-contact.away').tsort('a', crit));
|
||||||
$my_contacts.after($my_contacts.siblings('dd.current-xmpp-contact.busy').tsort('a', crit));
|
$my_contacts.after($my_contacts.siblings('dd.current-xmpp-contact.dnd').tsort('a', crit));
|
||||||
$my_contacts.after($my_contacts.siblings('dd.current-xmpp-contact.online').tsort('a', crit));
|
$my_contacts.after($my_contacts.siblings('dd.current-xmpp-contact.online').tsort('a', crit));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1781,7 +1781,13 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
sendPresence: function (type) {
|
sendPresence: function (type) {
|
||||||
xmppchat.connection.send($pres({'type':type}));
|
if (type === 'unavailable') {
|
||||||
|
xmppchat.connection.send($pres({'type':type}));
|
||||||
|
} else if (type === 'online') {
|
||||||
|
xmppchat.connection.send($pres());
|
||||||
|
} else {
|
||||||
|
xmppchat.connection.send($pres().c('show').t(type));
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
getStatus: function () {
|
getStatus: function () {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user