fix getting canonical alias server for backfill
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
6b1b464abc
commit
9c95a74d56
|
@ -4,6 +4,7 @@ use std::{
|
|||
cmp,
|
||||
collections::{BTreeMap, HashSet},
|
||||
fmt::Write,
|
||||
iter::once,
|
||||
sync::Arc,
|
||||
};
|
||||
|
||||
|
@ -1076,9 +1077,20 @@ impl Service {
|
|||
}
|
||||
});
|
||||
|
||||
let canonical_room_alias_server = once(
|
||||
self.services
|
||||
.state_accessor
|
||||
.get_canonical_alias(room_id)
|
||||
.await,
|
||||
)
|
||||
.filter_map(Result::ok)
|
||||
.map(|alias| alias.server_name().to_owned())
|
||||
.stream();
|
||||
|
||||
let mut servers = room_mods
|
||||
.stream()
|
||||
.map(ToOwned::to_owned)
|
||||
.chain(canonical_room_alias_server)
|
||||
.chain(
|
||||
self.services
|
||||
.server
|
||||
|
|
Loading…
Reference in New Issue