Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

one to one channel example #7

Closed
brizaldi opened this issue Mar 20, 2020 · 3 comments
Closed

one to one channel example #7

brizaldi opened this issue Mar 20, 2020 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@brizaldi
Copy link

is there an example about how to initiate one to one conversation?

i got error like this when i call await channel.watch();

E/flutter (19258): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: ApiError{body: Not Found, jsonData: null, status: 404, code: null}

@imtoori imtoori added the bug Something isn't working label Mar 20, 2020
@imtoori imtoori self-assigned this Mar 20, 2020
@imtoori
Copy link
Contributor

imtoori commented Mar 20, 2020

Hi and thank you for the reporting

There was an error initializing the channel without an id.
The url was wrong and the response was always 404.

With stream_chat_dart version 0.1.20 the bug is fixed.

To create a channel follow the docs here, so run flutter pub get to get the latest version

The result should be something like this

  final channel = client.channel('messaging', extraData: {
    'members': [
      'thierry',
      'tommaso',
    ],
  });

  await channel.create();
  channel.watch();

@imtoori imtoori closed this as completed Mar 20, 2020
@brizaldi
Copy link
Author

brizaldi commented Mar 20, 2020

can you also update stream_chat_flutter ?
because its still using version 0.1.19

@imtoori
Copy link
Contributor

imtoori commented Mar 20, 2020

Actually It's not necessary to do so
Just run flutter packages upgrade and rebuild your app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants