Caution around group avatars.

pull/1/head
Matthew Chen 7 years ago
parent 73f5d9237d
commit 46b0cdb872

@ -1153,7 +1153,9 @@ NS_ASSUME_NONNULL_BEGIN
[message updateWithSendingToSingleGroupRecipient:envelope.source transaction:transaction];
if (gThread.groupModel.groupImage) {
NSData *data = UIImagePNGRepresentation(gThread.groupModel.groupImage);
NSData *_Nullable data = UIImagePNGRepresentation(gThread.groupModel.groupImage);
OWSAssertDebug(data);
if (data) {
DataSource *_Nullable dataSource = [DataSourceValue dataSourceWithData:data fileExtension:@"png"];
[self.messageSenderJobQueue addMediaMessage:message
dataSource:dataSource
@ -1162,7 +1164,7 @@ NS_ASSUME_NONNULL_BEGIN
caption:nil
albumMessageId:nil
isTemporaryAttachment:YES];
}
} else {
[self.messageSenderJobQueue addMessage:message transaction:transaction];
}

Loading…
Cancel
Save