@@ -12,7 +12,7 @@ use ruma::{
12
12
room:: history_visibility:: HistoryVisibility , AnyStateEvent , AnySyncStateEvent , EventType ,
13
13
} ,
14
14
serde:: Raw ,
15
- UserId ,
15
+ EventId , UserId ,
16
16
} ;
17
17
18
18
use crate :: {
@@ -190,14 +190,9 @@ impl Common {
190
190
Ok ( response)
191
191
}
192
192
193
- /// Sends a request to `/_matrix/client/r0/rooms/{roomId}/event/{eventId}`
194
- /// and returns a `get_room_event::Response` that contains a event
195
- /// (`AnyRoomEvent`).
196
- pub async fn event (
197
- & self ,
198
- request : impl Into < get_room_event:: Request < ' _ > > ,
199
- ) -> Result < RoomEvent > {
200
- let request = request. into ( ) ;
193
+ /// Fetch the event with the given `EventId` in this room.
194
+ pub async fn event ( & self , event_id : & EventId ) -> Result < RoomEvent > {
195
+ let request = get_room_event:: Request :: new ( self . room_id ( ) , event_id) ;
201
196
let event = self . client . send ( request, None ) . await ?. event . deserialize ( ) ?;
202
197
203
198
#[ cfg( feature = "encryption" ) ]
@@ -281,9 +276,9 @@ impl Common {
281
276
282
277
/// Get active members for this room, includes invited, joined members.
283
278
///
284
- /// *Note*: This method will fetch the members from the homeserver if the
285
- /// member list isn't synchronized due to member lazy loading. Because of
286
- /// that, it might panic if it isn't run on a tokio thread .
279
+ /// *Note*: This method will not fetch the members from the homeserver if
280
+ /// the member list isn't synchronized due to member lazy loading. Thus,
281
+ /// members could be missing from the list .
287
282
///
288
283
/// Use [active_members()](#method.active_members) if you want to ensure to
289
284
/// always get the full member list.
0 commit comments