mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-25 09:17:44 +00:00
parent
5d341e175d
commit
d9ff5b00b7
@ -57,17 +57,21 @@ public class PushGroupUpdateJob extends ContextJob implements InjectableType {
|
|||||||
SignalServiceMessageSender messageSender = messageSenderFactory.create();
|
SignalServiceMessageSender messageSender = messageSenderFactory.create();
|
||||||
GroupDatabase groupDatabase = DatabaseFactory.getGroupDatabase(context);
|
GroupDatabase groupDatabase = DatabaseFactory.getGroupDatabase(context);
|
||||||
GroupRecord record = groupDatabase.getGroup(groupId);
|
GroupRecord record = groupDatabase.getGroup(groupId);
|
||||||
|
SignalServiceAttachment avatar = null;
|
||||||
|
|
||||||
if (record == null) {
|
if (record == null) {
|
||||||
Log.w(TAG, "No information for group record info request: " + new String(groupId));
|
Log.w(TAG, "No information for group record info request: " + new String(groupId));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
SignalServiceAttachment avatar = SignalServiceAttachmentStream.newStreamBuilder()
|
if (record.getAvatar() != null) {
|
||||||
.withContentType("image/jpeg")
|
avatar = SignalServiceAttachmentStream.newStreamBuilder()
|
||||||
.withStream(new ByteArrayInputStream(record.getAvatar()))
|
.withContentType("image/jpeg")
|
||||||
.withLength(record.getAvatar().length)
|
.withStream(new ByteArrayInputStream(record.getAvatar()))
|
||||||
.build();
|
.withLength(record.getAvatar().length)
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
SignalServiceGroup groupContext = SignalServiceGroup.newBuilder(Type.UPDATE)
|
SignalServiceGroup groupContext = SignalServiceGroup.newBuilder(Type.UPDATE)
|
||||||
.withAvatar(avatar)
|
.withAvatar(avatar)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user