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
88649254
Commit
88649254
authored
Aug 06, 2019
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfix. Make sure new attrs are applied.
parent
bda567ca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
src/headless/converse-chatboxes.js
src/headless/converse-chatboxes.js
+5
-2
No files found.
src/headless/converse-chatboxes.js
View file @
88649254
...
...
@@ -1166,7 +1166,8 @@ converse.plugins.add('converse-chatboxes', {
* @method _converse.ChatBox#getChatBox
* @param { string } jid - The JID of the user whose chat box we want
* @param { boolean } create - Should a new chat box be created if none exists?
* @param { object } attrs - Optional chat box atributes.
* @param { object } attrs - Optional chat box atributes. If the
* chat box already exists, its attributes will be updated.
*/
getChatBox
(
jid
,
attrs
=
{},
create
)
{
if
(
_
.
isObject
(
jid
))
{
...
...
@@ -1177,7 +1178,9 @@ converse.plugins.add('converse-chatboxes', {
jid
=
Strophe
.
getBareJidFromJid
(
jid
.
toLowerCase
());
let
chatbox
=
this
.
get
(
Strophe
.
getBareJidFromJid
(
jid
));
if
(
!
chatbox
&&
create
)
{
if
(
chatbox
)
{
chatbox
.
save
(
attrs
);
}
else
if
(
create
)
{
Object
.
assign
(
attrs
,
{
'
jid
'
:
jid
,
'
id
'
:
jid
});
chatbox
=
this
.
create
(
attrs
,
{
'
error
'
(
model
,
response
)
{
...
...
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