Showing group nickname

This commit is contained in:
Sarah Jamie Lewis 2018-11-28 13:29:32 -08:00
parent 7a8e102b2a
commit 6654785516
1 changed files with 5 additions and 1 deletions

View File

@ -168,9 +168,13 @@ func loadCwtchData(gcd *gothings.GrandCentralDispatcher) {
group.NewMessage = make(chan model.Message)
go characters.CwtchListener(gcd.UIState.AddMessage, groups[i], group.NewMessage)
the.Peer.JoinServer(group.GroupServer)
nick, exists := group.GetAttribute("nick")
if !exists {
nick = group.GroupID[:12]
}
gcd.UIState.AddContact(&gobjects.Contact{
group.GroupID,
group.GroupID[:12],
nick,
cwutil.RandomGroupImage(group.GroupID),
group.GroupServer,
0,