Add command to delete all own portals for a fresh start
This commit is contained in:
12
portal.go
12
portal.go
@ -416,14 +416,12 @@ func (portal *Portal) ensureUserInvited(user *User) {
|
||||
}
|
||||
|
||||
func (portal *Portal) Sync(user *User, contact whatsapp.Contact) {
|
||||
if portal.IsPrivateChat() {
|
||||
portal.ensureUserInvited(user)
|
||||
return
|
||||
}
|
||||
portal.log.Infoln("Syncing portal for", user.MXID)
|
||||
|
||||
if len(portal.MXID) == 0 {
|
||||
portal.Name = contact.Name
|
||||
if !portal.IsPrivateChat() {
|
||||
portal.Name = contact.Name
|
||||
}
|
||||
err := portal.CreateMatrixRoom(user)
|
||||
if err != nil {
|
||||
portal.log.Errorln("Failed to create portal room:", err)
|
||||
@ -433,6 +431,10 @@ func (portal *Portal) Sync(user *User, contact whatsapp.Contact) {
|
||||
portal.ensureUserInvited(user)
|
||||
}
|
||||
|
||||
if portal.IsPrivateChat() {
|
||||
return
|
||||
}
|
||||
|
||||
update := false
|
||||
update = portal.UpdateMetadata(user) || update
|
||||
if !portal.IsStatusBroadcastRoom() {
|
||||
|
Reference in New Issue
Block a user