summaryrefslogtreecommitdiff
path: root/activitypub.c
diff options
context:
space:
mode:
authorGravatar default2023-07-04 16:57:17 +0200
committerGravatar default2023-07-04 16:57:17 +0200
commit7e5b02be3f3c4bf3b215f300dae240c23065919f (patch)
tree513f0de31e5187251a43b5df796518508834a082 /activitypub.c
parentThe actor bio now accepts tags. (diff)
downloadsnac2-7e5b02be3f3c4bf3b215f300dae240c23065919f.tar.gz
snac2-7e5b02be3f3c4bf3b215f300dae240c23065919f.tar.xz
snac2-7e5b02be3f3c4bf3b215f300dae240c23065919f.zip
Fixed weird prototype of process_tags().
Diffstat (limited to 'activitypub.c')
-rw-r--r--activitypub.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/activitypub.c b/activitypub.c
index 4791ac3..fa592e7 100644
--- a/activitypub.c
+++ b/activitypub.c
@@ -449,7 +449,7 @@ int is_msg_for_me(snac *snac, const xs_dict *c_msg)
449} 449}
450 450
451 451
452void process_tags(snac *snac, const char *content, xs_str **n_content, xs_list **tag) 452xs_str *process_tags(snac *snac, const char *content, xs_list **tag)
453/* parses mentions and tags from content */ 453/* parses mentions and tags from content */
454{ 454{
455 xs_str *nc = xs_str_new(NULL); 455 xs_str *nc = xs_str_new(NULL);
@@ -559,8 +559,9 @@ void process_tags(snac *snac, const char *content, xs_str **n_content, xs_list *
559 n++; 559 n++;
560 } 560 }
561 561
562 *n_content = nc; 562 *tag = tl;
563 *tag = tl; 563
564 return nc;
564} 565}
565 566
566 567
@@ -858,7 +859,7 @@ xs_dict *msg_actor(snac *snac)
858 msg = xs_dict_set(msg, "published", xs_dict_get(snac->config, "published")); 859 msg = xs_dict_set(msg, "published", xs_dict_get(snac->config, "published"));
859 860
860 xs *f_bio_2 = not_really_markdown(xs_dict_get(snac->config, "bio"), NULL); 861 xs *f_bio_2 = not_really_markdown(xs_dict_get(snac->config, "bio"), NULL);
861 process_tags(snac, f_bio_2, &f_bio, &tags); 862 f_bio = process_tags(snac, f_bio_2, &tags);
862 msg = xs_dict_set(msg, "summary", f_bio); 863 msg = xs_dict_set(msg, "summary", f_bio);
863 msg = xs_dict_set(msg, "tag", tags); 864 msg = xs_dict_set(msg, "tag", tags);
864 865
@@ -1059,7 +1060,7 @@ xs_dict *msg_note(snac *snac, const xs_str *content, const xs_val *rcpts,
1059 irt = xs_val_new(XSTYPE_NULL); 1060 irt = xs_val_new(XSTYPE_NULL);
1060 1061
1061 /* extract the mentions and hashtags and convert the content */ 1062 /* extract the mentions and hashtags and convert the content */
1062 process_tags(snac, fc2, &fc1, &tag); 1063 fc1 = process_tags(snac, fc2, &tag);
1063 1064
1064 /* create the attachment list, if there are any */ 1065 /* create the attachment list, if there are any */
1065 if (!xs_is_null(attach)) { 1066 if (!xs_is_null(attach)) {