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
c46d937e
Commit
c46d937e
authored
Nov 18, 2018
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix null check
parent
67958bba
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
dist/converse.js
dist/converse.js
+6
-4
src/headless/converse-muc.js
src/headless/converse-muc.js
+2
-2
No files found.
dist/converse.js
View file @
c46d937e
...
...
@@ -65432,11 +65432,13 @@ _converse_core__WEBPACK_IMPORTED_MODULE_2__["default"].plugins.add('converse-mam
this.clearSpinner();
_.each(messages, message_handler);
},
()
=> {
},
e
=> {
// Error
this.clearSpinner();
_converse.log("Error or timeout while trying to fetch " + "archived messages", Strophe.LogLevel.ERROR);
_converse.log(e, Strophe.LogLevel.ERROR);
});
}, () => {
// Error
...
...
@@ -66911,9 +66913,9 @@ _converse_core__WEBPACK_IMPORTED_MODULE_6__["default"].plugins.add('converse-muc
*/
this.fetchFeaturesIfConfigurationChanged(stanza);
const original_stanza = stanza,
forwarded = s
tanza.querySelector('forwarded'
);
forwarded = s
izzle(`forwarded[xmlns="${Strophe.NS.FORWARD}"]`, stanza).pop(
);
if (
!_.isNull(forwarded)
) {
if (
forwarded
) {
stanza = forwarded.querySelector('message');
}
...
...
@@ -66944,7 +66946,7 @@ _converse_core__WEBPACK_IMPORTED_MODULE_6__["default"].plugins.add('converse-muc
const msg = await this.createMessage(stanza, original_stanza);
if (
!_.isNull(forwarded)
&& msg && msg.get('sender') === 'me') {
if (
forwarded
&& msg && msg.get('sender') === 'me') {
msg.save({
'received': moment().format()
});
src/headless/converse-muc.js
View file @
c46d937e
...
...
@@ -955,7 +955,7 @@ converse.plugins.add('converse-muc', {
const
original_stanza
=
stanza
,
forwarded
=
sizzle
(
`forwarded[xmlns="
${
Strophe
.
NS
.
FORWARD
}
"]`
,
stanza
).
pop
();
if
(
!
_
.
isNull
(
forwarded
)
)
{
if
(
forwarded
)
{
stanza
=
forwarded
.
querySelector
(
'
message
'
);
}
if
(
this
.
isDuplicate
(
stanza
))
{
...
...
@@ -975,7 +975,7 @@ converse.plugins.add('converse-muc', {
u
.
safeSave
(
this
,
{
'
subject
'
:
{
'
author
'
:
sender
,
'
text
'
:
subject
}});
}
const
msg
=
await
this
.
createMessage
(
stanza
,
original_stanza
);
if
(
!
_
.
isNull
(
forwarded
)
&&
msg
&&
msg
.
get
(
'
sender
'
)
===
'
me
'
)
{
if
(
forwarded
&&
msg
&&
msg
.
get
(
'
sender
'
)
===
'
me
'
)
{
msg
.
save
({
'
received
'
:
moment
().
format
()});
}
this
.
incrementUnreadMsgCounter
(
msg
);
...
...
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