Skip to content

Commit 6867085

Browse files
committed
chore: update to use senderId
1 parent 3f34bac commit 6867085

5 files changed

Lines changed: 7 additions & 8 deletions

File tree

.env.dev

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ FAST2SMS_SENDER_ID=
3434
FAST2SMS_MESSAGE_ID=
3535
FAST2SMS_TO=
3636
INFORU_API_TOKEN=
37-
INFORU_SENDER=
37+
INFORU_SENDER_ID=

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
FAST2SMS_MESSAGE_ID: ${{ secrets.FAST2SMS_MESSAGE_ID }}
5151
FAST2SMS_TO: ${{ secrets.FAST2SMS_TO }}
5252
INFORU_API_TOKEN: ${{ secrets.INFORU_API_TOKEN }}
53-
INFORU_SENDER: ${{ secrets.INFORU_SENDER }}
53+
INFORU_SENDER_ID: ${{ secrets.INFORU_SENDER_ID }}
5454
run: |
5555
docker compose up -d --build
5656
sleep 5

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ services:
4343
- FAST2SMS_MESSAGE_ID
4444
- FAST2SMS_TO
4545
- INFORU_API_TOKEN
46-
- INFORU_SENDER
46+
- INFORU_SENDER_ID
4747

4848
maildev:
4949
image: appwrite/mailcatcher:1.0.0

src/Utopia/Messaging/Adapter/SMS/Inforu.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ class Inforu extends SMSAdapter
1414

1515
/**
1616
* @param string $apiToken Inforu API token
17-
* @param string $sender Sender name/number
17+
* @param string $senderId Sender ID
1818
*/
1919
public function __construct(
2020
private string $apiToken,
21-
private string $sender
21+
private string $senderId
2222
) {
2323
}
2424

@@ -60,7 +60,7 @@ protected function process(SMSMessage $message): array
6060
'Message' => $message->getContent(),
6161
'Recipients' => $recipients,
6262
'Settings' => [
63-
'Sender' => $this->sender,
63+
'Sender' => $this->senderId,
6464
],
6565
],
6666
],

tests/Messaging/Adapter/SMS/InforuTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,12 @@ public function testSendSMS(): void
1515
{
1616
$sender = new Inforu(
1717
apiToken: \getenv('INFORU_API_TOKEN'),
18-
sender: \getenv('INFORU_SENDER')
18+
senderId: \getenv('INFORU_SENDER_ID')
1919
);
2020

2121
$message = new SMS(
2222
to: ['0541234567'],
2323
content: 'Test Content',
24-
from: '+987654321'
2524
);
2625

2726
$response = $sender->send($message);

0 commit comments

Comments
 (0)