Fix missing message ID & update for core changes

This commit is contained in:
Niels Andriesse 2019-08-09 10:11:30 +10:00
parent d8ae307671
commit 717a28a446
2 changed files with 4 additions and 5 deletions

View File

@ -255,8 +255,7 @@ public class PushGroupSendJob extends PushSendJob implements InjectableType {
.asGroupMessage(group) .asGroupMessage(group)
.build(); .build();
// TODO: Message ID return messageSender.sendMessage(messageId, addresses, unidentifiedAccess, groupDataMessage);
return messageSender.sendMessage(0, addresses, unidentifiedAccess, groupDataMessage);
} else { } else {
SignalServiceGroup group = new SignalServiceGroup(GroupUtil.getDecodedId(groupId)); SignalServiceGroup group = new SignalServiceGroup(GroupUtil.getDecodedId(groupId));
SignalServiceDataMessage groupMessage = SignalServiceDataMessage.newBuilder() SignalServiceDataMessage groupMessage = SignalServiceDataMessage.newBuilder()
@ -273,8 +272,7 @@ public class PushGroupSendJob extends PushSendJob implements InjectableType {
.withPreviews(previews) .withPreviews(previews)
.build(); .build();
// TODO: Message ID return messageSender.sendMessage(messageId, addresses, unidentifiedAccess, groupMessage);
return messageSender.sendMessage(0, addresses, unidentifiedAccess, groupMessage);
} }
} }

View File

@ -83,7 +83,8 @@ class LokiAPIDatabase(context: Context, helper: SQLCipherOpenHelper) : Database(
return TextSecurePreferences.getProfileName(context) return TextSecurePreferences.getProfileName(context)
} }
override fun setMessageID(signalID: Long, lokiID: Long) { override fun updateMessageIDIfNeeded(signalID: Long, lokiID: Long) {
if (signalID == lokiID) return
DatabaseFactory.getMmsDatabase(context).updateMessageID(signalID, lokiID) DatabaseFactory.getMmsDatabase(context).updateMessageID(signalID, lokiID)
} }
} }