-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Use new AuthenticatePusher NewDot Optimized API commands #9659
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
Conversation
a6214ad
to
b7d7b42
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coming from this comment, we should use makeRequestWithSideEffects
and use the current logic to handle the side effect. We'll no longer be storing anything in Onyx. Sorry for the confusion!
9eefa59
to
775dba6
Compare
Cool, updated! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh dearie me that's embarrassing. I think I pushed this up before heading out for the 4th and forgot about all the rest I needed to do 😅 |
Updated and retested! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for the changes. @marcaaron all yours :)
if (response.jsonCode === CONST.JSON_CODE.NOT_AUTHENTICATED) { | ||
Log.hmmm('[PusherAuthorizer] Unable to authenticate Pusher because authToken is expired'); | ||
callback(new Error('Pusher failed to authenticate because authToken is expired'), {auth: ''}); | ||
}).then((response) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nonblocking fussy observation: if we just leave this indent alone the diff will leave less of an impact
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the new way is better for style but yeah
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer .then()
on a new line, but it is a personal preference and not something we have in the style guide.
{channelName}, | ||
); | ||
callback(null, response); | ||
}).catch((error) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here. Change was not really needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good!
Conflicts. |
Web-E PR in prod, but we have conflicts now! |
ae3dc67
Looks like you modified Instead, all new API commands should use API.js, and follow our guidelines for writing new API commands. Unsure if your change is okay? Drop a note in #expensify-open-source! |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by @luacmartins in version: 1.1.83-1 🚀
|
🚀 Deployed to production by @chiragsalian in version: 1.1.84-13 🚀
|
@luacmartins please review
?w=1
review highly reccomendedDetails
Starts using the new
AuthenticatePusher
NewDot optimized API commandFixed Issues
$ https://github.com/Expensify/Expensify/issues/213876
Tests / QA Steps
Contributor (PR Author) Checklist
### Fixed Issues
section aboveTests
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
filesSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
displayName
propertythis
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)PR Reviewer Checklist
### Fixed Issues
section aboveTests
sectionQA steps
sectiontoggleReport
and notonIconClick
).src/languages/*
filesSTYLE.md
) were followed/** comment above it */
displayName
propertythis
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)