iachat/spec/services
Vinay Keerthi 059506b1db
feat: Add automatic favicon fetching for companies (#13013)
## Summary

This Enterprise-only feature automatically fetches a favicon for
companies created with a domain, and adds a batch task to backfill
missing avatars for existing companies. The flow only targets companies
that do not already have an attached avatar, so existing avatars are
left untouched.


## Demo 



https://github.com/user-attachments/assets/d050334e-769f-4e46-b6e7-f7423727a192



## What changed

- Added `Avatar::AvatarFromFaviconJob` to build a Google favicon URL
from the company domain and fetch it through `Avatar::AvatarFromUrlJob`
- Triggered favicon fetching from `Company` with `after_create_commit`
- Added `Companies::FetchAvatarsJob` to batch existing companies that
are missing avatars
- Added `companies:fetch_missing_avatars` under `enterprise/lib/tasks`
- Kept the company-specific implementation inside the Enterprise
boundary
- Stubbed the new favicon request in unrelated specs that now hit this
callback indirectly
- Updated a couple of CI-sensitive specs that were failing due to
callback side effects / reload-safe exception assertions

## How to verify

1. Create a company in Enterprise with a valid domain and no avatar.
2. Confirm that a favicon-based avatar gets attached shortly after
creation.
3. Create another company with a domain and an avatar already attached.
4. Confirm that the existing avatar is not replaced.
5. Run `companies:fetch_missing_avatars`.
6. Confirm that existing companies without avatars get one, while
companies that already have avatars remain unchanged.

## Notes

- This change does not refresh or overwrite existing company avatars
- Favicon fetching only runs for companies with a present domain
- The branch includes the latest `develop`

---------

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Sojan Jose <sojan@pepalo.com>
2026-03-05 18:51:28 -08:00
..
account feat: Add automatic favicon fetching for companies (#13013) 2026-03-05 18:51:28 -08:00
auto_assignment perf: add default configs for assignment V2 (#13577) 2026-02-23 15:08:11 +05:30
automation_rules fix: country_code should be checked against the contact (#13186) 2026-01-13 14:47:27 +05:30
contacts feat: Bulk delete for contacts (#12778) 2025-11-04 17:47:53 -08:00
conversations feat: APIs to assign agents_bots as assignee in conversations (#12836) 2025-11-18 18:20:58 -08:00
crm/leadsquared test(leadsquared): make ApiError specs reload-safe (#13098) 2025-12-17 13:30:34 -08:00
email chore: Migrate mailers from the worker to jobs (#12331) 2025-10-21 16:36:37 -07:00
facebook feat(facebook): use HUMAN_AGENT tag for Messenger replies when human-agent config is enabled (#13690) 2026-03-02 15:32:59 +04:00
google feat: add Google Email fetch and OAuth token refresh service (#9603) 2024-06-11 14:22:03 +05:30
imap feat: Add configurable interval for IMAP sync (#9302) 2024-04-25 18:58:20 -07:00
instagram feat: Handle instagram test service (#11244) 2025-04-11 19:11:29 +05:30
internal feat: add job to remove stale contacts and contact_inboxes (#11186) 2025-03-28 12:18:39 +05:30
labels fix: Update associations when a label is updated (#3046) 2021-09-21 10:16:32 +05:30
line feat(inbox): Enable conversation continuity for social channels (#11079) 2026-02-25 13:56:51 +04:00
linear feat: Whatsapp embedded signup (#11612) 2025-07-14 21:37:06 -07:00
liquid feat: Add liquid processing for SMS campaigns (#10981) 2025-06-11 13:16:44 -04:00
llm_formatter feat: Differentiate bot and user in the summary (#12801) 2025-11-05 11:42:21 -08:00
macros feat: Add webhook event support for macros (#11235) 2025-04-02 20:26:55 -07:00
mailbox refactor: strategy pattern for mailbox conversation finding (#12766) 2025-11-10 20:47:18 +05:30
message_templates fix: Captain not responding to campaign conversations (#13489) 2026-02-12 10:07:56 +05:30
messages fix: Skip notifications for private notes (#13617) 2026-02-23 15:40:54 +04:00
mfa feat: MFA (#12290) 2025-09-18 20:19:24 +05:30
microsoft chore: Refactor RefreshOauthTokenService to improve readability (#8820) 2024-01-31 12:24:12 +04:00
notification chore: Disable email notifications for unconfirmed users (#10964) 2025-02-24 12:14:40 -08:00
sms fix: Error shouldn't halt the campaign for entire audience (#11980) 2025-08-11 12:03:48 +05:30
telegram feat(inbox): Enable conversation continuity for social channels (#11079) 2026-02-25 13:56:51 +04:00
tiktok feat(inbox): Enable conversation continuity for social channels (#11079) 2026-02-25 13:56:51 +04:00
twilio feat: Add support for sending CSAT surveys via templates (Whatsapp Twilio) (#13143) 2026-01-13 16:32:02 +04:00
twitter chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
whatsapp feat(csat): Add WhatsApp utility template analyzer with rewrite guidance (#13575) 2026-02-24 15:11:04 +04:00
widget feat: speed up circleci and github actions (#12849) 2025-11-19 15:32:48 +05:30
account_deletion_service_spec.rb fix(account-deletion): normalize deleted email suffix and handle collisions safely (#13472) 2026-02-07 17:29:27 -08:00
action_service_spec.rb chore: Add open conversation option (#11828) 2025-07-02 10:01:50 +05:30
base_token_service_spec.rb feat: MFA (#12290) 2025-09-18 20:19:24 +05:30
csat_survey_service_spec.rb fix: Respect survey label rules for WhatsApp CSAT template (#13285) 2026-01-15 22:16:00 -08:00
csat_template_utility_analysis_service_spec.rb feat(csat): Add WhatsApp utility template analyzer with rewrite guidance (#13575) 2026-02-24 15:11:04 +04:00
search_service_spec.rb feat: Advanced Search Backend (#12917) 2026-01-07 15:30:49 +05:30