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
4c1f8577
Commit
4c1f8577
authored
Mar 03, 2013
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fetch vCard when restoring a previously opened chat
parent
4989b429
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
12 deletions
+18
-12
converse.js
converse.js
+18
-12
No files found.
converse.js
View file @
4c1f8577
...
...
@@ -1081,10 +1081,16 @@
}
_
.
each
(
open_chats
,
$
.
proxy
(
function
(
jid
)
{
if
(
jid
!=
'
controlbox
'
)
{
if
(
strinclude
(
jid
,
xmppchat
.
connection
.
muc_domain
))
{
this
.
createChat
Box
(
jid
);
if
(
this
.
isChatRoom
(
jid
))
{
this
.
createChat
Room
(
jid
);
}
else
{
this
.
openChat
(
jid
);
xmppchat
.
connection
.
vcard
.
get
(
$
.
proxy
(
function
(
iq
)
{
$vcard
=
$
(
iq
).
find
(
'
vCard
'
);
var
fullname
=
$vcard
.
find
(
'
BINVAL
'
).
text
();
var
img
=
$vcard
.
find
(
'
BINVAL
'
).
text
();
var
img_type
=
$vcard
.
find
(
'
TYPE
'
).
text
();
this
.
openRestoredChat
(
jid
,
fullname
,
img
,
img_type
);
},
this
),
jid
);
}
}
},
this
));
...
...
@@ -1105,12 +1111,11 @@
return
view
;
},
createChatBox
:
function
(
roster_item
)
{
var
jid
=
roster_item
.
get
(
'
jid
'
);
createChatBox
:
function
(
jid
,
fullname
)
{
var
box
=
new
xmppchat
.
ChatBox
({
'
id
'
:
jid
,
'
jid
'
:
jid
,
'
fullname
'
:
roster_item
.
get
(
'
fullname
'
)
,
'
fullname
'
:
fullname
,
'
portrait_url
'
:
''
,
'
user_profile_url
'
:
''
,
});
...
...
@@ -1128,15 +1133,19 @@
}
},
openRestoredChat
:
function
(
bare_jid
,
fullname
,
img
,
img_type
)
{
this
.
createChatBox
(
jid
,
fullname
)
},
openChat
:
function
(
roster_item
)
{
var
view
,
jid
=
roster_item
.
get
(
'
jid
'
);
var
jid
=
roster_item
.
get
(
'
jid
'
);
jid
=
Strophe
.
getBareJidFromJid
(
jid
);
if
(
this
.
model
.
get
(
jid
))
{
this
.
showChat
(
jid
);
}
else
if
(
this
.
isChatRoom
(
jid
))
{
view
=
this
.
createChatRoom
(
jid
);
this
.
createChatRoom
(
jid
);
}
else
{
view
=
this
.
createChatBox
(
roster_item
);
this
.
createChatBox
(
jid
,
roster_item
.
get
(
'
fullname
'
)
);
}
},
...
...
@@ -1435,9 +1444,6 @@
this
.
add
(
model
);
},
getRosterItem
:
function
(
jid
)
{
},
addResource
:
function
(
bare_jid
,
resource
)
{
var
item
=
this
.
getItem
(
bare_jid
),
resources
;
...
...
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