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
5a2d361c
Commit
5a2d361c
authored
Oct 23, 2020
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #2293: Message carbons not re-enabled when reconnecting
parent
476bcfe7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
src/converse-muc-views.js
src/converse-muc-views.js
+0
-1
src/headless/converse-carbons.js
src/headless/converse-carbons.js
+7
-3
No files found.
src/converse-muc-views.js
View file @
5a2d361c
...
...
@@ -744,7 +744,6 @@ export const ChatRoomView = ChatBoxView.extend({
* @method _converse.ChatRoomView#hideOccupants
*/
hideOccupants
(
ev
)
{
debugger
;
if
(
ev
)
{
ev
.
preventDefault
();
ev
.
stopPropagation
();
...
...
src/headless/converse-carbons.js
View file @
5a2d361c
...
...
@@ -13,7 +13,10 @@ import { _converse, api, converse } from "./converse-core";
/* Ask the XMPP server to enable Message Carbons
* See XEP-0280 https://xmpp.org/extensions/xep-0280.html#enabling
*/
function
enableCarbons
()
{
function
enableCarbons
(
reconnecting
)
{
if
(
reconnecting
)
{
_converse
.
session
?.
set
({
'
carbons_enabled
'
:
false
})
}
if
(
!
api
.
settings
.
get
(
"
message_carbons
"
)
||
_converse
.
session
?.
get
(
'
carbons_enabled
'
))
{
return
;
}
...
...
@@ -28,9 +31,10 @@ function enableCarbons () {
if
(
iq
.
querySelectorAll
(
'
error
'
).
length
>
0
)
{
log
.
warn
(
'
An error occurred while trying to enable message carbons.
'
);
}
else
{
_converse
.
session
.
s
ave
({
'
carbons_enabled
'
:
true
});
_converse
.
session
.
s
et
({
'
carbons_enabled
'
:
true
});
log
.
debug
(
'
Message carbons have been enabled.
'
);
}
_converse
.
session
.
save
();
// Gather multiple sets into one save
},
null
,
"
iq
"
,
null
,
"
enablecarbons
"
);
_converse
.
connection
.
send
(
carbons_iq
);
}
...
...
@@ -43,6 +47,6 @@ converse.plugins.add('converse-carbons', {
message_carbons
:
true
});
api
.
listen
.
on
(
'
afterResourceBinding
'
,
()
=>
enableCarbons
()
);
api
.
listen
.
on
(
'
afterResourceBinding
'
,
enableCarbons
);
}
});
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