Rename some protos.

This commit is contained in:
Greyson Parrelli
2023-07-13 13:08:07 -04:00
committed by Nicholas Tinsley
parent 1af50ba0f5
commit 8fc1065dd6
24 changed files with 177 additions and 184 deletions

View File

@@ -4529,7 +4529,7 @@ open class MessageTable(context: Context?, databaseHelper: SignalDatabase) : Dat
}
fun setTimestampReadFromSyncMessageProto(readMessages: List<SyncMessage.Read>, proposedExpireStarted: Long, threadToLatestRead: MutableMap<Long, Long>): Collection<SyncMessageId> {
val reads: List<ReadMessage> = readMessages.map { r -> ReadMessage(ServiceId.parseOrThrow(r.senderUuid), r.timestamp) }
val reads: List<ReadMessage> = readMessages.map { r -> ReadMessage(ServiceId.parseOrThrow(r.senderAci), r.timestamp) }
return setTimestampReadFromSyncMessage(reads, proposedExpireStarted, threadToLatestRead)
}

View File

@@ -57,7 +57,7 @@ public class PushTable extends DatabaseTable {
} else {
ContentValues values = new ContentValues();
values.put(TYPE, envelope.getType());
values.put(SOURCE_UUID, envelope.getSourceUuid().orElse(null));
values.put(SOURCE_UUID, envelope.getSourceServiceId().orElse(null));
values.put(DEVICE_ID, envelope.getSourceDevice());
values.put(CONTENT, envelope.hasContent() ? Base64.encodeBytes(envelope.getContent()) : "");
values.put(TIMESTAMP, envelope.getTimestamp());
@@ -132,7 +132,7 @@ public class PushTable extends DatabaseTable {
String.valueOf(envelope.getSourceDevice()),
envelope.hasContent() ? Base64.encodeBytes(envelope.getContent()) : "",
String.valueOf(envelope.getTimestamp()),
String.valueOf(envelope.getSourceUuid().orElse(null)) };
String.valueOf(envelope.getSourceServiceId().orElse(null)) };
try (Cursor cursor = database.query(TABLE_NAME, null, query, args, null, null, null)) {

View File

@@ -87,7 +87,7 @@ data class SentStorySyncManifest(
fun fromRecipientsSet(recipients: List<SignalServiceProtos.SyncMessage.Sent.StoryMessageRecipient>): SentStorySyncManifest {
val entries = recipients.toSet().map { recipient ->
Entry(
recipientId = RecipientId.from(ServiceId.parseOrThrow(recipient.destinationUuid)),
recipientId = RecipientId.from(ServiceId.parseOrThrow(recipient.destinationServiceId)),
allowedToReply = recipient.isAllowedToReply,
distributionLists = recipient.distributionListIdsList.map { DistributionId.from(it) }
)