aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Dockerfile6
-rw-r--r--db.go6
2 files changed, 8 insertions, 4 deletions
diff --git a/Dockerfile b/Dockerfile
index 28d0eef..ff17e69 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,7 +1,7 @@
-#FROM archlinux:latest
-#RUN pacman -Sy python-pip --noconfirm; pacman -Scc --noconfirm
+FROM archlinux:latest
+RUN pacman -Sy python-pip --noconfirm; pacman -Scc --noconfirm; find /var/cache/pacman/ -type f -delete; find /var/lib/pacman/sync/ -type f -delete
-FROM python:3.8-buster
+#FROM python:3.8.6-buster
RUN pip install fbchat
diff --git a/db.go b/db.go
index c09dd92..658aff4 100644
--- a/db.go
+++ b/db.go
@@ -255,7 +255,11 @@ func dbGetMxPmRoom(protocol string, them connector.UserID, themMxId string, usMx
}
func dbDeletePmRoom(room *DbPmRoomMap) {
- db.Delete(room)
+ if room.ID != 0 {
+ db.Delete(room)
+ } else {
+ log.Warnf("In dbDeletePmRoom: %#v (not deleting since primary key is zero)", room)
+ }
}
func dbGetMxUser(protocol string, userId connector.UserID) (string, error) {