Functions for creating an index of all messages in the feed.
Functions for creating an index of all messages in the feed.
(add-feed-order feed)
Calculate the feed order based on the latest message in each thread. This assumes that there are no sent messages with sha ids yet.
Calculate the feed order based on the latest message in each thread. This assumes that there are no sent messages with sha ids yet.
(add-new-message feed message)
Add a new message by appending it to the appropriate thread and moving that thread to the top of the feed order.
Add a new message by appending it to the appropriate thread and moving that thread to the top of the feed order.
(add-participants feed message)
Add new thread participants from this message.
Add new thread participants from this message.
(add-thread-subject feed message)
Parse thread subject from body and add it if there is one.
Parse thread subject from body and add it if there is one.
(append-message thread message)
Append a message to the end of a thread if it doesn't already exist. If it already exists, this is just an edit, so replace it.
Append a message to the end of a thread if it doesn't already exist. If it already exists, this is just an edit, so replace it.
(append-thread-message feed message)
(append-to-order feed id)
Add the given message-id to the end of the order for the given feed or thread.
Add the given message-id to the end of the order for the given feed or thread.
(backfill-feed feed backfill)
Backfill feed given a backfill map of old threads containing :threads and :order.
Backfill feed given a backfill map of old threads containing :threads and :order.
(backfill-thread thread backfill)
Backfill thread given a backfill map of old messages containing :messages and :order.
Backfill thread given a backfill map of old messages containing :messages and :order.
(get-message thread id)
Get a message by id from inside of a thread.
Get a message by id from inside of a thread.
(get-thread feed thread-id)
Get a thread by thread-id from a feed.
Get a thread by thread-id from a feed.
(init-feed messages)
Initialize the feed index based on an ordered list of server messages.
Initialize the feed index based on an ordered list of server messages.
(move-thread-to-top feed thread-id)
Remove thread from order if it is already there, and add it at the top.
Remove thread from order if it is already there, and add it at the top.
(order-key id)
Put id in :order, sha in :sent.
Put id in :order, sha in :sent.
(remove-from-order feed id)
Remove the given message-id from the order for the given feed or thread by starting at the end and searching backwards.
Remove the given message-id from the order for the given feed or thread by starting at the end and searching backwards.
(remove-sent-message thread sha)
Remove the message with matching sha if it exists.
Remove the message with matching sha if it exists.
(replace-sha-thread-id feed sha thread-id)
Update a thread originally sent from here by replacing sha with the server-assigned thread-id.
Update a thread originally sent from here by replacing sha with the server-assigned thread-id.
(update-thread-attrs feed thread-id attrs)
Update participants or subject in a specific thread.
Update participants or subject in a specific thread.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close