                   :message/thread [:thread/id thread-id]
                   :message/created-at created-at}
         ; 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]
-                                                               subscribe-data
-                                                               txs-for-tag-subscribers
-                                                               txs-for-tag-mentions
-                                                               txs-for-user-mentions))]
+        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]
+                                              subscribe-data
+                                              txs-for-tag-subscribers
+                                              txs-for-tag-mentions
+                                              txs-for-user-mentions))]
     (->> (d/resolve-tempid db-after tempids (msg-data :db/id))
          (d/pull db-after '[:message/id
                             :message/content

                                  [[:db/add [:thread/id thread-id]
                                    :thread/mentioned [:user/id user-id]]
                                   [:db/add [:user/id user-id]
                                    :user/subscribed-thread  [:thread/id thread-id]]
                                   [:db/add [:user/id user-id]
                                    :user/open-thread  [:thread/id thread-id]]])
                                mentioned-user-ids)
        ; open thread for users already subscribed to thread
        txs-for-tag-subscribers (map

                                     :thread/tag [:tag/id tag-id]]]
                                   (mapcat (fn [user-id]
                                             [[:db/add [:user/id user-id]
                                               :user/subscribed-thread
                                               [:thread/id thread-id]]
                                              [:db/add [:user/id user-id]
                                               :user/open-thread
                                               [:thread/id thread-id]]])
                                           (get-users-subscribed-to-tag tag-id))))
                               mentioned-tag-ids)
        ; subscribe and open thread for users mentioned
