Skip to content
Snippets Groups Projects
Commit 0f3adb84 authored by Josh Brooks's avatar Josh Brooks
Browse files

Remove debug prints/structures

parent e7a53435
No related branches found
No related tags found
2 merge requests!510Release,!388Xx 4214/group message
......@@ -8,8 +8,6 @@
package groupChat
import (
"encoding/base64"
"encoding/json"
"fmt"
"gitlab.com/xx_network/primitives/netTime"
"time"
......@@ -115,16 +113,6 @@ func decryptMessage(g gs.Group, fingerprint format.Fingerprint,
return MessageReceive{}, errors.Errorf(unmarshalSenderIdErr, err)
}
mar, _ := json.Marshal(NewPublicInternalMessage_DeleteThis(intlMsg))
jww.INFO.Printf("GROUP MSG ID DEBUG (decryptMsg): "+
"senders group ID: %s\n, "+
"internalMessage marshal: %s\n"+
"internalMessage json: %s\n",
g.ID,
base64.StdEncoding.EncodeToString(intlMsg.Marshal()),
string(mar))
return MessageReceive{
ID: group.NewMessageID(g.ID, intlMsg.Marshal()),
Payload: intlMsg.GetPayload(),
......
......@@ -8,8 +8,6 @@
package groupChat
import (
"encoding/base64"
"encoding/json"
"github.com/pkg/errors"
jww "github.com/spf13/jwalterweatherman"
"gitlab.com/elixxir/client/cmix"
......@@ -117,16 +115,6 @@ func (m *manager) newMessages(g gs.Group, tag string, msg []byte,
internalMessagePayload := setInternalPayload(intlMsg, timestamp,
m.getReceptionIdentity().ID, msg)
mar, _ := json.Marshal(NewPublicInternalMessage_DeleteThis(intlMsg))
jww.INFO.Printf("GROUP MSG ID DEBUG (newCmixMsg):"+
"senders group ID: %s\n, "+
"internalMessage marshal: %s\n"+
"internalMessage json: %s\n",
g.ID,
base64.StdEncoding.EncodeToString(internalMessagePayload),
string(mar))
// Create cMix messages
for _, member := range g.Members {
// Do not send to the sender
......@@ -197,27 +185,6 @@ func newCmixMsg(g gs.Group, tag string, timestamp time.Time,
return cmixMsg, nil
}
// PublicInternalMessage_DeleteThis so internalMsg could be json marshalled for legibility
// in a debug ticket.
type PublicInternalMessage_DeleteThis struct {
Data []byte // Serial of all the parts of the message
Timestamp []byte // 64-bit Unix time timestamp stored in nanoseconds
SenderID []byte // 264-bit sender ID
Size []byte // Size of the payload
Payload []byte // Message contents
}
func NewPublicInternalMessage_DeleteThis(msg internalMsg) *PublicInternalMessage_DeleteThis {
return &PublicInternalMessage_DeleteThis{
Data: msg.data,
Timestamp: msg.timestamp,
SenderID: msg.senderID,
Size: msg.size,
Payload: msg.payload,
}
}
// newSalt generates a new salt of the specified size.
func newSalt(rng io.Reader) ([group.SaltLen]byte, error) {
var salt [group.SaltLen]byte
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment