Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elixxir
client
Commits
0f3adb84
Commit
0f3adb84
authored
2 years ago
by
Josh Brooks
Browse files
Options
Downloads
Patches
Plain Diff
Remove debug prints/structures
parent
e7a53435
No related branches found
No related tags found
2 merge requests
!510
Release
,
!388
Xx 4214/group message
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
groupChat/receive.go
+0
-12
0 additions, 12 deletions
groupChat/receive.go
groupChat/send.go
+0
-33
0 additions, 33 deletions
groupChat/send.go
with
0 additions
and
45 deletions
groupChat/receive.go
+
0
−
12
View file @
0f3adb84
...
...
@@ -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
(),
...
...
This diff is collapsed.
Click to expand it.
groupChat/send.go
+
0
−
33
View file @
0f3adb84
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment