diff options
| author | 2025-01-26 17:55:36 +0100 | |
|---|---|---|
| committer | 2025-01-26 17:55:36 +0100 | |
| commit | 6097ba55cf96444aac7fb9b74295722e8e5c3810 (patch) | |
| tree | 7ea9619f803827699675518bce1c801030b63014 /main.c | |
| parent | Fixed crash in the notification area after deleting a post. (diff) | |
| download | snac2-6097ba55cf96444aac7fb9b74295722e8e5c3810.tar.gz snac2-6097ba55cf96444aac7fb9b74295722e8e5c3810.tar.xz snac2-6097ba55cf96444aac7fb9b74295722e8e5c3810.zip | |
New command-line option 'unmute'.
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 13 |
1 files changed, 13 insertions, 0 deletions
| @@ -49,6 +49,7 @@ int usage(void) | |||
| 49 | printf("unblock {basedir} {instance_url} Unblocks a full instance\n"); | 49 | printf("unblock {basedir} {instance_url} Unblocks a full instance\n"); |
| 50 | printf("limit {basedir} {uid} {actor} Limits an actor (drops their announces)\n"); | 50 | printf("limit {basedir} {uid} {actor} Limits an actor (drops their announces)\n"); |
| 51 | printf("unlimit {basedir} {uid} {actor} Unlimits an actor\n"); | 51 | printf("unlimit {basedir} {uid} {actor} Unlimits an actor\n"); |
| 52 | printf("unmute {basedir} {uid} {actor} Unmutes a previously muted actor\n"); | ||
| 52 | printf("verify_links {basedir} {uid} Verifies a user's links (in the metadata)\n"); | 53 | printf("verify_links {basedir} {uid} Verifies a user's links (in the metadata)\n"); |
| 53 | printf("search {basedir} {uid} {regex} Searches posts by content\n"); | 54 | printf("search {basedir} {uid} {regex} Searches posts by content\n"); |
| 54 | printf("export_csv {basedir} {uid} Exports data as CSV files\n"); | 55 | printf("export_csv {basedir} {uid} Exports data as CSV files\n"); |
| @@ -446,6 +447,18 @@ int main(int argc, char *argv[]) | |||
| 446 | return 0; | 447 | return 0; |
| 447 | } | 448 | } |
| 448 | 449 | ||
| 450 | if (strcmp(cmd, "unmute") == 0) { /** **/ | ||
| 451 | if (is_muted(&snac, url)) { | ||
| 452 | unmute(&snac, url); | ||
| 453 | |||
| 454 | printf("%s unmuted\n", url); | ||
| 455 | } | ||
| 456 | else | ||
| 457 | printf("%s actor is not muted\n", url); | ||
| 458 | |||
| 459 | return 0; | ||
| 460 | } | ||
| 461 | |||
| 449 | if (strcmp(cmd, "search") == 0) { /** **/ | 462 | if (strcmp(cmd, "search") == 0) { /** **/ |
| 450 | int to; | 463 | int to; |
| 451 | 464 | ||