diff --git a/profiles/profile.go b/profiles/profile.go index ab80e2d..60cda1c 100644 --- a/profiles/profile.go +++ b/profiles/profile.go @@ -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 diff --git a/textsecure.go b/textsecure.go index 8a41042..fb1c421 100644 --- a/textsecure.go +++ b/textsecure.go @@ -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()) } } @@ -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 } @@ -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 }