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
Automate
Agent sessions
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elixxir
client
Commits
2463bcee
Commit
2463bcee
authored
Oct 15, 2021
by
Jonah Husson
Browse files
Options
Downloads
Plain Diff
Merge branch 'jonah/lookup-username' into 'release'
Jonah/lookup username See merge request
!48
parents
5441ce21
a4964988
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!53
Release
,
!48
Jonah/lookup username
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
ud/lookup.go
+8
-0
8 additions, 0 deletions
ud/lookup.go
ud/udMessages.pb.go
+27
-19
27 additions, 19 deletions
ud/udMessages.pb.go
ud/udMessages.proto
+1
-0
1 addition, 0 deletions
ud/udMessages.proto
with
36 additions
and
19 deletions
ud/lookup.go
+
8
−
0
View file @
2463bcee
...
...
@@ -5,6 +5,7 @@ import (
"github.com/pkg/errors"
jww
"github.com/spf13/jwalterweatherman"
"gitlab.com/elixxir/crypto/contact"
"gitlab.com/elixxir/primitives/fact"
"gitlab.com/xx_network/primitives/id"
"time"
)
...
...
@@ -77,5 +78,12 @@ func (m *Manager) lookupResponseProcess(uid *id.ID, callback lookupCallback,
DhPubKey
:
m
.
grp
.
NewIntFromBytes
(
lookupResponse
.
PubKey
),
}
if
lookupResponse
.
Username
!=
""
{
c
.
Facts
=
fact
.
FactList
{{
Fact
:
lookupResponse
.
Username
,
T
:
fact
.
Username
,
}}
}
go
callback
(
c
,
nil
)
}
This diff is collapsed.
Click to expand it.
ud/udMessages.pb.go
+
27
−
19
View file @
2463bcee
...
...
@@ -266,6 +266,7 @@ func (m *LookupSend) GetUserID() []byte {
// Message sent from UDB for looking up a user
type
LookupResponse
struct
{
PubKey
[]
byte
`protobuf:"bytes,1,opt,name=pubKey,proto3" json:"pubKey,omitempty"`
Username
string
`protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
Error
string
`protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
...
...
@@ -304,6 +305,13 @@ func (m *LookupResponse) GetPubKey() []byte {
return
nil
}
func
(
m
*
LookupResponse
)
GetUsername
()
string
{
if
m
!=
nil
{
return
m
.
Username
}
return
""
}
func
(
m
*
LookupResponse
)
GetError
()
string
{
if
m
!=
nil
{
return
m
.
Error
...
...
@@ -325,23 +333,23 @@ func init() {
}
var
fileDescriptor_9e0cfdc16fb09bb6
=
[]
byte
{
// 28
1
bytes of a gzipped FileDescriptorProto
0x1f
,
0x8b
,
0x08
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x02
,
0xff
,
0x74
,
0x91
,
0x
c
1
,
0x4b
,
0x
f4
,
0x
3
0
,
0x10
,
0x
c
5
,
0x
c
9
,
0x6
e
,
0x
bb
,
0x
5f
,
0x
77
,
0x
be
,
0x
a5
,
0x
4a
,
0x1
0
,
0x
29
,
0x
9e
,
0x
4a
,
0x
f
4
,
0x
50
,
0x0
4
,
0x
0b
,
0x
ae
,
0x
77
,
0x
0f
,
0x2a
,
0xa2
,
0x
a8
,
0x
9
7
,
0xe
c
,
0x
cd
,
0x
5b
,
0x
b6
,
0x
1d
,
0x
b7
,
0x
22
,
0x
3
6
,
0x
21
,
0x
93
,
0x
1
e
,
0xf
6
,
0xe
e
,
0x1f
,
0x2
e
,
0x
4
d
,
0x
63
,
0x
17
,
0x
61
,
0xb
d
,
0x
e5
,
0x
cd
,
0x
cc
,
0x
8
f
,
0x
79
,
0x
f3
,
0x0
2
,
0x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
,
0xc
a
,
0xd
d
,
0x8
6
,
0xb
8
,
0x0
5
,
0x5
8
,
0xa
2
,
0xb
2
,
0x
6
5
,
0xb
d
,
0xc
4
,
0x
a
6
,
0xe
2
,
0x
97
,
0x10
,
0x7d
,
0x
a8
,
0x
d2
,
0xa
5
,
0x6
c
,
0x
3
f
,
0x
e
7
,
0x
87
,
0x
4
2
,
0x4
2
,
0x
d2
,
0x
2
3
,
0x
1
2
,
0x
c
9
,
0x
e
8
,
0x
86
,
0x90
,
0x
5f
,
0x
4
3
,
0x
5c
,
0x
f6
,
0x
a
7
,
0x
5
0
,
0x
4
0
,
0x
9
3
,
0x
8
0
,
0x8
6
,
0x
0
b
,
0x
e5
,
0x3
0
,
0xe
7
,
0x
6
7
,
0x
30
,
0x4
1
,
0x
6b
,
0x
b
5
,
0x
0d
,
0x
c
6
,
0x
7b
,
0x21
,
0x
a
e
,
0x0
0
,
0x
de
,
0x
b4
,
0xf
e
,
0x
6
a
,
0x
8d
,
0x
b
7
,
0x
71
,
0x
20
,
0x
0f
,
0x
b
1
,
0x
82
,
0x
a4
,
0x
df
,
0x
1a
,
0x
5
e
,
0x
d
e
,
0x
2
5
,
0x
c
4
,
0x
0
e
,
0x
26
,
0x
34
,
0xfa
,
0x
9
7
,
0x
d0
,
0x
5e
,
0x
07
,
0xf
7
,
0x
d1
,
0x
6
a
,
0x
d4
,
0x
56
,
0x
eb
,
0x
a9
,
0x
ff
,
0xd
7
,
0x
bb
,
0x
df
,
0x00
,
0x
00
,
0x00
,
0xff
,
0x
f
f
,
0x5a
,
0xee
,
0x
38
,
0x
ba
,
0x
eb
,
0x01
,
0x00
,
0x00
,
}
This diff is collapsed.
Click to expand it.
ud/udMessages.proto
+
1
−
0
View file @
2463bcee
...
...
@@ -48,5 +48,6 @@ message LookupSend {
// Message sent from UDB for looking up a user
message
LookupResponse
{
bytes
pubKey
=
1
;
string
username
=
2
;
string
error
=
3
;
}
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
sign in
to comment