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