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
3dd6ff17
Commit
3dd6ff17
authored
Mar 08, 2017
by
Anshul Singhal
Committed by
JC Brand
Mar 08, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes the duplication bug in adding contact and adds test for the same
parent
5efb7fbf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
2 deletions
+31
-2
docs/CHANGES.md
docs/CHANGES.md
+1
-0
spec/controlbox.js
spec/controlbox.js
+28
-0
src/converse-core.js
src/converse-core.js
+2
-2
No files found.
docs/CHANGES.md
View file @
3dd6ff17
...
@@ -69,6 +69,7 @@
...
@@ -69,6 +69,7 @@
New configuration setting:
New configuration setting:
[
muc_show_join_leave
](
https://conversejs.org/docs/html/configuration.html#muc-show-join-leave
)
[
muc_show_join_leave
](
https://conversejs.org/docs/html/configuration.html#muc-show-join-leave
)
-
#366 Show the chat room occupant's JID in the tooltip (if you're allowed to see it). [jcbrand]
-
#366 Show the chat room occupant's JID in the tooltip (if you're allowed to see it). [jcbrand]
-
#585 Fixes the duplication bug due to case sensivity in adding contacts [saganshul]
-
#610, #785 Add presence priority handling [w3host, jcbrand]
-
#610, #785 Add presence priority handling [w3host, jcbrand]
-
#620
`auto_away`
shouldn't change the user's status if it's set to
`dnd`
. [jcbrand]
-
#620
`auto_away`
shouldn't change the user's status if it's set to
`dnd`
. [jcbrand]
-
#694 The
`notification_option`
wasn't being used consistently. [jcbrand]
-
#694 The
`notification_option`
wasn't being used consistently. [jcbrand]
...
...
spec/controlbox.js
View file @
3dd6ff17
...
@@ -1087,6 +1087,34 @@
...
@@ -1087,6 +1087,34 @@
// XXX: Awaiting more tests, close it again for now...
// XXX: Awaiting more tests, close it again for now...
panel
.
$el
.
find
(
'
a.toggle-xmpp-contact-form
'
).
click
();
panel
.
$el
.
find
(
'
a.toggle-xmpp-contact-form
'
).
click
();
}));
}));
it
(
"
can be used to add contact and it checks for case-sensivity
"
,
mock
.
initConverse
(
function
(
_converse
)
{
spyOn
(
_converse
,
'
emit
'
);
spyOn
(
_converse
.
rosterview
,
'
update
'
).
andCallThrough
();
runs
(
function
()
{
test_utils
.
openControlBox
();
// Adding two contacts one with Capital initials and one with small initials of same JID (Case sensitive check)
_converse
.
roster
.
create
({
jid
:
mock
.
pend_names
[
0
].
replace
(
/ /g
,
'
.
'
).
toLowerCase
()
+
'
@localhost
'
,
subscription
:
'
none
'
,
ask
:
'
subscribe
'
,
fullname
:
mock
.
pend_names
[
0
]
});
_converse
.
roster
.
create
({
jid
:
mock
.
pend_names
[
0
].
replace
(
/ /g
,
'
.
'
)
+
'
@localhost
'
,
subscription
:
'
none
'
,
ask
:
'
subscribe
'
,
fullname
:
mock
.
pend_names
[
0
]
});
});
waits
(
300
);
runs
(
function
()
{
// Checking that only one entry is created because both JID is same (Case sensitive check)
expect
(
_converse
.
rosterview
.
$el
.
find
(
'
dd:visible
'
).
length
).
toBe
(
1
);
expect
(
_converse
.
rosterview
.
update
).
toHaveBeenCalled
();
});
}));
});
});
describe
(
"
The Controlbox Tabs
"
,
function
()
{
describe
(
"
The Controlbox Tabs
"
,
function
()
{
...
...
src/converse-core.js
View file @
3dd6ff17
...
@@ -778,7 +778,7 @@
...
@@ -778,7 +778,7 @@
initialize
:
function
(
attributes
)
{
initialize
:
function
(
attributes
)
{
var
jid
=
attributes
.
jid
;
var
jid
=
attributes
.
jid
;
var
bare_jid
=
Strophe
.
getBareJidFromJid
(
jid
);
var
bare_jid
=
Strophe
.
getBareJidFromJid
(
jid
)
.
toLowerCase
()
;
var
resource
=
Strophe
.
getResourceFromJid
(
jid
);
var
resource
=
Strophe
.
getResourceFromJid
(
jid
);
attributes
.
jid
=
bare_jid
;
attributes
.
jid
=
bare_jid
;
this
.
set
(
_
.
assignIn
({
this
.
set
(
_
.
assignIn
({
...
@@ -887,7 +887,7 @@
...
@@ -887,7 +887,7 @@
resources
[
resource
]
=
{
resources
[
resource
]
=
{
'
priority
'
:
priority
,
'
priority
'
:
priority
,
'
status
'
:
chat_status
,
'
status
'
:
chat_status
,
'
timestamp
'
:
timestamp
'
timestamp
'
:
timestamp
};
};
var
changed
=
{
'
resources
'
:
resources
};
var
changed
=
{
'
resources
'
:
resources
};
var
hpr
=
this
.
getHighestPriorityResource
();
var
hpr
=
this
.
getHighestPriorityResource
();
...
...
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