1
0
mirror of https://codeberg.org/cage/tinmop/ synced 2025-02-02 04:36:43 +01:00

- prevented crash when the same message was deleted in two differents

folder or  timeline (the unique key  for table of ignored  status is
  (:status-id :folder :timeline)).
This commit is contained in:
cage 2020-05-12 19:23:48 +02:00
parent 7c7066fdfb
commit 907bcc1cf1

View File

@ -397,7 +397,8 @@
+make-close+)))
(defun make-ignored-status ()
(query-low-level (strcat (prepare-table +table-ignored-status+)
(query-low-level (strcat (prepare-table +table-ignored-status+ :autoincrementp t)
" \"status-id\" TEXT NOT NULL, "
" timeline TEXT NOT NULL, "
" folder TEXT NOT NULL, "
;; timestamp
@ -410,7 +411,7 @@
(create-table-index +table-followed-user+ '(:user-id))
(create-table-index +table-attachment+ '(:id))
(create-table-index +table-subscribed-tag+ '(:id))
(create-table-index +table-ignored-status+ '(:id))
(create-table-index +table-ignored-status+ '(:folder :timeline :status-id))
(create-table-index +table-conversation+ '(:id))
(create-table-index +table-cache+ '(:id :key)))
@ -1874,7 +1875,7 @@ account that wrote the status identified by `status-id'"
:status)"
(query (select :*
(from :ignored-status)
(where (:and (:= :id status-id)
(where (:and (:= :status-id status-id)
(:= :folder folder)
(:= :timeline timeline))))))
@ -1888,7 +1889,7 @@ account that wrote the status identified by `status-id'"
(when (not (status-ignored-p status-id folder timeline))
(with-db-current-timestamp (now)
(query (make-insert +table-ignored-status+
(:id :folder :timeline :created-at)
(:status-id :folder :timeline :created-at)
(status-id folder timeline now))))))
(defun add-to-followers (user-id)