feat(serwersms): add group messaging support#6610
feat(serwersms): add group messaging support#6610CommanderStorm merged 4 commits intolouislam:masterfrom
Conversation
Adds the ability to send notifications to a SerwerSMS group instead of just a single phone number. Users can now choose between 'Phone number' or 'Group' as the recipient type. - Add recipient type dropdown in UI - Conditionally show phone number or group ID field - Backend sends 'group' param instead of 'phone' when group is selected - Add translation keys for new UI elements Fixes louislam#6000
|
@louislam @CommanderStorm Please review the PR and let me know your feedbacks. |
CommanderStorm
left a comment
There was a problem hiding this comment.
Code LGTM.
Could you share a screenshot of a notification being send succssfully to a group?
We can merge if I have a screenshot that it works 😉
This is especailly since https://dev.serwersms.pl/en/https-api-v2/sending-sms-messages-with-the-same-content does not show the group key only group_id
Per SerwerSMS API docs, the parameter for group messaging is 'group_id', not 'group'.
- Add help text for group ID field with detailed description - Help text explains how to find group IDs in Customer Panel
Since the platform requires a company email address, it's hard for me to share the screenshot. |
CommanderStorm
left a comment
There was a problem hiding this comment.
Since the docs are fairly good on this one, I am inclided to accept it without the usual screenshot that we require for all notification providers
There was a problem hiding this comment.
Pull request overview
This PR adds group messaging support to the SerwerSMS notification provider, allowing users to send notifications to predefined groups in addition to individual phone numbers. This is a non-breaking enhancement that maintains backward compatibility with existing phone number-based notifications.
Key changes:
- Added UI toggle between "Phone number" and "Group" recipient types
- Conditional form fields display appropriate input based on selection
- Backend logic sends either
phoneorgroup_idparameter to the API accordingly
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/lang/en.json |
Added translation keys for recipient type selector and group ID field with help text |
src/components/notifications/SerwerSMS.vue |
Added recipient type dropdown and conditional rendering for phone number vs group ID input fields |
server/notification-providers/serwersms.js |
Updated backend logic to conditionally send phone or group_id parameter based on recipient type |
📝 Summary of changes done and why they are done
Adds group messaging support to the SerwerSMS notification provider.
Currently, SerwerSMS only allows sending notifications to a single phone number. However, the SerwerSMS API already supports sending messages to predefined groups. This change exposes that capability in the UI, letting users choose whether to send to a phone number or a group.
What changed:
phoneorgroupparameter to the APIThis is a non-breaking change — existing notifications using phone numbers continue to work as before.
📋 Related issues
📄 Checklist
Please follow this checklist to avoid unnecessary back and forth (click to expand)
I understand that I am responsible for and able to explain every line of code I submit.
📷 Screenshots or Visual Changes
| Phone number | Group |
|--------------|-------|
|
Files changed:
server/notification-providers/serwersms.js— Backend logic to sendgroupparam when group is selectedsrc/components/notifications/SerwerSMS.vue— UI with recipient type dropdown and conditional fieldssrc/lang/en.json— Added translation keys for new UI elementsContribution by Gittensor, see my contribution statistics at https://gittensor.io/miners/details?githubId=94194147