Skip to content

Commit

Permalink
signalmeow/groups: remove unused functions and use structured logging
Browse files Browse the repository at this point in the history
Signed-off-by: Sumner Evans <[email protected]>
  • Loading branch information
sumnerevans committed Dec 30, 2023
1 parent 2fbacea commit 3d6a2c7
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions pkg/signalmeow/groups.go
Original file line number Diff line number Diff line change
Expand Up @@ -362,26 +362,6 @@ func decryptGroupAvatar(encryptedAvatar []byte, groupMasterKey SerializedGroupMa
return decryptedImage, nil
}

func printGroupMember(member *GroupMember) {
if member == nil {
zlog.Debug().Msg("GroupMember is nil")
return
}
zlog.Debug().Msgf("UserID: %v", member.UserID)
zlog.Debug().Msgf("ProfileKey: %v", member.ProfileKey)
zlog.Debug().Msgf("Role: %v", member.Role)
zlog.Debug().Msgf("JoinedAtRevision: %v", member.JoinedAtRevision)
}
func printGroup(group *Group) {
zlog.Debug().Msgf("GroupIdentifier: %v", group.GroupIdentifier)
zlog.Debug().Msgf("Title: %v", group.Title)
zlog.Debug().Msgf("AvatarPath: %v", group.AvatarPath)
zlog.Debug().Msgf("Members len: %v", len(group.Members))
for _, member := range group.Members {
printGroupMember(member)
}
}

func groupMetadataForDataMessage(group Group) *signalpb.GroupContextV2 {
masterKey := masterKeyToBytes(group.groupMasterKey)
masterKeyBytes := masterKey[:]
Expand Down Expand Up @@ -460,7 +440,7 @@ func fetchAndDecryptGroupAvatarImage(d *Device, path string, masterKey Serialize
Username: &username,
Password: &password,
}
zlog.Info().Msgf("Fetching group avatar from %v", path)
zlog.Info().Str("avatar_path", path).Msg("Fetching group avatar")
resp, err := web.SendHTTPRequest("GET", path, opts)
if err != nil {
zlog.Err(err).Msg("error fetching group avatar")
Expand Down

0 comments on commit 3d6a2c7

Please sign in to comment.