Skip to content

Commit 0fc462a

Browse files
committed
[commands] minor fixes
1 parent 90062e6 commit 0fc462a

2 files changed

Lines changed: 14 additions & 9 deletions

File tree

README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ smsgate [global options] command [command options] [arguments...]
134134

135135
### Commands
136136

137-
The CLI offers four main groups of commands:
137+
The CLI offers three main groups of commands:
138138

139139
- **Messages**: Commands for sending messages and checking their status, including batch operations from CSV and Excel files.
140140
- **Webhooks**: Commands for managing webhooks, including creating, updating, and deleting them.
@@ -239,7 +239,7 @@ The CLI supports sending messages in bulk from CSV and Excel files. The `batch s
239239
smsgate batch send contacts.csv --map phone=Phone,text=Message
240240

241241
# Send messages from an Excel file with specific sheet
242-
smsgate batch send campaign.xlsx --sheet Sheet1 --map phone=A,text=B
242+
smsgate batch send campaign.xlsx --sheet Sheet1 --map phone=Phone,text=Message
243243

244244
# Send with custom delimiter and no header
245245
smsgate batch send data.csv --delimiter ';' --header=false --map phone=col_1,text=col_2
@@ -265,13 +265,14 @@ The shared delivery/device options from the `send` command are also available (e
265265

266266
The `--map` option defines how columns in your file map to message fields:
267267

268-
| Field | Required | Description |
269-
| ------------ | -------- | ------------------------------------- |
270-
| `phone` || Phone number column |
271-
| `text` || Message text column |
272-
| `device_id` || Device identifier column |
273-
| `sim_number` || SIM number column (1-255) |
274-
| `priority` || Message priority column (-128 to 127) |
268+
| Field | Required | Description |
269+
| ------------ | -------- | --------------------------------------------- |
270+
| `phone` || Phone number column |
271+
| `text` || Message text column |
272+
| `id` || Message ID column (UUID generated when empty) |
273+
| `device_id` || Device identifier column |
274+
| `sim_number` || SIM number column (1-255) |
275+
| `priority` || Message priority column (-128 to 127) |
275276

276277
**Mapping examples:**
277278

internal/commands/messages/batch/batch_send.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,10 @@ func batchSendAction(c *cli.Context) error {
189189
)
190190

191191
for _, result := range results {
192+
if result.Error != nil {
193+
continue
194+
}
195+
192196
line, renderErr := renderer.MessageState(result.State)
193197
if renderErr != nil {
194198
return cli.Exit(renderErr.Error(), codes.OutputError)

0 commit comments

Comments
 (0)