Save Group Name from Invite #358

Merged
erinn merged 1 commits from groupwiring into master 2021-05-18 23:41:53 +00:00
1 changed files with 2 additions and 0 deletions

View File

@ -2,6 +2,7 @@ package model
import (
"crypto/rand"
"cwtch.im/cwtch/model/attr"
"cwtch.im/cwtch/protocol/groups"
"encoding/base32"
"encoding/hex"
@ -380,6 +381,7 @@ func (p *Profile) ProcessInvite(invite string) (string, error) {
group.GroupServer = gci.ServerHost
group.Accepted = false
group.Attributes = make(map[string]string)
group.Attributes[attr.GetLocalScope("name")] = gci.GroupName
p.AddGroup(group)
return gci.GroupID, nil
}