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
5341a1ea
Commit
5341a1ea
authored
Oct 19, 2020
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MUC: warn instead of error when we're no longer connected
parent
86c4853b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
src/headless/converse-muc.js
src/headless/converse-muc.js
+4
-4
No files found.
src/headless/converse-muc.js
View file @
5341a1ea
...
@@ -1814,18 +1814,18 @@ converse.plugins.add('converse-muc', {
...
@@ -1814,18 +1814,18 @@ converse.plugins.add('converse-muc', {
* @returns {Promise<boolean>}
* @returns {Promise<boolean>}
*/
*/
async
isJoined
()
{
async
isJoined
()
{
const
jid
=
this
.
get
(
'
jid
'
);
const
ping
=
$iq
({
const
ping
=
$iq
({
'
to
'
:
`
${
this
.
get
(
'
jid
'
)
}
/
${
this
.
get
(
'
nick
'
)}
`
,
'
to
'
:
`
${
jid
}
/
${
this
.
get
(
'
nick
'
)}
`
,
'
type
'
:
"
get
"
'
type
'
:
"
get
"
}).
c
(
"
ping
"
,
{
'
xmlns
'
:
Strophe
.
NS
.
PING
});
}).
c
(
"
ping
"
,
{
'
xmlns
'
:
Strophe
.
NS
.
PING
});
try
{
try
{
await
api
.
sendIQ
(
ping
);
await
api
.
sendIQ
(
ping
);
}
catch
(
e
)
{
}
catch
(
e
)
{
if
(
e
===
null
)
{
if
(
e
===
null
)
{
log
.
error
(
`Timeout error while checking whether we're joined to MUC:
${
this
.
get
(
'
jid
'
)
}
`
);
log
.
warn
(
`isJoined: Timeout error while checking whether we're joined to MUC:
${
jid
}
`
);
}
else
{
}
else
{
log
.
error
(
`Apparently we're no longer connected to MUC:
${
this
.
get
(
'
jid
'
)}
`
);
log
.
warn
(
`isJoined: Apparently we're no longer connected to MUC:
${
jid
}
`
);
log
.
error
(
e
);
}
}
return
false
;
return
false
;
}
}
...
...
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