Stop setting room name for private chats
This commit is contained in:
parent
63672885f6
commit
8483af9c0a
1 changed files with 4 additions and 4 deletions
|
@ -227,9 +227,9 @@ func (portal *Portal) CreateMatrixRoom() error {
|
|||
name := portal.Name
|
||||
topic := portal.Topic
|
||||
isPrivateChat := false
|
||||
if strings.HasSuffix(portal.JID, whatsapp_ext.NewUserSuffix) {
|
||||
puppet := portal.user.GetPuppetByJID(portal.JID)
|
||||
name = puppet.Displayname
|
||||
invite := []string{portal.user.ID}
|
||||
if portal.IsPrivateChat() {
|
||||
name = ""
|
||||
topic = "WhatsApp private chat"
|
||||
isPrivateChat = true
|
||||
}
|
||||
|
@ -237,7 +237,7 @@ func (portal *Portal) CreateMatrixRoom() error {
|
|||
Visibility: "private",
|
||||
Name: name,
|
||||
Topic: topic,
|
||||
Invite: []string{portal.user.ID},
|
||||
Invite: invite,
|
||||
Preset: "private_chat",
|
||||
IsDirect: isPrivateChat,
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue