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
ab9b2d64
Commit
ab9b2d64
authored
Sep 16, 2019
by
laszlovl
Committed by
JC Brand
Sep 16, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix incorrectly detecting every message with a duplicate ID as correction
parent
1a2de997
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
CHANGES.md
CHANGES.md
+5
-0
src/headless/converse-chatboxes.js
src/headless/converse-chatboxes.js
+3
-2
No files found.
CHANGES.md
View file @
ab9b2d64
# Changelog
# Changelog
## 5.0.4
-
Bugfix: Don't treat every duplicate message ID as a message correction; since some
clients don't use globally unique ID's this causes false positives.
## 5.0.3 (2019-09-13)
## 5.0.3 (2019-09-13)
-
Emit
`chatBoxFocused`
and
`chatBoxBlurred`
events for emoji picker input
-
Emit
`chatBoxFocused`
and
`chatBoxBlurred`
events for emoji picker input
...
...
src/headless/converse-chatboxes.js
View file @
ab9b2d64
...
@@ -549,10 +549,10 @@ converse.plugins.add('converse-chatboxes', {
...
@@ -549,10 +549,10 @@ converse.plugins.add('converse-chatboxes', {
* {@link _converse.ChatBox.getMessageAttributesFromStanza}
* {@link _converse.ChatBox.getMessageAttributesFromStanza}
*/
*/
correctMessage
(
attrs
)
{
correctMessage
(
attrs
)
{
if
(
!
attrs
.
msg
id
||
!
attrs
.
from
)
{
if
(
!
attrs
.
replaced_
id
||
!
attrs
.
from
)
{
return
;
return
;
}
}
const
message
=
this
.
messages
.
findWhere
({
'
msgid
'
:
attrs
.
msg
id
,
'
from
'
:
attrs
.
from
});
const
message
=
this
.
messages
.
findWhere
({
'
msgid
'
:
attrs
.
replaced_
id
,
'
from
'
:
attrs
.
from
});
if
(
!
message
)
{
if
(
!
message
)
{
return
;
return
;
}
}
...
@@ -969,6 +969,7 @@ converse.plugins.add('converse-chatboxes', {
...
@@ -969,6 +969,7 @@ converse.plugins.add('converse-chatboxes', {
'
is_spoiler
'
:
!!
spoiler
,
'
is_spoiler
'
:
!!
spoiler
,
'
message
'
:
text
,
'
message
'
:
text
,
'
msgid
'
:
msgid
,
'
msgid
'
:
msgid
,
'
replaced_id
'
:
replaced_id
,
'
references
'
:
this
.
getReferencesFromStanza
(
stanza
),
'
references
'
:
this
.
getReferencesFromStanza
(
stanza
),
'
subject
'
:
_
.
propertyOf
(
stanza
.
querySelector
(
'
subject
'
))(
'
textContent
'
),
'
subject
'
:
_
.
propertyOf
(
stanza
.
querySelector
(
'
subject
'
))(
'
textContent
'
),
'
thread
'
:
_
.
propertyOf
(
stanza
.
querySelector
(
'
thread
'
))(
'
textContent
'
),
'
thread
'
:
_
.
propertyOf
(
stanza
.
querySelector
(
'
thread
'
))(
'
textContent
'
),
...
...
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