Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
user-discovery-bot
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package 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
archives
user-discovery-bot
Commits
dc321270
Commit
dc321270
authored
Feb 18, 2020
by
Jono
Browse files
Options
Downloads
Patches
Plain Diff
Change Send() message string for re-registration
parent
e3659319
No related branches found
No related tags found
1 merge request
!4
WIP: XX-1880 "/udbracecondition"
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
udb/register.go
+1
-1
1 addition, 1 deletion
udb/register.go
udb/register_test.go
+3
-3
3 additions, 3 deletions
udb/register_test.go
with
4 additions
and
4 deletions
udb/register.go
+
1
−
1
View file @
dc321270
...
...
@@ -71,7 +71,7 @@ func Register(userId *id.User, args []string, blacklist BlackList, s Sender, db
// TODO: need to check registration type too
if
retrievedUser
.
Value
==
regVal
{
jww
.
INFO
.
Printf
(
"User attemted to re-register."
)
s
.
Send
(
userId
,
"RE-REGISTRATION
COMPLETE
"
,
s
.
Send
(
userId
,
"
WARNING:
RE-REGISTRATION"
,
cmixproto
.
Type_UDB_REGISTER_RESPONSE
)
}
else
{
RegErr
(
"Cannot write to a user that already exists"
)
...
...
This diff is collapsed.
Click to expand it.
udb/register_test.go
+
3
−
3
View file @
dc321270
...
...
@@ -165,7 +165,7 @@ func TestRegisterReRegister(t *testing.T) {
sendValues
:=
[]
string
{
"PUSHKEY COMPLETE"
,
"REGISTRATION COMPLETE"
,
"RE-REGISTRATION
COMPLETE
"
,
"
WARNING:
RE-REGISTRATION"
,
}
// Start routine to check for respond from PushKey
...
...
@@ -187,7 +187,7 @@ func TestRegisterReRegister(t *testing.T) {
}
}
}()
pubKeyBits
:=
"
S8KXBczy0jins
9uS4LgBPt0bkFl8t00MnZmExQ6GcOcu8O7DKgAsNzLU7a"
+
pubKeyBits
:=
"
fgasdgawserfa
9uS4LgBPt0bkFl8t00MnZmExQ6GcOcu8O7DKgAsNzLU7a"
+
"+gMTbIsS995IL/kuFF8wcBaQJBY23095PMSQ/nMuetzhk9HdXxrGIiKBo3C/n4SClpq4"
+
"H+PoF9XziEVKua8JxGM2o83KiCK3tNUpaZbAAElkjueY7wuD96h4oaA+WV5Nh87cnIZ+"
+
"fAG0uLve2LSHZ0FBZb3glOpNAOv7PFWkvN2BO37ztOQCXTJe72Y5ReoYn7nWVNxGUh0i"
+
...
...
@@ -200,7 +200,7 @@ func TestRegisterReRegister(t *testing.T) {
fingerprint
:=
fingerprint2
.
Fingerprint
(
pubKey
)
msgs
:=
[]
string
{
"myKeyId "
+
pubKeyBits
,
"EMAIL
rick
@elixxir.io "
+
fingerprint
,
"EMAIL
jono
@elixxir.io "
+
fingerprint
,
fingerprint
,
}
...
...
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