mirror of
https://github.com/vale981/ement.el
synced 2025-03-06 01:31:41 -05:00
Fix: (ement-defevent "m.space.child") Use cl-pushnew
This commit is contained in:
parent
1481714f9e
commit
b561a29b49
1 changed files with 3 additions and 2 deletions
5
ement.el
5
ement.el
|
@ -1229,10 +1229,11 @@ and `session' to the session. Adds function to
|
||||||
(if via
|
(if via
|
||||||
;; Child being declared: add it.
|
;; Child being declared: add it.
|
||||||
(progn
|
(progn
|
||||||
(push child-room-id (alist-get 'children (ement-room-local space-room)))
|
(cl-pushnew child-room-id (alist-get 'children (ement-room-local space-room)) :test #'equal)
|
||||||
(when child-room
|
(when child-room
|
||||||
;; The user is also in the child room: link the parent space-room in it.
|
;; The user is also in the child room: link the parent space-room in it.
|
||||||
(push parent-room-id (alist-get 'parents (ement-room-local child-room)))))
|
;; FIXME: On initial sync, if the child room hasn't been processed yet, this will fail.
|
||||||
|
(cl-pushnew parent-room-id (alist-get 'parents (ement-room-local child-room)) :test #'equal)))
|
||||||
;; Child being disowned: remove it.
|
;; Child being disowned: remove it.
|
||||||
(setf (alist-get 'children (ement-room-local space-room))
|
(setf (alist-get 'children (ement-room-local space-room))
|
||||||
(delete child-room-id (alist-get 'children (ement-room-local space-room))))
|
(delete child-room-id (alist-get 'children (ement-room-local space-room))))
|
||||||
|
|
Loading…
Add table
Reference in a new issue