Merge branch 'soru/more-directory-fixes' into 'main'

fix: Make tapping on pills join if remote directory is private

See merge request famedly/fluffychat!353
This commit is contained in:
Krille Fear 2021-01-20 16:15:10 +00:00
commit ce1a7e28af

View File

@ -122,7 +122,14 @@ class _DiscoverPageState extends State<DiscoverPage> {
server: server,
genericSearchTerm: _genericSearchTerm,
)
.then((PublicRoomsResponse res) {
.catchError((error) {
if (widget.alias == null) {
throw error;
}
return PublicRoomsResponse.fromJson({
'chunk': [],
});
}).then((PublicRoomsResponse res) {
if (widget.alias != null &&
!res.chunk.any((room) =>
room.aliases.contains(widget.alias) ||