summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/papod.clj13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/papod.clj b/src/papod.clj
index 8624cfa..ec4265b 100644
--- a/src/papod.clj
+++ b/src/papod.clj
@@ -2454,7 +2454,18 @@
(let [limit (try
(Long/parseLong (last params))
(catch Exception _ 50))
- events (fetch-history db chan-eid 0 limit)
+ event-playback?
+ (contains? (or (:caps @client) #{})
+ "draft/event-playback")
+ all-events (fetch-history db chan-eid 0 limit)
+ events (if event-playback?
+ all-events
+ (filter
+ (fn [[_ type & _]]
+ (#{"user-message"
+ "user-edit"
+ "user-delete"} type))
+ all-events))
batch-id (str (java.util.UUID/randomUUID))]
(into
[(str "BATCH +" batch-id " chathistory "