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
37e4ed6f
Commit
37e4ed6f
authored
Jan 29, 2018
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid false headline message positive for node-less MUC JIDs
parent
479d6570
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
4 deletions
+8
-4
src/converse-chatboxes.js
src/converse-chatboxes.js
+1
-1
src/converse-headline.js
src/converse-headline.js
+1
-1
src/converse-notification.js
src/converse-notification.js
+1
-1
src/utils.js
src/utils.js
+5
-1
No files found.
src/converse-chatboxes.js
View file @
37e4ed6f
...
...
@@ -272,7 +272,7 @@
Strophe
.
LogLevel
.
INFO
);
return
true
;
}
else
if
(
utils
.
isHeadlineMessage
(
message
))
{
}
else
if
(
utils
.
isHeadlineMessage
(
_converse
,
message
))
{
// XXX: Ideally we wouldn't have to check for headline
// messages, but Prosody sends headline messages with the
// wrong type ('chat'), so we need to filter them out here.
...
...
src/converse-headline.js
View file @
37e4ed6f
...
...
@@ -129,7 +129,7 @@
function
onHeadlineMessage
(
message
)
{
/* Handler method for all incoming messages of type "headline". */
const
from_jid
=
message
.
getAttribute
(
'
from
'
);
if
(
utils
.
isHeadlineMessage
(
message
))
{
if
(
utils
.
isHeadlineMessage
(
_converse
,
message
))
{
if
(
_
.
includes
(
from_jid
,
'
@
'
)
&&
!
_converse
.
allow_non_roster_messaging
)
{
return
;
}
...
...
src/converse-notification.js
View file @
37e4ed6f
...
...
@@ -93,7 +93,7 @@
return
false
;
}
else
if
(
message
.
getAttribute
(
'
type
'
)
===
'
groupchat
'
)
{
return
_converse
.
shouldNotifyOfGroupMessage
(
message
);
}
else
if
(
utils
.
isHeadlineMessage
(
message
))
{
}
else
if
(
utils
.
isHeadlineMessage
(
_converse
,
message
))
{
// We want to show notifications for headline messages.
return
_converse
.
isMessageToHiddenChat
(
message
);
}
...
...
src/utils.js
View file @
37e4ed6f
...
...
@@ -399,11 +399,15 @@
return
text
&&
!!
text
.
match
(
/^
\?
OTR/
);
};
u
.
isHeadlineMessage
=
function
(
message
)
{
u
.
isHeadlineMessage
=
function
(
_converse
,
message
)
{
var
from_jid
=
message
.
getAttribute
(
'
from
'
);
if
(
message
.
getAttribute
(
'
type
'
)
===
'
headline
'
)
{
return
true
;
}
const
chatbox
=
_converse
.
chatboxes
.
get
(
Strophe
.
getBareJidFromJid
(
from_jid
));
if
(
chatbox
&&
chatbox
.
get
(
'
type
'
)
===
'
chatroom
'
)
{
return
false
;
}
if
(
message
.
getAttribute
(
'
type
'
)
!==
'
error
'
&&
!
_
.
isNil
(
from_jid
)
&&
!
_
.
includes
(
from_jid
,
'
@
'
))
{
...
...
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