Skip to content

Don't allow users to chat with Concierge when blocked#7340

Merged
chiragsalian merged 4 commits into
mainfrom
puneet-block-concierge
Jan 22, 2022
Merged

Don't allow users to chat with Concierge when blocked#7340
chiragsalian merged 4 commits into
mainfrom
puneet-block-concierge

Conversation

@puneetlath

@puneetlath puneetlath commented Jan 20, 2022

Copy link
Copy Markdown
Contributor

Details

This PR makes a few changes/updates to the concierge blocking functionality.

  1. It fixes the bug where we weren't actually blocking the user from chatting with Concierge. This is because we weren't asking for the isBlockedFromConcierge NVP in the API call. This was broken at some point.
  2. Makes it so that if a user does chat with Concierge while blocked, we handle the API response. This is possible because we only get the user details every 30 min. So if a user is in active conversation with Concierge and is blocked, they can still seemingly be able to keep chatting until the user details refresh. This PR catches that API response, throws a growl, and prevents them from sending further messages.
  3. Updates the style on the compose box so that it won't appear selected when the user is blocked from using it.
Screen.Recording.2022-01-20.at.5.30.18.PM.mov

Fixed Issues

$ https://github.com/Expensify/Expensify/issues/172842

Tests

  • Verify that no errors appear in the JS console
  1. sign into an account on new dot and go to your concierge chat
  2. send a message to concierge
  3. open expensify.com.dev/concierge/
  4. sign in with an @expensify.com email address
  5. click Tools
  6. use the find chats by user tool to find the chat with your user
  7. click "user info"
  8. block your user
  9. go back to new dot and try to chat with concierge again
  10. verify that you see the growl that you are barred from chatting
  11. verify that your message that you just sent is removed from the chat history
  12. verify that the input is disabled and you are no longer able to message concierge
  13. verify that the blue highlight is no longer shown around the input

QA Steps

  • Verify that no errors appear in the JS console

Will need to be tested by an Expensify employee on production. Steps are the same as above.

Tested On

  • Web
  • Mobile Web
  • Desktop
  • iOS
  • Android

Screenshots

Web

Video above.

Mobile Web

Screen Shot 2022-01-20 at 6 04 22 PM

Desktop

Screen Shot 2022-01-20 at 5 35 36 PM

iOS

Screen Shot 2022-01-20 at 5 59 30 PM

Android

Screen Shot 2022-01-20 at 6 24 54 PM

@puneetlath puneetlath self-assigned this Jan 20, 2022
@puneetlath puneetlath changed the title Add private_blockedFromConcierge to the list of NVPs that is returned… Don't allow users to chat with Concierge when blocked Jan 20, 2022
@puneetlath puneetlath added the InternalQA This pull request required internal QA label Jan 20, 2022
@puneetlath puneetlath marked this pull request as ready for review January 20, 2022 23:26
@puneetlath puneetlath requested a review from a team as a code owner January 20, 2022 23:26
@MelvinBot MelvinBot requested review from chiragsalian and removed request for a team January 20, 2022 23:26

@chiragsalian chiragsalian left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes LGTM and code works well.

@chiragsalian chiragsalian merged commit d596d0b into main Jan 22, 2022
@chiragsalian chiragsalian deleted the puneet-block-concierge branch January 22, 2022 00:49
@MelvinBot

Copy link
Copy Markdown
Contributor

Triggered auto assignment to @Beamanator (InternalQA), see https://stackoverflow.com/c/expensify/questions/5042 for more details.

@botify

botify commented Jan 22, 2022

Copy link
Copy Markdown

@chiragsalian looks like this was merged without passing tests. Please add a note explaining why this was done and remove the Emergency label if this is not an emergency.

@OSBotify

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@chiragsalian

Copy link
Copy Markdown
Contributor

I think perhaps the internalQA label might have screwed up some stuff since i don't think we've used it before for App repo. Either way it's all good melvin and botify.

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by @chiragsalian in version: 1.1.32-1 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

@OSBotify

OSBotify commented Feb 1, 2022

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by @roryabraham in version: 1.1.33-3 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

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

Labels

InternalQA This pull request required internal QA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants