diff options
| author | 2025-04-18 09:20:15 +0200 | |
|---|---|---|
| committer | 2025-04-18 09:20:15 +0200 | |
| commit | 0263c87035712ff6bd7ef57354b6425803eefc1d (patch) | |
| tree | a1c37998663b12b1a3fdb56a83b9fe15220a56c7 /main.c | |
| parent | Renamed command-line option to 'list_add' and added new 'list_del'. (diff) | |
| download | snac2-0263c87035712ff6bd7ef57354b6425803eefc1d.tar.gz snac2-0263c87035712ff6bd7ef57354b6425803eefc1d.tar.xz snac2-0263c87035712ff6bd7ef57354b6425803eefc1d.zip | |
Simplified 'list_del' to use the account the user said.
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 13 |
1 files changed, 3 insertions, 10 deletions
| @@ -383,17 +383,10 @@ int main(int argc, char *argv[]) | |||
| 383 | xs *lid = list_maint(&snac, url, 4); | 383 | xs *lid = list_maint(&snac, url, 4); |
| 384 | 384 | ||
| 385 | if (lid != NULL) { | 385 | if (lid != NULL) { |
| 386 | xs *actor = NULL; | 386 | xs *md5 = xs_md5_hex(account, strlen(account)); |
| 387 | xs *uid = NULL; | ||
| 388 | |||
| 389 | if (valid_status(webfinger_request(account, &actor, &uid))) { | ||
| 390 | xs *md5 = xs_md5_hex(actor, strlen(actor)); | ||
| 391 | 387 | ||
| 392 | list_content(&snac, lid, md5, 2); | 388 | list_content(&snac, lid, md5, 2); |
| 393 | printf("Actor %s (%s) deleted from list '%s' (%s)\n", actor, uid, url, lid); | 389 | printf("Actor %s deleted from list '%s' (%s)\n", account, url, lid); |
| 394 | } | ||
| 395 | else | ||
| 396 | fprintf(stderr, "Cannot resolve account '%s'\n", account); | ||
| 397 | } | 390 | } |
| 398 | else | 391 | else |
| 399 | fprintf(stderr, "Cannot find a list named '%s'\n", url); | 392 | fprintf(stderr, "Cannot find a list named '%s'\n", url); |