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
0cf99037
Commit
0cf99037
authored
Jan 31, 2017
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix failing tests.
parent
9510bdc1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
29 deletions
+30
-29
spec/protocol.js
spec/protocol.js
+27
-27
src/converse-controlbox.js
src/converse-controlbox.js
+1
-1
src/converse-core.js
src/converse-core.js
+2
-1
No files found.
spec/protocol.js
View file @
0cf99037
...
@@ -25,33 +25,33 @@
...
@@ -25,33 +25,33 @@
});
});
/* Some level of integration between roster items and presence
/* Some level of integration between roster items and presence
* subscriptions is normally expected by an instant messaging user
* subscriptions is normally expected by an instant messaging user
* regarding the user's subscriptions to and from other contacts. This
* regarding the user's subscriptions to and from other contacts. This
* section describes the level of integration that MUST be supported
* section describes the level of integration that MUST be supported
* within an XMPP instant messaging applications.
* within an XMPP instant messaging applications.
*
*
* There are four primary subscription states:
* There are four primary subscription states:
*
*
* None -- the user does not have a subscription to the contact's
* None -- the user does not have a subscription to the contact's
* presence information, and the contact does not have a subscription
* presence information, and the contact does not have a subscription
* to the user's presence information
* to the user's presence information
* To -- the user has a subscription to the contact's presence
* To -- the user has a subscription to the contact's presence
* information, but the contact does not have a subscription to the
* information, but the contact does not have a subscription to the
* user's presence information
* user's presence information
* From -- the contact has a subscription to the user's presence
* From -- the contact has a subscription to the user's presence
* information, but the user does not have a subscription to the
* information, but the user does not have a subscription to the
* contact's presence information
* contact's presence information
* Both -- both the user and the contact have subscriptions to each
* Both -- both the user and the contact have subscriptions to each
* other's presence information (i.e., the union of 'from' and 'to')
* other's presence information (i.e., the union of 'from' and 'to')
*
*
* Each of these states is reflected in the roster of both the user and
* Each of these states is reflected in the roster of both the user and
* the contact, thus resulting in durable subscription states.
* the contact, thus resulting in durable subscription states.
*
*
* The 'from' and 'to' addresses are OPTIONAL in roster pushes; if
* The 'from' and 'to' addresses are OPTIONAL in roster pushes; if
* included, their values SHOULD be the full JID of the resource for
* included, their values SHOULD be the full JID of the resource for
* that session. A client MUST acknowledge each roster push with an IQ
* that session. A client MUST acknowledge each roster push with an IQ
* stanza of type "result".
* stanza of type "result".
*/
*/
it
(
"
Subscribe to contact, contact accepts and subscribes back
"
,
mock
.
initConverse
(
function
(
converse
)
{
it
(
"
Subscribe to contact, contact accepts and subscribes back
"
,
mock
.
initConverse
(
function
(
converse
)
{
/* The process by which a user subscribes to a contact, including
/* The process by which a user subscribes to a contact, including
* the interaction between roster items and subscription states.
* the interaction between roster items and subscription states.
...
...
src/converse-controlbox.js
View file @
0cf99037
...
@@ -303,7 +303,7 @@
...
@@ -303,7 +303,7 @@
close
:
function
(
ev
)
{
close
:
function
(
ev
)
{
if
(
ev
&&
ev
.
preventDefault
)
{
ev
.
preventDefault
();
}
if
(
ev
&&
ev
.
preventDefault
)
{
ev
.
preventDefault
();
}
if
(
converse
.
connection
.
connected
)
{
if
(
converse
.
connection
.
connected
&&
!
converse
.
connection
.
disconnecting
)
{
this
.
model
.
save
({
'
closed
'
:
true
});
this
.
model
.
save
({
'
closed
'
:
true
});
}
else
{
}
else
{
this
.
model
.
trigger
(
'
hide
'
);
this
.
model
.
trigger
(
'
hide
'
);
...
...
src/converse-core.js
View file @
0cf99037
...
@@ -140,6 +140,7 @@
...
@@ -140,6 +140,7 @@
// out or disconnecting in the previous session.
// out or disconnecting in the previous session.
// This happens in tests.
// This happens in tests.
// We therefore first clean up.
// We therefore first clean up.
converse
.
connection
.
reset
();
converse
.
_tearDown
();
converse
.
_tearDown
();
}
}
...
@@ -541,11 +542,11 @@
...
@@ -541,11 +542,11 @@
};
};
this
.
logOut
=
function
()
{
this
.
logOut
=
function
()
{
converse
.
chatboxviews
.
closeAllChatBoxes
();
converse
.
setDisconnectionCause
(
converse
.
LOGOUT
,
undefined
,
true
);
converse
.
setDisconnectionCause
(
converse
.
LOGOUT
,
undefined
,
true
);
if
(
typeof
converse
.
connection
!==
'
undefined
'
)
{
if
(
typeof
converse
.
connection
!==
'
undefined
'
)
{
converse
.
connection
.
disconnect
();
converse
.
connection
.
disconnect
();
}
}
converse
.
chatboxviews
.
closeAllChatBoxes
();
converse
.
clearSession
();
converse
.
clearSession
();
converse
.
_tearDown
();
converse
.
_tearDown
();
converse
.
emit
(
'
logout
'
);
converse
.
emit
(
'
logout
'
);
...
...
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