Merge pull request #559 from BeaudanBrown/mention-bug

Check against null message body when detecting mentions
pull/564/head
Beaudan Campbell-Brown 6 years ago committed by GitHub
commit 6eef0b6d6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1971,7 +1971,10 @@
} else {
const ourNumber = textsecure.storage.user.getNumber();
if (message.attributes.body.indexOf(`@${ourNumber}`) !== -1) {
if (
message.attributes.body &&
message.attributes.body.indexOf(`@${ourNumber}`) !== -1
) {
conversation.set({ mentionedUs: true });
}

Loading…
Cancel
Save