chatwoot/app/controllers
Shivam Mishra f18ed01eb7
feat: use of imap login as default if present (#10249)
When moving form using Gmail Legacy auth to using OAuth, we need the
email address that will be used to connect. This is because we need to
store this email address in the cache and reuse when we get the callback
to find the associated inbox.

However there are cases where the imap login might be
`support@company.com` and the email used to communicate will be
`contact@company.com` (Probably an alias) In that case, we need to send
the correct email address to Chatwoot when re-authenticating

At the moment, we used the inbox email. This PR adds a check that
defaults to to `imap_login` if that is available and imap is enabled

This PR also fixes an unrelated problem where the email inbox creation
flow was not working

---

Tested it, it is working correctly

![CleanShot 2024-10-09 at 14 23
47@2x](https://github.com/user-attachments/assets/0e2cb6c8-1224-4b45-b34a-7b19611249bc)
2024-10-09 15:01:11 +05:30
..
api chore: Custom Roles to manage permissions [ UI ] (#9865) 2024-09-17 11:40:11 -07:00
concerns feat: add Google login flow and inbox creation (#9580) 2024-06-07 16:37:46 +05:30
devise_overrides fix: Fixes 9012 Cancelling Google OAuth signup redirects user to /auth/sign_in (#9022) 2024-04-10 12:12:48 +05:30
google feat: use of imap login as default if present (#10249) 2024-10-09 15:01:11 +05:30
installation feat: Unify user and super admin credentials (#3830) 2022-01-25 16:58:49 -08:00
microsoft feat: add Google login flow and inbox creation (#9580) 2024-06-07 16:37:46 +05:30
platform/api/v1 fix: downcase email before finding (#8921) 2024-02-21 18:51:00 +05:30
public/api/v1 fix: Remove draft articles from the help center search (#10116) 2024-09-16 15:47:44 +05:30
super_admin feat: FCM HTTP v1 API changes (#9629) 2024-06-18 10:38:06 +05:30
survey feat: CSAT response collection public page (#2685) 2021-08-03 18:22:50 +05:30
twilio feat: Add delivery status for Twilio Channel (#8082) 2023-10-11 21:17:46 +05:30
twitter fix: response body in twitter callback (#6907) 2023-04-14 16:48:28 +05:30
webhooks feat: Support for Whatsapp Cloud API (#4938) 2022-07-06 21:45:03 +02:00
android_app_controller.rb chore: Universal Linking for Android (#2324) 2021-06-02 08:46:45 -07:00
api_controller.rb chore: Upgrade to Rails 7 (#6719) 2023-05-06 10:44:52 +05:30
apple_app_controller.rb Chore: Apple site association file for deep linking (#805) 2020-05-03 12:16:11 +05:30
application_controller.rb feat: Conversation API to return applied_sla and sla_events (#9174) 2024-04-01 23:30:07 +05:30
dashboard_controller.rb feat: Vite + vue 3 💚 (#10047) 2024-10-02 00:36:30 -07:00
microsoft_controller.rb feat: move Azure config to installation_config (#9481) 2024-05-20 11:52:42 +05:30
oauth_callback_controller.rb feat: use of imap login as default if present (#10249) 2024-10-09 15:01:11 +05:30
platform_controller.rb Chore: Inbox Members API improvements (#3008) 2021-09-14 11:55:02 +05:30
public_controller.rb fix: Locale not correct in root url when accessing help center with custom domain (#9110) 2024-03-19 18:48:59 +05:30
slack_uploads_controller.rb fix: Set avatar for users(agent/contact) in slack channels (#7960) 2023-09-26 09:38:14 +05:30
swagger_controller.rb chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
widget_tests_controller.rb feat: Support Dark mode for the widget (#4137) 2022-04-01 20:59:03 +05:30
widgets_controller.rb chore: Upgrade to Rails 7 (#6719) 2023-05-06 10:44:52 +05:30