commit bdb1ce3
default
·
2023-05-12 11:06:38 +0000 UTC
parent 5325da0
Added more comment marks.
1 files changed,
+15,
-15
+15,
-15
1@@ -1382,7 +1382,7 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path,
2 }
3 }
4 else
5- if (strcmp(op, "context") == 0) {
6+ if (strcmp(op, "context") == 0) { /** **/
7 /* return ancestors and children */
8 xs *anc = xs_list_new();
9 xs *des = xs_list_new();
10@@ -1422,8 +1422,8 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path,
11 out = xs_dict_append(out, "descendants", des);
12 }
13 else
14- if (strcmp(op, "reblogged_by") == 0 ||
15- strcmp(op, "favourited_by") == 0) {
16+ if (strcmp(op, "reblogged_by") == 0 || /** **/
17+ strcmp(op, "favourited_by") == 0) { /** **/
18 /* return the list of people who liked or boosted this */
19 out = xs_list_new();
20
21@@ -1719,7 +1719,7 @@ int mastoapi_post_handler(const xs_dict *req, const char *q_path,
22 /* no operation (?) */
23 }
24 else
25- if (strcmp(op, "favourite") == 0) {
26+ if (strcmp(op, "favourite") == 0) { /** **/
27 xs *n_msg = msg_admiration(&snac, id, "Like");
28
29 if (n_msg != NULL) {
30@@ -1730,7 +1730,7 @@ int mastoapi_post_handler(const xs_dict *req, const char *q_path,
31 }
32 }
33 else
34- if (strcmp(op, "unfavourite") == 0) {
35+ if (strcmp(op, "unfavourite") == 0) { /** **/
36 /* partial support: as the original Like message
37 is not stored anywhere here, it's not possible
38 to send an Undo + Like; the only thing done here
39@@ -1738,7 +1738,7 @@ int mastoapi_post_handler(const xs_dict *req, const char *q_path,
40 object_unadmire(id, snac.actor, 1);
41 }
42 else
43- if (strcmp(op, "reblog") == 0) {
44+ if (strcmp(op, "reblog") == 0) { /** **/
45 xs *n_msg = msg_admiration(&snac, id, "Announce");
46
47 if (n_msg != NULL) {
48@@ -1749,32 +1749,32 @@ int mastoapi_post_handler(const xs_dict *req, const char *q_path,
49 }
50 }
51 else
52- if (strcmp(op, "unreblog") == 0) {
53+ if (strcmp(op, "unreblog") == 0) { /** **/
54 /* partial support: see comment in 'unfavourite' */
55 object_unadmire(id, snac.actor, 0);
56 }
57 else
58- if (strcmp(op, "bookmark") == 0) {
59+ if (strcmp(op, "bookmark") == 0) { /** **/
60 /* snac does not support bookmarks */
61 }
62 else
63- if (strcmp(op, "unbookmark") == 0) {
64+ if (strcmp(op, "unbookmark") == 0) { /** **/
65 /* snac does not support bookmarks */
66 }
67 else
68- if (strcmp(op, "pin") == 0) {
69+ if (strcmp(op, "pin") == 0) { /** **/
70 /* snac does not support pinning */
71 }
72 else
73- if (strcmp(op, "unpin") == 0) {
74+ if (strcmp(op, "unpin") == 0) { /** **/
75 /* snac does not support pinning */
76 }
77 else
78- if (strcmp(op, "mute") == 0) {
79+ if (strcmp(op, "mute") == 0) { /** **/
80 /* Mastodon's mute is snac's hide */
81 }
82 else
83- if (strcmp(op, "unmute") == 0) {
84+ if (strcmp(op, "unmute") == 0) { /** **/
85 /* Mastodon's unmute is snac's unhide */
86 }
87 }
88@@ -1895,7 +1895,7 @@ int mastoapi_post_handler(const xs_dict *req, const char *q_path,
89 /* ? */
90 }
91 else
92- if (strcmp(opt, "follow") == 0) {
93+ if (strcmp(opt, "follow") == 0) { /** **/
94 if (valid_status(object_get_by_md5(md5, &actor_o))) {
95 const char *actor = xs_dict_get(actor_o, "id");
96
97@@ -1914,7 +1914,7 @@ int mastoapi_post_handler(const xs_dict *req, const char *q_path,
98 }
99 }
100 else
101- if (strcmp(opt, "unfollow") == 0) {
102+ if (strcmp(opt, "unfollow") == 0) { /** **/
103 if (valid_status(object_get_by_md5(md5, &actor_o))) {
104 const char *actor = xs_dict_get(actor_o, "id");
105