Skip to content

Conversation

@devyaniChoubey
Copy link
Contributor

@devyaniChoubey devyaniChoubey commented Mar 21, 2020

@RocketChat/ReactNative

Closes #1871
Depends on RocketChat/Rocket.Chat#18316

@djorkaeffalexandre djorkaeffalexandre changed the title App always sends auth for Avatar requests [FIX] Send auth for Avatar requests only if necessary Mar 24, 2020
Copy link
Contributor

@djorkaeffalexandre djorkaeffalexandre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know why, but I tried it with a server v3.0.0-develop and this setting always returned undefined, try to test it and make sure it's right before submit a ready for review PR.
Thanks.


let avatarAuthURLFragment = '';
if (userId && token) {
if (userId && token && !Accounts_AvatarBlockUnauthenticatedAccess) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The right behavior is exactly the opposite, when Accounts_AvatarBlockUnauthenticatedAccess is true we need to add the avatarAuthURLFragment, if it's false we don't need to add this.

@Fishbowler
Copy link
Contributor

@devyaniChoubey I reported the original issue, and love that you've had a shot at fixing it. I don't begin to understand the message that the CI is pumping out. Any ideas?

Storyshots › Message › list message

Invariant Violation: Could not find "store" in the context of "Connect(Component)". Either wrap the root component in a <Provider>, or pass a custom React context provider to <Provider> and the corresponding React context consumer to Connect(Component) in connect options.



  at invariant (node_modules/invariant/invariant.js:40:15)

  at ConnectFunction (node_modules/react-redux/lib/components/connectAdvanced.js:150:33)

  at renderWithHooks (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:5762:18)

  at updateFunctionComponent (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:7579:20)

  at updateSimpleMemoComponent (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:7522:10)

  at updateMemoComponent (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:7439:14)

  at beginWork$1 (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:9204:16)

  at performUnitOfWork (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:12981:12)

  at workLoopSync (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:12955:22)

  at renderRoot (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:12648:11)

diegolmello
diegolmello previously approved these changes Jul 30, 2020
@diegolmello diegolmello dismissed their stale review July 30, 2020 18:53

Lint is failing

@djorkaeffalexandre
Copy link
Contributor

Refer to #2517.
Thanks for your contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

App always sends auth for Avatar requests

4 participants