mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 08:47:46 +00:00
Send/receive expiration times for group updates.
This particularly helps with the bug where people who were newly added to a group wouldn't receive an expiration timer until the first message was sent.
This commit is contained in:
parent
20cc6f4d0e
commit
b5d4cac90a
@ -380,9 +380,14 @@ public class PushDecryptJob extends ContextJob {
|
||||
private void handleGroupMessage(@NonNull SignalServiceEnvelope envelope,
|
||||
@NonNull SignalServiceDataMessage message,
|
||||
@NonNull Optional<Long> smsMessageId)
|
||||
throws MmsException
|
||||
{
|
||||
GroupMessageProcessor.process(context, envelope, message, false);
|
||||
|
||||
if (message.getExpiresInSeconds() != 0 && message.getExpiresInSeconds() != getMessageDestination(envelope, message).getExpireMessages()) {
|
||||
handleExpirationUpdate(envelope, message, Optional.absent());
|
||||
}
|
||||
|
||||
if (smsMessageId.isPresent()) {
|
||||
DatabaseFactory.getSmsDatabase(context).deleteMessage(smsMessageId.get());
|
||||
}
|
||||
|
@ -168,6 +168,7 @@ public class PushGroupSendJob extends PushSendJob implements InjectableType {
|
||||
SignalServiceGroup group = new SignalServiceGroup(type, GroupUtil.getDecodedId(groupId), groupContext.getName(), groupContext.getMembersList(), avatar);
|
||||
SignalServiceDataMessage groupDataMessage = SignalServiceDataMessage.newBuilder()
|
||||
.withTimestamp(message.getSentTimeMillis())
|
||||
.withExpiration(message.getRecipient().getExpireMessages())
|
||||
.asGroupMessage(group)
|
||||
.build();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user