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

Other member name and avatar is not displayed when using ChannelList with ChannelPreviewMessenger #55

Closed
syntax-e opened this issue Aug 24, 2019 · 3 comments
Assignees

Comments

@syntax-e
Copy link

syntax-e commented Aug 24, 2019

Repro steps:

  1. Create new react native project via react-native init
  2. Add stream-chat-react-native per directions on this github repo
  3. Set current user via:
    const user = {
      id: userId,
      name: userName,
      image: userAvatarUrl
    }
    chatClient.setUser(user, userToken)

userId is a guid permanently associated with the current user that users will never see. userName and userAvatar are what we expect to see in the channel list channel preview

  1. Create a channel via:
chatClient.channel('messaging', {
          members: [user.id, recipientId]
        })

where user.id is the userId of the current user and recipientId is the userId of the other user in a 1:1 chat.

  1. Display channel list via
  <ChannelList
              filters={{ type: 'messaging', members: { $in: [userId] } }}
              sort={{ last_message_at: -1 }}
              Preview={ChannelPreviewMessenger}
              onSelect={channel => { Actions.streamChannel({ channel }) }}
            /> 

where userId is the userId of the current user.

Result:

  • Channel previews display with:
    • No channel name (expected the name of the other participant in the channel)
    • A solid blue avatar (expected the avatar of the other participant in the channel)

Screen Shot 2019-08-24 at 2 23 31 AM

Expected something like:
Screen Shot 2019-08-24 at 2 29 26 AM

Note:

  • Mentions by name work properly within a channel
  • Other participant is typing indicator works properly by name within a channel
  • Avatars work properly within a channel

Screen Shot 2019-08-24 at 2 23 48 AM

@vishalnarkhede vishalnarkhede self-assigned this Aug 26, 2019
@vishalnarkhede
Copy link
Contributor

Hey @harrisonschwartz

Thanks for bringing this up. This is now fixed as part of v0.1.19. Please reopen the issue if it doesn't work for you :)

@syntax-e
Copy link
Author

That fixed it. Looks good. Thank you!

@ChenDimri
Copy link

Hi, I'm using version 3.10.2, and I only see the sender name if the massage in the preview is sent by me.
Is there something that I need to do to be able to see the sender name no matter who sent it?

Simulator Screen Shot - iPhone 11 - 2022-02-13 at 15 20 20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants