Skip to content

Commit 5fc3cda

Browse files
committed
Ignore private group messages
1 parent 46577e6 commit 5fc3cda

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

repl/emoji_cleanup.clj

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828

2929
(run! (partial d/transact (conn)) (partition-all 1000 tx-data))
3030

31+
(count (d/q '[:find ?i ?s :where [?i :emoji/shortcode ?s]] (db)))
32+
3133
@(d/transact (conn) [{:db/ident :emoji/shortcode
3234
:db/valueType :db.type/string
3335
:db/cardinality :db.cardinality/one

src/clojurians_log/db/import.clj

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
nil)
2727

2828
(defn message->tx [{:keys [ts text channel user thread_ts] :as message}]
29-
(when-not (= \D (first channel)) ;; ignore direct messages
29+
(when (= \C (first channel)) ;; ignore direct and private group, can be C, D, G
3030
(let [inst (time-util/ts->inst ts)
3131
message #:message {:key (message-key message)
3232
:ts ts

0 commit comments

Comments
 (0)