feat: Initial knocking

This commit is contained in:
Christian Pauly 2022-11-22 15:46:16 +01:00
parent 0c38f6a205
commit 7e1265af8a

View File

@ -34,7 +34,9 @@ class PublicRoomBottomSheet extends StatelessWidget {
final client = Matrix.of(context).client;
final result = await showFutureLoadingDialog<String>(
context: context,
future: () => client.joinRoom(roomAlias ?? chunk!.roomId),
future: () => chunk?.joinRule == 'knock'
? client.knockRoom(chunk!.roomId)
: client.joinRoom(roomAlias ?? chunk!.roomId),
);
if (result.error == null) {
if (client.getRoomById(result.result!) == null) {