use of org.thoughtcrime.securesms.messages.MessageContentProcessor.ExceptionMetadata in project Signal-Android by WhisperSystems.
the class MessageDecryptionUtil method toExceptionMetadata.
private static ExceptionMetadata toExceptionMetadata(@NonNull UnsupportedDataMessageException e) throws NoSenderException {
String sender = e.getSender();
if (sender == null)
throw new NoSenderException();
GroupId groupId = null;
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 ExceptionMetadata(sender, e.getSenderDevice(), groupId);
}
use of org.thoughtcrime.securesms.messages.MessageContentProcessor.ExceptionMetadata in project Signal-Android by signalapp.
the class MessageDecryptionUtil method toExceptionMetadata.
private static ExceptionMetadata toExceptionMetadata(@NonNull UnsupportedDataMessageException e) throws NoSenderException {
String sender = e.getSender();
if (sender == null)
throw new NoSenderException();
GroupId groupId = null;
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 ExceptionMetadata(sender, e.getSenderDevice(), groupId);
}
Aggregations