handle leave chat from matrix side

This commit is contained in:
Karmanyaah Malhotra
2021-02-27 19:57:42 -05:00
parent b5af55122e
commit 3e75ffaf05
6 changed files with 279 additions and 262 deletions

View File

@ -171,7 +171,7 @@ func (portal *Portal) Update() {
}
func (portal *Portal) Delete() {
ans := portal.db.Delete(&portal)
ans := portal.db.Where("jid = ? AND receiver = ?", portal.Key.JID, portal.Key.Receiver).Delete(&portal)
if ans.Error != nil {
portal.log.Warnfln("Failed to delete %s: %v", portal.Key, ans.Error)
}