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
b1272a69
Commit
b1272a69
authored
Apr 01, 2015
by
Florian Cargoët
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the known bug where a state notification reopens a chat box
parent
46469443
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
converse.js
converse.js
+9
-6
No files found.
converse.js
View file @
b1272a69
...
...
@@ -3119,12 +3119,15 @@
chatbox
=
this
.
get
(
contact_jid
);
if
(
!
chatbox
)
{
/*
FIXME: there is a bug here. If chat state notifications
*
(because a roster contact closed a chat box of yours
*
they had open) are received and we don't have a chat with
*
the user, then a chat box is created here which t
hen
*
opens automatically :(
/*
If chat state notifications (because a roster contact
*
closed a chat box of yours they had open) are received
*
and we don't have a chat with the user, then we do not
*
want to open a chat box. We only open a new chat box w
hen
*
the message has a body.
*/
if
(
$message
.
find
(
'
body
'
).
length
===
0
)
{
return
true
;
}
var
fullname
=
roster_item
.
get
(
'
fullname
'
);
fullname
=
_
.
isEmpty
(
fullname
)?
contact_jid
:
fullname
;
chatbox
=
this
.
create
({
...
...
@@ -3140,7 +3143,7 @@
// FIXME: There's still a bug here..
// If a duplicate message is received just after the chat
// box was closed, then it'll open again (due to it being
// created here above), with no
w
new messages.
// created here above), with no new messages.
// The solution is mostly likely to not let chat boxes show
// automatically when they are created, but to require
// "show" to be called explicitly.
...
...
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