Bugfix. Update to new function which has been renamed.
This commit is contained in:
parent
f84c201437
commit
76a7c3fa9b
30
dist/converse.js
vendored
30
dist/converse.js
vendored
@ -48776,21 +48776,6 @@ _converse_headless_converse_core__WEBPACK_IMPORTED_MODULE_3__["default"].plugins
|
|||||||
});
|
});
|
||||||
/************************ BEGIN Event Handlers ************************/
|
/************************ BEGIN Event Handlers ************************/
|
||||||
|
|
||||||
_converse.api.waitUntil('rosterContactsFetched').then(() => {
|
|
||||||
_converse.roster.on('add', contact => {
|
|
||||||
/* When a new contact is added, check if we already have a
|
|
||||||
* chatbox open for it, and if so attach it to the chatbox.
|
|
||||||
*/
|
|
||||||
const chatbox = _converse.chatboxes.findWhere({
|
|
||||||
'jid': contact.get('jid')
|
|
||||||
});
|
|
||||||
|
|
||||||
if (chatbox) {
|
|
||||||
chatbox.addRelatedContact(contact);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
_converse.api.listen.on('chatBoxesInitialized', () => {
|
_converse.api.listen.on('chatBoxesInitialized', () => {
|
||||||
_converse.chatboxviews = new _converse.ChatBoxViews({
|
_converse.chatboxviews = new _converse.ChatBoxViews({
|
||||||
'model': _converse.chatboxes
|
'model': _converse.chatboxes
|
||||||
@ -69628,6 +69613,21 @@ _converse_headless_converse_core__WEBPACK_IMPORTED_MODULE_0__["default"].plugins
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_converse.api.waitUntil('rosterContactsFetched').then(() => {
|
||||||
|
_converse.roster.on('add', contact => {
|
||||||
|
/* When a new contact is added, check if we already have a
|
||||||
|
* chatbox open for it, and if so attach it to the chatbox.
|
||||||
|
*/
|
||||||
|
const chatbox = _converse.chatboxes.findWhere({
|
||||||
|
'jid': contact.get('jid')
|
||||||
|
});
|
||||||
|
|
||||||
|
if (chatbox) {
|
||||||
|
addRelatedContactToChatbox(chatbox, contact);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
function updateUnreadCounter(chatbox) {
|
function updateUnreadCounter(chatbox) {
|
||||||
const contact = _converse.roster.findWhere({
|
const contact = _converse.roster.findWhere({
|
||||||
'jid': chatbox.get('jid')
|
'jid': chatbox.get('jid')
|
||||||
|
@ -154,18 +154,6 @@ converse.plugins.add('converse-chatboxviews', {
|
|||||||
|
|
||||||
|
|
||||||
/************************ BEGIN Event Handlers ************************/
|
/************************ BEGIN Event Handlers ************************/
|
||||||
_converse.api.waitUntil('rosterContactsFetched').then(() => {
|
|
||||||
_converse.roster.on('add', (contact) => {
|
|
||||||
/* When a new contact is added, check if we already have a
|
|
||||||
* chatbox open for it, and if so attach it to the chatbox.
|
|
||||||
*/
|
|
||||||
const chatbox = _converse.chatboxes.findWhere({'jid': contact.get('jid')});
|
|
||||||
if (chatbox) {
|
|
||||||
chatbox.addRelatedContact(contact);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
_converse.api.listen.on('chatBoxesInitialized', () => {
|
_converse.api.listen.on('chatBoxesInitialized', () => {
|
||||||
_converse.chatboxviews = new _converse.ChatBoxViews({
|
_converse.chatboxviews = new _converse.ChatBoxViews({
|
||||||
'model': _converse.chatboxes
|
'model': _converse.chatboxes
|
||||||
|
@ -887,6 +887,19 @@ converse.plugins.add('converse-roster', {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_converse.api.waitUntil('rosterContactsFetched').then(() => {
|
||||||
|
_converse.roster.on('add', (contact) => {
|
||||||
|
/* When a new contact is added, check if we already have a
|
||||||
|
* chatbox open for it, and if so attach it to the chatbox.
|
||||||
|
*/
|
||||||
|
const chatbox = _converse.chatboxes.findWhere({'jid': contact.get('jid')});
|
||||||
|
if (chatbox) {
|
||||||
|
addRelatedContactToChatbox(chatbox, contact);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
function updateUnreadCounter (chatbox) {
|
function updateUnreadCounter (chatbox) {
|
||||||
const contact = _converse.roster.findWhere({'jid': chatbox.get('jid')});
|
const contact = _converse.roster.findWhere({'jid': chatbox.get('jid')});
|
||||||
if (!_.isUndefined(contact)) {
|
if (!_.isUndefined(contact)) {
|
||||||
|
15
src/headless/dist/converse-headless.js
vendored
15
src/headless/dist/converse-headless.js
vendored
@ -48127,6 +48127,21 @@ _converse_headless_converse_core__WEBPACK_IMPORTED_MODULE_0__["default"].plugins
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_converse.api.waitUntil('rosterContactsFetched').then(() => {
|
||||||
|
_converse.roster.on('add', contact => {
|
||||||
|
/* When a new contact is added, check if we already have a
|
||||||
|
* chatbox open for it, and if so attach it to the chatbox.
|
||||||
|
*/
|
||||||
|
const chatbox = _converse.chatboxes.findWhere({
|
||||||
|
'jid': contact.get('jid')
|
||||||
|
});
|
||||||
|
|
||||||
|
if (chatbox) {
|
||||||
|
addRelatedContactToChatbox(chatbox, contact);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
function updateUnreadCounter(chatbox) {
|
function updateUnreadCounter(chatbox) {
|
||||||
const contact = _converse.roster.findWhere({
|
const contact = _converse.roster.findWhere({
|
||||||
'jid': chatbox.get('jid')
|
'jid': chatbox.get('jid')
|
||||||
|
Loading…
Reference in New Issue
Block a user