diff --git a/go/characters/incominglistener.go b/go/characters/incominglistener.go index 14ae72a3..40a58224 100644 --- a/go/characters/incominglistener.go +++ b/go/characters/incominglistener.go @@ -18,7 +18,6 @@ func IncomingListener(uiState *gothings.InterfaceState, subscribed chan bool) { the.EventBus.Subscribe(event.NewGroupInvite, q.EventChannel) the.EventBus.Subscribe(event.SendMessageToGroupError, q.EventChannel) the.EventBus.Subscribe(event.SendMessageToPeerError, q.EventChannel) - the.EventBus.Subscribe(event.JoinServer, q.EventChannel) the.EventBus.Subscribe(event.ServerStateChange, q.EventChannel) the.EventBus.Subscribe(event.PeerStateChange, q.EventChannel) subscribed <- true diff --git a/go/gothings/uistate.go b/go/gothings/uistate.go index 9ad46e9d..5185f559 100644 --- a/go/gothings/uistate.go +++ b/go/gothings/uistate.go @@ -50,9 +50,13 @@ func (this *InterfaceState) GetContact(handle string) *gobjects.Contact { if len(handle) == 32 { group := the.Peer.GetGroup(handle) if group != nil { + nick, exists := group.GetAttribute("nick") + if !exists { + nick = group.GroupID[:12] + } this.AddContact(&gobjects.Contact{ handle, - handle, + nick, cwutil.RandomGroupImage(handle), group.GroupServer, 0, @@ -68,9 +72,13 @@ func (this *InterfaceState) GetContact(handle string) *gobjects.Contact { } else { contact := the.Peer.GetContact(handle) if contact != nil && handle != contact.Onion { + nick, exists := contact.GetAttribute("name") + if !exists { + nick = contact.Onion + } this.AddContact(&gobjects.Contact{ handle, - handle, + nick, cwutil.RandomProfileImage(handle), "", 0,