Merge pull request #3256 from pangeachat/3255-bot-dm-displays-as-group-chat
chore: replace call to startRoom with call to startDirectChat for bot…
This commit is contained in:
commit
c97bc7c407
1 changed files with 9 additions and 10 deletions
|
|
@ -80,17 +80,16 @@ class OnboardingController extends State<Onboarding> {
|
|||
Future<void> startChatWithBot() async {
|
||||
final resp = await showFutureLoadingDialog<String>(
|
||||
context: context,
|
||||
future: () => Matrix.of(context).client.createRoom(
|
||||
invite: [BotName.byEnvironment],
|
||||
isDirect: true,
|
||||
preset: CreateRoomPreset.trustedPrivateChat,
|
||||
initialState: [
|
||||
BotOptionsModel(mode: BotMode.directChat).toStateEvent,
|
||||
RoomDefaults.defaultPowerLevels(
|
||||
Matrix.of(context).client.userID!,
|
||||
),
|
||||
],
|
||||
future: () => Matrix.of(context).client.startDirectChat(
|
||||
BotName.byEnvironment,
|
||||
preset: CreateRoomPreset.trustedPrivateChat,
|
||||
initialState: [
|
||||
BotOptionsModel(mode: BotMode.directChat).toStateEvent,
|
||||
RoomDefaults.defaultPowerLevels(
|
||||
Matrix.of(context).client.userID!,
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
if (resp.isError) return;
|
||||
context.go("/rooms/${resp.result}");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue