Skip to content

Commit

Permalink
Merge pull request #559 from BeaudanBrown/mention-bug
Browse files Browse the repository at this point in the history
Check against null message body when detecting mentions
  • Loading branch information
Beaudan Campbell-Brown committed Oct 15, 2019
2 parents 9c7168d + 29e83ca commit 6eef0b6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion js/models/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
}

Expand Down

0 comments on commit 6eef0b6

Please sign in to comment.