mirror of
https://github.com/vale981/ement.el
synced 2025-03-05 09:21:37 -05:00
Change: (ement-room-retro-callback) Add events to hash table
This commit is contained in:
parent
2c590c376c
commit
943207918f
1 changed files with 3 additions and 0 deletions
|
@ -1255,6 +1255,7 @@ reaction string, e.g. \"👍\"."
|
|||
(error "Event not found in buffer: %S" (ement-event-id event))))
|
||||
|
||||
(declare-function ement--make-event "ement.el")
|
||||
(declare-function ement--put-event "ement.el")
|
||||
(defun ement-room-retro-callback (room data)
|
||||
"Push new DATA to ROOM on SESSION and add events to room buffer."
|
||||
(pcase-let* (((cl-struct ement-room local) room)
|
||||
|
@ -1289,6 +1290,8 @@ reaction string, e.g. \"👍\"."
|
|||
;; Append timeline events (in the "chunk").
|
||||
(cl-loop for event across-ref chunk
|
||||
do (setf event (ement--make-event event))
|
||||
;; HACK: Put events on events table. See FIXME above about using the event hook.
|
||||
(ement--put-event event nil session)
|
||||
(ement-progress-update)
|
||||
finally do (setf (ement-room-timeline room)
|
||||
(append (ement-room-timeline room) (append chunk nil))))
|
||||
|
|
Loading…
Add table
Reference in a new issue