File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
crates/matrix-sdk/src/widget Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -166,6 +166,7 @@ impl MatrixDriver {
166166 let ( tx, rx) = unbounded_channel ( ) ;
167167 let room_id = self . room . room_id ( ) . to_owned ( ) ;
168168
169+ // Get only message like events from the timeline section of the sync.
169170 let _tx = tx. clone ( ) ;
170171 let _room_id = room_id. clone ( ) ;
171172 let handle_msg_like =
@@ -175,12 +176,18 @@ impl MatrixDriver {
175176 } ) ;
176177 let drop_guard_msg_like = self . room . client ( ) . event_handler_drop_guard ( handle_msg_like) ;
177178
179+ // Get only all state events from the state section of the sync.
178180 let handle_state = self . room . add_event_handler ( move |raw : Raw < AnySyncStateEvent > | {
179181 let _ = tx. send ( attach_room_id ( raw. cast_ref ( ) , & room_id) ) ;
180182 async { }
181183 } ) ;
182184 let drop_guard_state = self . room . client ( ) . event_handler_drop_guard ( handle_state) ;
183185
186+ // The receiver will get a combination of state and messgage like events.
187+ // The state events will come from the state section of the sync.
188+ // All state events in the timeline section of the sync will not be forwarded to
189+ // the widget.
190+ // TODO annotate the events and send both timeline and state section state events.
184191 EventReceiver { rx, _drop_guards : [ drop_guard_msg_like, drop_guard_state] }
185192 }
186193}
You can’t perform that action at this time.
0 commit comments