Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion groupsv2/groupsv2.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ func HandleGroupsV2(src string, dm *signalservice.DataMessage) (*GroupV2, error)
log.Errorln("[textsecure][groupsv2] signature verification failed", err)
return nil, err
}
log.Debugln("[textsecure][groupsv2] signature verification succesful")
log.Debugln("[textsecure][groupsv2] signature verification successful")
}
}

Expand Down
23 changes: 10 additions & 13 deletions profiles/profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,21 +141,18 @@ type Profile struct {
func GetProfile(UUID string, profileKey []byte) (*Profile, error) {
resp, err := transport.Transport.Get(fmt.Sprintf(PROFILE_PATH, UUID))
profile := &Profile{}

dec := json.NewDecoder(resp.Body)
err = dec.Decode(&profile)
if err != nil {
log.Debugln("[textsecure] GetProfile", err)
return nil, err
} else {
if err == nil {
dec := json.NewDecoder(resp.Body)
err = dec.Decode(&profile)
}
if err == nil {
err = decryptProfile(profileKey, profile)
if err != nil {
log.Debugln("[textsecure] ", err)
return nil, err
}
}
return profile, nil

if err == nil {
return profile, nil
}
log.Debugln("[textsecure] GetProfile", err)
return nil, err
}
func GetProfileAndCredential(UUID string, profileKey []byte) (*Profile, error) {
log.Infoln("[textsecure] GetProfileAndCredential")
Expand Down