commit 7e5b02b

default  ·  2023-07-04 14:57:17 +0000 UTC
parent 6fce560
Fixed weird prototype of process_tags().
1 files changed,  +6, -5
+6, -5
 1@@ -449,7 +449,7 @@ int is_msg_for_me(snac *snac, const xs_dict *c_msg)
 2 }
 3 
 4 
 5-void process_tags(snac *snac, const char *content, xs_str **n_content, xs_list **tag)
 6+xs_str *process_tags(snac *snac, const char *content, xs_list **tag)
 7 /* parses mentions and tags from content */
 8 {
 9     xs_str *nc  = xs_str_new(NULL);
10@@ -559,8 +559,9 @@ void process_tags(snac *snac, const char *content, xs_str **n_content, xs_list *
11         n++;
12     }
13 
14-    *n_content = nc;
15-    *tag       = tl;
16+    *tag = tl;
17+
18+    return nc;
19 }
20 
21 
22@@ -858,7 +859,7 @@ xs_dict *msg_actor(snac *snac)
23     msg = xs_dict_set(msg, "published",         xs_dict_get(snac->config, "published"));
24 
25     xs *f_bio_2 = not_really_markdown(xs_dict_get(snac->config, "bio"), NULL);
26-    process_tags(snac, f_bio_2, &f_bio, &tags);
27+    f_bio = process_tags(snac, f_bio_2, &tags);
28     msg = xs_dict_set(msg, "summary", f_bio);
29     msg = xs_dict_set(msg, "tag", tags);
30 
31@@ -1059,7 +1060,7 @@ xs_dict *msg_note(snac *snac, const xs_str *content, const xs_val *rcpts,
32         irt = xs_val_new(XSTYPE_NULL);
33 
34     /* extract the mentions and hashtags and convert the content */
35-    process_tags(snac, fc2, &fc1, &tag);
36+    fc1 = process_tags(snac, fc2, &tag);
37 
38     /* create the attachment list, if there are any */
39     if (!xs_is_null(attach)) {