         ; user who created message: show thread, subscribe to thread
         subscribe-data [[:db/add [:user/id user-id] :user/open-thread [:thread/id thread-id]]
                         [:db/add [:user/id user-id] :user/subscribed-thread [:thread/id thread-id]]]
-        {:keys [db-after tempids]} @(d/transact *conn* (concat [msg-data]
+        {:keys [db-after tempids]} @(d/transact conn (concat [msg-data]
                                                                subscribe-data
                                                                txs-for-tag-subscribers
                                                                txs-for-tag-mentions

             [?u2 :user/id ?u2-id]
             [?g :group/user ?u1]
             [?g :group/user ?u2]]
           (d/db *conn*) user1-id user2-id)
      seq boolean))

(defn fetch-invitations-for-user
  [user-id]
  (->> (d/q '[:find (pull ?i [{:invite/group [:group/id :group/name]}
                              {:invite/from [:user/id :user/email :user/nickname]}
                              :invite/id])

                [?u :user/id ?user-id]
                [?g :group/user ?u]
                [?t :tag/group ?g]]
              (d/db conn) user-id)
         (map (fn [[tag]]
                (db->tag (merge tag (tag-stats (tag :tag/id))))))
         (into #{}))))
