Retrieve previous message

4 views
Skip to first unread message

Jason Cusick

unread,
Aug 24, 2017, 3:28:40 PM8/24/17
to Lita
Is there a way to retrieve the previous message in the history upon a route trigger?


Daniel Pritchett

unread,
Aug 24, 2017, 3:48:26 PM8/24/17
to Jason Cusick, Lita
You'd probably want to build a searchable datastore of recent messages tagged by channel and user.  I am not aware that such a thing exists as a current Lita feature, but you could put it in Redis.  I'd generate a UUID for each message, store its payload under a key like message_log_f23f2l323r23f, and then add f23f2l323r23f to the beginning of a list of message IDs seen in that room.

On Thu, Aug 24, 2017 at 2:28 PM, 'Jason Cusick' via Lita <lit...@googlegroups.com> wrote:
Is there a way to retrieve the previous message in the history upon a route trigger?


--
You received this message because you are subscribed to the Google Groups "Lita" group.
To unsubscribe from this group and stop receiving emails from it, send an email to litaio+unsubscribe@googlegroups.com.
To post to this group, send email to lit...@googlegroups.com.
Visit this group at https://groups.google.com/group/litaio.
To view this discussion on the web visit https://groups.google.com/d/msgid/litaio/4d582132-5311-48c2-bf1c-c7b240d7193a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages