Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
76a7c3fa
Commit
76a7c3fa
authored
Apr 11, 2019
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfix. Update to new function which has been renamed.
parent
f84c2014
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
27 deletions
+43
-27
dist/converse.js
dist/converse.js
+15
-15
src/converse-chatboxviews.js
src/converse-chatboxviews.js
+0
-12
src/headless/converse-roster.js
src/headless/converse-roster.js
+13
-0
src/headless/dist/converse-headless.js
src/headless/dist/converse-headless.js
+15
-0
No files found.
dist/converse.js
View file @
76a7c3fa
...
...
@@ -48776,21 +48776,6 @@ _converse_headless_converse_core__WEBPACK_IMPORTED_MODULE_3__["default"].plugins
});
/************************ 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.chatboxviews = new _converse.ChatBoxViews({
'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) {
const contact = _converse.roster.findWhere({
'jid': chatbox.get('jid')
src/converse-chatboxviews.js
View file @
76a7c3fa
...
...
@@ -154,18 +154,6 @@ converse.plugins.add('converse-chatboxviews', {
/************************ 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
.
chatboxviews
=
new
_converse
.
ChatBoxViews
({
'
model
'
:
_converse
.
chatboxes
...
...
src/headless/converse-roster.js
View file @
76a7c3fa
...
...
@@ -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
)
{
const
contact
=
_converse
.
roster
.
findWhere
({
'
jid
'
:
chatbox
.
get
(
'
jid
'
)});
if
(
!
_
.
isUndefined
(
contact
))
{
...
...
src/headless/dist/converse-headless.js
View file @
76a7c3fa
...
...
@@ -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) {
const contact = _converse.roster.findWhere({
'jid': chatbox.get('jid')
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment