diff options
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 13 |
1 files changed, 9 insertions, 4 deletions
| @@ -45,6 +45,7 @@ int usage(const char *cmd) | |||
| 45 | "note {basedir} {uid} {text} [files...] Sends a note with optional attachments\n" | 45 | "note {basedir} {uid} {text} [files...] Sends a note with optional attachments\n" |
| 46 | "note_unlisted {basedir} {uid} {text} [files...] Sends an unlisted note with optional attachments\n" | 46 | "note_unlisted {basedir} {uid} {text} [files...] Sends an unlisted note with optional attachments\n" |
| 47 | "note_mention {basedir} {uid} {text} [files...] Sends a note only to mentioned accounts\n" | 47 | "note_mention {basedir} {uid} {text} [files...] Sends a note only to mentioned accounts\n" |
| 48 | "note_followers {basedir} {uid} {text} [files...] Sends a note only to followers\n" | ||
| 48 | "boost|announce {basedir} {uid} {url} Boosts (announces) a post\n" | 49 | "boost|announce {basedir} {uid} {url} Boosts (announces) a post\n" |
| 49 | "unboost {basedir} {uid} {url} Unboosts a post\n" | 50 | "unboost {basedir} {uid} {url} Unboosts a post\n" |
| 50 | "resetpwd {basedir} {uid} Resets the password of a user\n" | 51 | "resetpwd {basedir} {uid} Resets the password of a user\n" |
| @@ -800,7 +801,8 @@ int main(int argc, char *argv[]) | |||
| 800 | 801 | ||
| 801 | if (strcmp(cmd, "note") == 0 || /** **/ | 802 | if (strcmp(cmd, "note") == 0 || /** **/ |
| 802 | strcmp(cmd, "note_unlisted") == 0 || /** **/ | 803 | strcmp(cmd, "note_unlisted") == 0 || /** **/ |
| 803 | strcmp(cmd, "note_mention") == 0) { /** **/ | 804 | strcmp(cmd, "note_mention") == 0 || /** **/ |
| 805 | strcmp(cmd, "note_followers") == 0) { /** **/ | ||
| 804 | xs *content = NULL; | 806 | xs *content = NULL; |
| 805 | xs *msg = NULL; | 807 | xs *msg = NULL; |
| 806 | xs *c_msg = NULL; | 808 | xs *c_msg = NULL; |
| @@ -909,12 +911,15 @@ int main(int argc, char *argv[]) | |||
| 909 | return 1; | 911 | return 1; |
| 910 | } | 912 | } |
| 911 | 913 | ||
| 912 | int scope = 0; | 914 | int scope = SCOPE_PUBLIC; |
| 913 | if (strcmp(cmd, "note_mention") == 0) | 915 | if (strcmp(cmd, "note_mention") == 0) |
| 914 | scope = 1; | 916 | scope = SCOPE_MENTIONED; |
| 915 | else | 917 | else |
| 916 | if (strcmp(cmd, "note_unlisted") == 0) | 918 | if (strcmp(cmd, "note_unlisted") == 0) |
| 917 | scope = 2; | 919 | scope = SCOPE_UNLISTED; |
| 920 | else | ||
| 921 | if (strcmp(cmd, "note_followers") == 0) | ||
| 922 | scope = SCOPE_FOLLOWERS; | ||
| 918 | 923 | ||
| 919 | msg = msg_note(&snac, content, NULL, in_reply_to, attl, scope, getenv("LANG"), post_date); | 924 | msg = msg_note(&snac, content, NULL, in_reply_to, attl, scope, getenv("LANG"), post_date); |
| 920 | 925 | ||