Merge branch 'alpha-bug' of cwtch.im/ui into master

(Shippped by Erinn - eyeball review)
This commit is contained in:
Sarah Jamie Lewis 2019-02-14 17:56:56 +00:00 committed by Gogs
commit 24de8c1c93
2 changed files with 7 additions and 1 deletions

View File

@ -5,7 +5,9 @@ import (
"cwtch.im/ui/go/cwutil"
"cwtch.im/ui/go/gobjects"
"cwtch.im/ui/go/the"
"encoding/base32"
"git.openprivacy.ca/openprivacy/libricochet-go/log"
"strings"
"time"
)
@ -28,6 +30,10 @@ func IncomingListener(callback func(*gobjects.Message)) {
Image: cwutil.RandomProfileImage(e.Data[event.RemotePeer]),
Timestamp: ts,
})
if the.Peer.GetContact(e.Data[event.RemotePeer]) == nil {
decodedPub, _ := base32.StdEncoding.DecodeString(strings.ToUpper(e.Data[event.RemotePeer]))
the.Peer.AddContact(e.Data[event.RemotePeer], e.Data[event.RemotePeer], decodedPub, false)
}
the.Peer.PeerWithOnion(e.Data[event.RemotePeer])
if e.Data[event.Data] != "ack" {
the.Peer.SendMessageToPeer(e.Data[event.RemotePeer], "ack")

View File

@ -31,7 +31,7 @@ ColumnLayout {
}
RowLayout {
visible:!overlay.accepted
visible:!overlay.accepted && (gcd.currentOpenConversation.length == 32)
Text {
text: "Do you want to accept the invitation to " + overlay.name + "?"
}