25 Commits

Author SHA1 Message Date
Muhsin Keloth
ee9f1d7adb chore: Handle WebPush rate limiting in push notification service (#12184)
Implemented a rescue block for WebPush::TooManyRequests that logs
warnings during rate limiting events. This captures user email and
account ID for better traceability. We will implement a proper
throttling mechanism after identifying patterns across accounts.
2025-08-13 13:32:22 +05:30
Sojan Jose
e97489f534 chore: Disable email notifications for unconfirmed users (#10964)
- disable email notifications if the user hasn't confirmed the email yet, as there is potential chance for the emails to bounce
2025-02-24 12:14:40 -08:00
Pranav
f7f687ce53 fix: Update notification payload (#9666)
- Fix notification payload to avoid argument error.
2024-06-21 17:28:48 -07:00
Pranav
ee2844877c fix: Add catch for additional webpush errors (#9662)
Webpush gem throws errors such as `WebPush::ExpiredSubscription`,
`WebPush::InvalidSubscription`, `WebPush::Unauthorized`. We handled only
ExpiredSubscription.

If the SDK threw any other errors, it would pause sending the
notification to all other devices for that user. This change would
update the logic to remove the expired subscription and handle the rest
of the errors gracefully.

Fixes
https://linear.app/chatwoot/issue/CW-3399/webpushinvalidsubscription-host-fcmgoogleapiscom-nethttpnotfound-404
2024-06-21 14:58:36 -07:00
Muhsin Keloth
9046730206 feat: FCM HTTP v1 API changes (#9629)
Fixes https://linear.app/chatwoot/issue/CW-3210/legacy-firebase-changes
2024-06-18 10:38:06 +05:30
Muhsin Keloth
ef90b7a3d8 feat: Revamp the notification title and content (#8988) 2024-03-06 20:51:56 +05:30
Muhsin Keloth
6b0d1d77d3 fix: Email notifications (#8502) 2023-12-06 15:50:23 +05:30
Sojan Jose
38aee8d9ea chore: Switch to web-push gem (#6390)
- The previous gem, `webpush` was last updated a while ago. Also, with the recent ruby upgrade, we needed a fix for zaru/webpush#106. Hence switching to the `web-push` gem where the issues are fixed.
2023-02-03 18:55:22 +05:30
Pranav Raj S
4b1bb65c92 chore: Add notification ID to tag to make it unique (#5227) 2022-08-09 00:09:11 +05:30
Sojan Jose
4187428729 chore: Update dependencies to the latest versions (#5033) 2022-07-15 09:51:59 +07:00
Vishnu Narayanan
8155024b6a feat: fix logging levels (#4314)
https://ruby-doc.org/stdlib-2.7.0/libdoc/logger/rdoc/Logger.html

Fixes https://github.com/chatwoot/chatwoot/issues/4313
2022-03-28 18:14:30 +05:30
Santhosh C
6cfd7d3836 feat: autogenerate vapid keys for push notifications (#3128)
* feat: Autogenerate push notification keys
* add vapid service class and remove pushkey model
* add spec for vapid service
* unset vapid env keys
* Unset VAPID_PRIVATE_KEY env variable

Co-authored-by: Sojan Jose <sojan@chatwoot.com>
Co-authored-by: Vishnu Narayanan <vishnu@chatwoot.com>
2021-11-09 21:36:32 +05:30
A. Verde
81708f92a8 chore: Fcm notification priority (#3319) 2021-11-08 11:32:07 +05:30
Sojan Jose
9c4ce9af35 chore: Strip unnecessary data from push payload (#2924) 2021-09-09 13:59:42 +05:30
Pranav Raj S
ed317c5bb3 feat: Use relay server for self-hosted mobile push notifications (#2757) 2021-08-17 01:44:16 +05:30
Sojan Jose
467b45b427 feat: Improved password security policy (#2345)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-06-07 17:26:08 +05:30
Sojan Jose
3ade7d4445 chore: Fix push message tag error (#1768) 2021-02-16 00:15:45 +05:30
Sojan Jose
31c07771e8 feat: Notification on new messages in conversation (#1204)
fixes: #895
fixes: #1118
fixes: #1075

Co-authored-by: Pranav Raj S <pranav@thoughtwoot.com>
2020-09-10 19:19:15 +05:30
Sojan Jose
a04ca24def feat: Customisable Email Templates (#1095) 2020-08-06 15:21:06 +05:30
Sojan Jose
04f6460afb Chore: Fix failing sidekiq events for contact create (#966) 2020-06-16 19:39:57 +05:30
Sojan Jose
b0bbd757b5 Chore: FCM Notification Improvements (#957)
Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
2020-06-15 13:36:56 +05:30
Sojan Jose
8b022311c0 Chore: FCM Push Fixes (#934) 2020-06-09 17:42:18 +05:30
Sojan Jose
a13a474c23 Chore: Firebase Cloud Messaging Support (#858) 2020-06-05 00:15:50 +05:30
Pranav Raj S
e9131ea558 Feature: Add web push notification permission in frontend (#766)
Add webpush notification permission in frontend

Co-authored-by: Sojan <sojan@pepalo.com>
2020-05-06 00:10:56 +05:30
Sojan Jose
96da27f1f6 Feature: User Notification Objects (#752)
Co-authored-by: Pranav Raj S <pranavrajs@gmail.com>
2020-05-01 14:53:43 +05:30