Skip to content

Commit 10a0888

Browse files
committed
fix: change lastProfileUpdate from ms to seconds
1 parent ba7a7b7 commit 10a0888

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

protos/SignalService.proto

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,9 @@ message DataMessage {
203203
/**
204204
* The timestamp of the last profile update.
205205
* This is used to prioritize the correct profile info based on multiple and outdated incoming messages.
206-
Note: this is in milliseconds.
206+
* Note: this is in seconds.
207207
*/
208-
optional uint64 lastProfileUpdateMs = 3;
208+
optional uint64 lastProfileUpdateSeconds = 3;
209209
}
210210

211211
message OpenGroupInvitation {

ts/receiver/contentMessage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -809,7 +809,7 @@ async function handleMessageRequestResponse(
809809
profileUrl: messageRequestResponse.profile.profilePicture,
810810
profileKey: messageRequestResponse.profileKey,
811811
profileUpdatedAtSeconds: new Timestamp({
812-
value: longOrNumberToNumber(messageRequestResponse.profile.lastProfileUpdateMs ?? 0),
812+
value: longOrNumberToNumber(messageRequestResponse.profile.lastProfileUpdateSeconds ?? 0),
813813
}).seconds(),
814814
});
815815
}

ts/receiver/dataMessage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ export async function handleSwarmDataMessage({
235235
profileUrl: cleanDataMessage.profile.profilePicture,
236236
profileKey: cleanDataMessage.profileKey,
237237
profileUpdatedAtSeconds: new Timestamp({
238-
value: cleanDataMessage.profile.lastProfileUpdateMs ?? 0,
238+
value: cleanDataMessage.profile.lastProfileUpdateSeconds ?? 0,
239239
}).seconds(),
240240
});
241241
}

ts/receiver/queuedJob.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ export async function handleMessageJob(
520520
profileUrl: regularDataMessage.profile.profilePicture,
521521
profileKey: regularDataMessage.profileKey,
522522
profileUpdatedAtSeconds: new Timestamp({
523-
value: regularDataMessage.profile.lastProfileUpdateMs ?? 0,
523+
value: regularDataMessage.profile.lastProfileUpdateSeconds ?? 0,
524524
}).seconds(),
525525
});
526526
}

ts/types/message/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ class OutgoingUserProfile {
150150
if (this.displayName) {
151151
profile.displayName = this.displayName;
152152
}
153-
profile.lastProfileUpdateMs = this.lastProfileUpdateTs.ms();
153+
profile.lastProfileUpdateSeconds = this.lastProfileUpdateTs.seconds();
154154

155155
const picDetails = this.toProfilePicture();
156156
if (picDetails.url && picDetails.key) {

0 commit comments

Comments
 (0)