
 chatstore.pl -- Store chat messages
chatstore.pl -- Store chat messagesWhen using redis, the messages for a document are stored in the key below as a sorted set where the score is the time in ms and the value is a Prolog dict holding the message.
Prefix:chat:docid:DocId
 redis_docid_key(+DocID, -Server, -Key) is semidet[private]
 redis_docid_key(+DocID, -Server, -Key) is semidet[private] chat_dir_file(+DocID, -Path, -File)[private]
 chat_dir_file(+DocID, -Path, -File)[private] existing_chat_file(+DocID, -File) is semidet[private]
 existing_chat_file(+DocID, -File) is semidet[private] chat_store(+Message:dict) is det
 chat_store(+Message:dict) is detMessage.create == false,
the message is only stored if the chat is already active. This is
used to only insert messages about changes to the file if there is
an ongoing chat so we know to which version chat messages refer. strip_chat(_Message0, -Message) is det[private]
 strip_chat(_Message0, -Message) is det[private] chat_messages(+DocID, -Messages:list, +Options) is det
 chat_messages(+DocID, -Messages:list, +Options) is det chat_message_count(+DocID, -Count) is det[private]
 chat_message_count(+DocID, -Count) is det[private] swish_config:chat_count_about(+DocID, -Count)[multifile]
 swish_config:chat_count_about(+DocID, -Count)[multifile] chat_messages(+Request)[private]
 chat_messages(+Request)[private] chat_status(+Request)[private]
 chat_status(+Request)[private]