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
cbde2a1d
Commit
cbde2a1d
authored
Dec 17, 2013
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the fetching of VCards optional. Updates #100
parent
7b2d16af
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
11 deletions
+22
-11
converse.js
converse.js
+12
-11
docs/CHANGES.rst
docs/CHANGES.rst
+1
-0
docs/source/index.rst
docs/source/index.rst
+9
-0
No files found.
converse.js
View file @
cbde2a1d
...
...
@@ -87,6 +87,7 @@
this
.
show_only_online_users
=
false
;
this
.
show_emoticons
=
true
;
this
.
show_toolbar
=
true
;
this
.
use_vcards
=
true
;
this
.
xhr_custom_status
=
false
;
this
.
xhr_custom_status_url
=
''
;
this
.
xhr_user_search
=
false
;
...
...
@@ -114,6 +115,7 @@
'
show_only_online_users
'
,
'
show_toolbar
'
,
'
sid
'
,
'
use_vcards
'
,
'
xhr_custom_status
'
,
'
xhr_custom_status_url
'
,
'
xhr_user_search
'
,
...
...
@@ -205,6 +207,12 @@
};
this
.
getVCard
=
function
(
jid
,
callback
,
errback
)
{
if
(
!
this
.
use_vcards
)
{
if
(
callback
)
{
callback
(
jid
,
jid
);
}
return
;
}
converse
.
connection
.
vcard
.
get
(
$
.
proxy
(
function
(
iq
)
{
// Successful callback
...
...
@@ -242,7 +250,8 @@
if
(
errback
)
{
errback
(
iq
);
}
});
}
);
};
this
.
onConnect
=
function
(
status
)
{
...
...
@@ -1384,16 +1393,7 @@
$input
.
addClass
(
'
error
'
);
return
;
}
converse
.
getVCard
(
jid
,
$
.
proxy
(
function
(
jid
,
fullname
,
image
,
image_type
,
url
)
{
this
.
addContact
(
jid
,
fullname
);
},
this
),
$
.
proxy
(
function
(
stanza
)
{
converse
.
log
(
"
An error occured while fetching vcard
"
);
var
jid
=
$
(
stanza
).
attr
(
'
from
'
);
this
.
addContact
(
jid
,
jid
);
},
this
));
this
.
addContact
(
jid
);
$
(
'
.search-xmpp
'
).
hide
();
},
...
...
@@ -1408,6 +1408,7 @@
},
addContact
:
function
(
jid
,
name
)
{
name
=
_
.
isEmpty
(
name
)?
jid
:
name
;
converse
.
connection
.
roster
.
add
(
jid
,
name
,
[],
function
(
iq
)
{
converse
.
connection
.
roster
.
subscribe
(
jid
,
null
,
converse
.
xmppstatus
.
get
(
'
fullname
'
));
});
...
...
docs/CHANGES.rst
View file @
cbde2a1d
...
...
@@ -5,6 +5,7 @@ Changelog
------------------
* #48 Add event emitter support and emit events. [jcbrand]
* #100 Make the fetching of vCards optional (enabled by default). [jcbrand]
0.7.1 (2013-11-17)
------------------
...
...
docs/source/index.rst
View file @
cbde2a1d
...
...
@@ -815,6 +815,15 @@ Default = ``false``
If set to ``true``, only online users will be shown in the contacts roster.
Users with any other status (e.g. away, busy etc.) will not be shown.
use_vcards
----------
Default = ``true``
Determines whether the XMPP server will be queried for roster contacts' VCards
or not. VCards contain extra personal information such as your fullname and
avatar image.
xhr_custom_status
-----------------
...
...
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