Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug at notification if message has no body #1184

Closed
genofire opened this issue Sep 8, 2018 · 2 comments

Comments

@genofire
Copy link
Contributor

commented Sep 8, 2018

if message.querySelector('body') is null

// TODO: we should suppress notifications if we cannot decrypt
// the message...
const body = sizzle(`encrypted[xmlns="${Strophe.NS.OMEMO}"]`, message).length ?
__('OMEMO Message received') :
message.querySelector('body').textContent;

@genofire

This comment has been minimized.

Copy link
Contributor Author

commented Sep 8, 2018

Happens if content of message is <event xmlns=\"http://jabber.org/protocol/pubsub#event\">

message
​
attributes: NamedNodeMap(4)
​​
0: xmlns="jabber:client"
​​
1: to="testconv@chat.sum7.eu/converse.js-119880259"
​​
2: from="testconv@chat.sum7.eu"
​​
3: type="headline"
​​
from: from="testconv@chat.sum7.eu"
​​
length: 4
​​
to: to="testconv@chat.sum7.eu/converse.js-119880259"
​​
type: type="headline"
​​
xmlns: xmlns="jabber:client"
​​
<prototype>: NamedNodeMapPrototype { getNamedItem: getNamedItem(), setNamedItem: setNamedItem(), removeNamedItem: removeNamedItem(), … }
​
baseURI: "https://chat.sum7.eu/"
​
childElementCount: 2
​
childNodes: NodeList [ event
, addresses
 ]
​
children: HTMLCollection [ event
, addresses
 ]
​
classList: DOMTokenList []
​
className: ""
​
clientHeight: 0
​
clientLeft: 0
​
clientTop: 0
​
clientWidth: 0
​
firstChild: <event xmlns="http://jabber.org/protocol/pubsub#event">
​
firstElementChild: <event xmlns="http://jabber.org/protocol/pubsub#event">
​
id: ""
​
innerHTML: "<event xmlns=\"http://jabber.org/protocol/pubsub#event\"><items node=\"eu.siacs.conversations.axolotl.bundles:5346\"><item id=\"60062BDDF05BA\"><bun...

@jcbrand jcbrand closed this in 989ce0f Sep 10, 2018

@jcbrand

This comment has been minimized.

Copy link
Member

commented Sep 10, 2018

Thanks for the good bug reports. Should be fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.