Commit 6ed8c0ef3a2a
tarball1 file changed+10-0
@@ -79,6 +79,7 @@ pub(super) struct TimelineSession {
7979
watcher: JoinHandle<()>,8080
pagination: mpsc::Sender<PaginationRequest>,8181
pagination_worker: JoinHandle<()>,82
+ member_fetch: JoinHandle<()>,8283
}8384
8485
struct PaginationRequest {@@ -105,6 +106,12 @@ impl TimelineSession {
105106
id.clone(),106107
),107108
);109
+ // under lazy-loaded members the sdk leaves sender profiles unavailable until someone110
+ // asks, and a /members fetched any other way never reaches the timeline's items111
+ let member_fetch = context.supervisor.spawn("member fetch", {112
+ let timeline = timeline.clone();113
+ async move { timeline.fetch_members().await }114
+ });108115
let session = Self {109116
id,110117
timeline,@@ -112,6 +119,7 @@ impl TimelineSession {
112119
watcher,113120
pagination,114121
pagination_worker,122
+ member_fetch,115123
context,116124
};117125
if session.context.initial_history_limit > 0 {@@ -151,6 +159,7 @@ impl TimelineSession {
151159
152160
/// pending paginations answer `Interrupted` as their responders drop153161
pub(super) async fn close(mut self) {162
+ self.member_fetch.abort();154163
self.pagination_worker.abort();155164
let _ = (&mut self.pagination_worker).await;156165
self.watcher.abort();@@ -334,6 +343,7 @@ impl Drop for TimelineSession {
334343
fn drop(&mut self) {335344
self.watcher.abort();336345
self.pagination_worker.abort();346
+ self.member_fetch.abort();337347
}338348
}