lib invitation improvement for GUI
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
0998845817
commit
04e81fcef1
@ -30,21 +30,21 @@ func TestEndToEnd(t *testing.T) {
|
||||
// Create an invitation for a friend, I want him/her to know me as Bender //
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
fmt.Println("Creating an invitation for the first friend...")
|
||||
peer, myContactCard, err := Me.InvitePeer("Bender", "myfirstfriend", []int{1, 2})
|
||||
peer, err := Me.InvitePeer("Bender", "myfirstfriend", []int{1, 2})
|
||||
if err != nil {
|
||||
println(err)
|
||||
}
|
||||
println(peer.Name)
|
||||
// print my invitation
|
||||
a, _ := json.Marshal(myContactCard)
|
||||
a, _ := json.Marshal(peer.MyContact)
|
||||
fmt.Println(string(a))
|
||||
// TODO : Convert invitation to QR Code
|
||||
myContactCard.WritePng("invitation.png")
|
||||
data, err := myContactCard.Compress()
|
||||
peer.MyContact.WritePng("invitation.png")
|
||||
data, err := peer.MyContact.Compress()
|
||||
if err != nil {
|
||||
println(err)
|
||||
}
|
||||
myContactCard.WriteQr("qrcode.png")
|
||||
peer.MyContact.WriteQr("qrcode.png")
|
||||
println("Compressed contact card :", len(data))
|
||||
///////////////////////////////////////
|
||||
// Simulate peer invitation response //
|
||||
@ -60,7 +60,7 @@ func TestEndToEnd(t *testing.T) {
|
||||
ReceivedContact.ContactPublicKey = FirstFriendContactKp.Public
|
||||
ReceivedContact.EncryptionPublicKey = FirstFriendEncryptionKp.Public
|
||||
ReceivedContact.LookupPublicKey = FirstFriendLookupKp.Public
|
||||
ReceivedContact.InvitationId = myContactCard.InvitationId
|
||||
ReceivedContact.InvitationId = peer.MyContact.InvitationId
|
||||
FriendServer1KP := meowlib.NewKeyPair()
|
||||
FriendServer1 := meowlib.ServerCard{Name: "FriendServer1", Url: "http://myfriend.org/meow/", PublicKey: FriendServer1KP.Public, Description: "Fancy description"}
|
||||
ReceivedContact.PullServers = append(ReceivedContact.PullServers, &FriendServer1)
|
||||
|
Loading…
Reference in New Issue
Block a user