Skip to content

Commit

Permalink
Fix processing of unsupported messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
greyson-signal committed Aug 4, 2020
1 parent dda8808 commit 3664e6f
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,13 @@ private static PushProcessMessageJob.ExceptionMetadata toExceptionMetadata(@NonN
if (sender == null) throw new NoSenderException();

GroupId groupId = null;
try {
groupId = GroupUtil.idFromGroupContext(e.getGroup().orNull());
} catch (BadGroupIdException ex) {
Log.w(TAG, "Bad group id found in unsupported data message", ex);

if (e.getGroup().isPresent()) {
try {
groupId = GroupUtil.idFromGroupContext(e.getGroup().get());
} catch (BadGroupIdException ex) {
Log.w(TAG, "Bad group id found in unsupported data message", ex);
}
}

return new PushProcessMessageJob.ExceptionMetadata(sender,
Expand Down

0 comments on commit 3664e6f

Please sign in to comment.