Skip to content

Avatars and other images don't display #603

Closed

Description

@davidlougheed
  • Your Rocket.Chat.ReactNative app version: 1.8.0.5534

  • Your Rocket.Chat server version: 0.74.0

  • Device model (or emulator) you're running with: iPhone 8

  • Steps to reproduce: Connect to a server with security enabled for avatars, avatars don't load.

Activity

  1. davidlougheed commented on Feb 6, 2019

    @davidlougheed
    ContributorAuthor

    rc_uid and rc_token are needed if unauth. access to avatars is enabled. these arent passed.

  2. davidlougheed commented on Feb 6, 2019

    @davidlougheed
    ContributorAuthor

    quasi fix: if SDK.api.currentLogin is not null, grab data with const { authToken, userId } = SDK.api.currentLogin.result.data; and pass it to the url with:

    const uri = avatar || `${ baseUrl }/avatar/${ room }?format=png&width=${ uriSize }&height=${ uriSize }&rc_uid=${ userId }&rc_token=${ authToken }`;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions