Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
use server timestamps
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Aug 31, 2022
1 parent 436ed84 commit 1e49055
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions profiles/profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ func GetProfileE164(tel string) (contacts.Contact, error) {

// GetProfileUUID get a profile by a phone number
func GetProfileUUID(uuid string) (*Profile, error) {
log.Debug("[textsecure] GetProfileUUID", uuid)
c := contacts.Contacts[uuid]
profile := &Profile{}
var err error
Expand Down
6 changes: 3 additions & 3 deletions textsecure.go
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ func registerDevice() error {

func handleReceipt(env *signalservice.Envelope) {
if client.ReceiptHandler != nil {
client.ReceiptHandler(env.GetSourceUuid(), env.GetSourceDevice(), env.GetTimestamp())
client.ReceiptHandler(env.GetSourceUuid(), env.GetSourceDevice(), env.GetServerTimestamp())
}
}

Expand Down Expand Up @@ -594,7 +594,7 @@ func handleReceivedMessage(env *signalservice.Envelope) error {
return err
}
b = stripPadding(b)
err = handleMessage(env.GetSourceUuid(), env.GetSourceUuid(), env.GetTimestamp(), b)
err = handleMessage(env.GetSourceUuid(), env.GetSourceUuid(), env.GetServerTimestamp(), b)
if err != nil {
return err
}
Expand Down Expand Up @@ -622,7 +622,7 @@ func handleReceivedMessage(env *signalservice.Envelope) error {
return err
}
b = stripPadding(b)
err = handleMessage(env.GetSourceUuid(), env.GetSourceUuid(), env.GetTimestamp(), b)
err = handleMessage(env.GetSourceUuid(), env.GetSourceUuid(), env.GetServerTimestamp(), b)
if err != nil {
return err
}
Expand Down

0 comments on commit 1e49055

Please sign in to comment.