diff options
| author | 2024-09-19 19:47:07 +0200 | |
|---|---|---|
| committer | 2024-09-19 19:47:07 +0200 | |
| commit | a0d1d13441cc0f766bcd49477bc9f0015639f246 (patch) | |
| tree | fbd2933a01743ce92c9b46e23ee99caee1c0e9f6 | |
| parent | Updated RELEASE_NOTES. (diff) | |
| download | penes-snac2-a0d1d13441cc0f766bcd49477bc9f0015639f246.tar.gz penes-snac2-a0d1d13441cc0f766bcd49477bc9f0015639f246.tar.xz penes-snac2-a0d1d13441cc0f766bcd49477bc9f0015639f246.zip | |
Changed some migration terminology.
| -rw-r--r-- | activitypub.c | 6 | ||||
| -rw-r--r-- | main.c | 12 |
2 files changed, 9 insertions, 9 deletions
diff --git a/activitypub.c b/activitypub.c index b15b883..7a8d4fa 100644 --- a/activitypub.c +++ b/activitypub.c | |||
| @@ -1242,7 +1242,7 @@ xs_dict *msg_actor(snac *snac) | |||
| 1242 | } | 1242 | } |
| 1243 | 1243 | ||
| 1244 | /* does this user have an aka? */ | 1244 | /* does this user have an aka? */ |
| 1245 | const char *aka = xs_dict_get(snac->config, "aka"); | 1245 | const char *aka = xs_dict_get(snac->config, "alias"); |
| 1246 | if (xs_type(aka) == XSTYPE_STRING && *aka) { | 1246 | if (xs_type(aka) == XSTYPE_STRING && *aka) { |
| 1247 | xs *loaka = xs_list_append(xs_list_new(), aka); | 1247 | xs *loaka = xs_list_append(xs_list_new(), aka); |
| 1248 | 1248 | ||
| @@ -2669,10 +2669,10 @@ int process_queue(void) | |||
| 2669 | int migrate_account(snac *user) | 2669 | int migrate_account(snac *user) |
| 2670 | /* migrates this account to a new one (stored in the 'aka' user field) */ | 2670 | /* migrates this account to a new one (stored in the 'aka' user field) */ |
| 2671 | { | 2671 | { |
| 2672 | const char *new_account = xs_dict_get(user->config, "aka"); | 2672 | const char *new_account = xs_dict_get(user->config, "alias"); |
| 2673 | 2673 | ||
| 2674 | if (xs_type(new_account) != XSTYPE_STRING) { | 2674 | if (xs_type(new_account) != XSTYPE_STRING) { |
| 2675 | snac_log(user, xs_fmt("Cannot migrate: 'aka' (new account) not defined")); | 2675 | snac_log(user, xs_fmt("Cannot migrate: alias (destination account) not set")); |
| 2676 | return 1; | 2676 | return 1; |
| 2677 | } | 2677 | } |
| 2678 | 2678 | ||
| @@ -25,7 +25,7 @@ int usage(void) | |||
| 25 | printf("httpd {basedir} Starts the HTTPD daemon\n"); | 25 | printf("httpd {basedir} Starts the HTTPD daemon\n"); |
| 26 | printf("purge {basedir} Purges old data\n"); | 26 | printf("purge {basedir} Purges old data\n"); |
| 27 | printf("state {basedir} Prints server state\n"); | 27 | printf("state {basedir} Prints server state\n"); |
| 28 | printf("webfinger {basedir} {actor} Queries about an actor (@user@host or actor url)\n"); | 28 | printf("webfinger {basedir} {account} Queries about an account (@user@host or actor url)\n"); |
| 29 | printf("queue {basedir} {uid} Processes a user queue\n"); | 29 | printf("queue {basedir} {uid} Processes a user queue\n"); |
| 30 | printf("follow {basedir} {uid} {actor} Follows an actor\n"); | 30 | printf("follow {basedir} {uid} {actor} Follows an actor\n"); |
| 31 | printf("unfollow {basedir} {uid} {actor} Unfollows an actor\n"); | 31 | printf("unfollow {basedir} {uid} {actor} Unfollows an actor\n"); |
| @@ -36,7 +36,7 @@ int usage(void) | |||
| 36 | printf("unboost {basedir} {uid} {url} Unboosts a post\n"); | 36 | printf("unboost {basedir} {uid} {url} Unboosts a post\n"); |
| 37 | printf("resetpwd {basedir} {uid} Resets the password of a user\n"); | 37 | printf("resetpwd {basedir} {uid} Resets the password of a user\n"); |
| 38 | printf("ping {basedir} {uid} {actor} Pings an actor\n"); | 38 | printf("ping {basedir} {uid} {actor} Pings an actor\n"); |
| 39 | printf("webfinger_s {basedir} {uid} {actor} Queries about an actor (@user@host or actor url)\n"); | 39 | printf("webfinger_s {basedir} {uid} {account} Queries about an account (@user@host or actor url)\n"); |
| 40 | printf("pin {basedir} {uid} {msg_url} Pins a message\n"); | 40 | printf("pin {basedir} {uid} {msg_url} Pins a message\n"); |
| 41 | printf("unpin {basedir} {uid} {msg_url} Unpins a message\n"); | 41 | printf("unpin {basedir} {uid} {msg_url} Unpins a message\n"); |
| 42 | printf("bookmark {basedir} {uid} {msg_url} Bookmarks a message\n"); | 42 | printf("bookmark {basedir} {uid} {msg_url} Bookmarks a message\n"); |
| @@ -47,9 +47,9 @@ int usage(void) | |||
| 47 | printf("unlimit {basedir} {uid} {actor} Unlimits an actor\n"); | 47 | printf("unlimit {basedir} {uid} {actor} Unlimits an actor\n"); |
| 48 | printf("verify_links {basedir} {uid} Verifies a user's links (in the metadata)\n"); | 48 | printf("verify_links {basedir} {uid} Verifies a user's links (in the metadata)\n"); |
| 49 | printf("search {basedir} {uid} {regex} Searches posts by content\n"); | 49 | printf("search {basedir} {uid} {regex} Searches posts by content\n"); |
| 50 | printf("aka {basedir} {uid} {actor} Sets actor (@user@host or url) as the a.k.a.\n"); | 50 | printf("alias {basedir} {uid} {account} Sets account (@user@host or actor url) as an alias\n"); |
| 51 | printf("export_csv {basedir} {uid} Exports data as CSV files into current directory\n"); | 51 | printf("export_csv {basedir} {uid} Exports data as CSV files into current directory\n"); |
| 52 | printf("migrate {basedir} {uid} Migrates the account to the one set as the a.k.a.\n"); | 52 | printf("migrate {basedir} {uid} Migrates to the account defined as the alias\n"); |
| 53 | 53 | ||
| 54 | return 1; | 54 | return 1; |
| 55 | } | 55 | } |
| @@ -281,7 +281,7 @@ int main(int argc, char *argv[]) | |||
| 281 | if ((url = GET_ARGV()) == NULL) | 281 | if ((url = GET_ARGV()) == NULL) |
| 282 | return usage(); | 282 | return usage(); |
| 283 | 283 | ||
| 284 | if (strcmp(cmd, "aka") == 0) { /** **/ | 284 | if (strcmp(cmd, "alias") == 0) { /** **/ |
| 285 | xs *actor = NULL; | 285 | xs *actor = NULL; |
| 286 | xs *uid = NULL; | 286 | xs *uid = NULL; |
| 287 | int status = HTTP_STATUS_OK; | 287 | int status = HTTP_STATUS_OK; |
| @@ -292,7 +292,7 @@ int main(int argc, char *argv[]) | |||
| 292 | status = webfinger_request(url, &actor, &uid); | 292 | status = webfinger_request(url, &actor, &uid); |
| 293 | 293 | ||
| 294 | if (valid_status(status)) { | 294 | if (valid_status(status)) { |
| 295 | snac.config = xs_dict_set(snac.config, "aka", actor); | 295 | snac.config = xs_dict_set(snac.config, "alias", actor); |
| 296 | 296 | ||
| 297 | user_persist(&snac, 1); | 297 | user_persist(&snac, 1); |
| 298 | } | 298 | } |