commit f88a32d

default  ·  2025-01-12 10:30:16 +0000 UTC
parent 5d2a5f1
mastoapi: fixed Events not being shown.
2 files changed,  +18, -2
M main.c
M main.c
+16, -0
 1@@ -351,6 +351,22 @@ int main(int argc, char *argv[])
 2         return 0;
 3     }
 4 
 5+
 6+    if (strcmp(cmd, "assist") == 0) { /** **/
 7+        /* undocumented: experimental (do not use) */
 8+        xs *msg = msg_admiration(&snac, url, "Accept");
 9+
10+        if (msg != NULL) {
11+            enqueue_message(&snac, msg);
12+
13+            if (dbglevel) {
14+                xs_json_dump(msg, 4, stdout);
15+            }
16+        }
17+
18+        return 0;
19+    }
20+
21     if (strcmp(cmd, "unboost") == 0) { /** **/
22         xs *msg = msg_repulsion(&snac, url, "Announce");
23 
+2, -2
 1@@ -1428,9 +1428,9 @@ xs_list *mastoapi_timeline(snac *user, const xs_dict *args, const char *index_fn
 2                     continue;
 3             }
 4 
 5-            /* if it has a name and it's not a Page or a Video,
 6+            /* if it has a name and it's not an object that may have one,
 7                it's a poll vote, so discard it */
 8-            if (!xs_is_null(xs_dict_get(msg, "name")) && !xs_match(type, "Page|Video"))
 9+            if (!xs_is_null(xs_dict_get(msg, "name")) && !xs_match(type, "Page|Video|Audio|Event"))
10                 continue;
11 
12             /* convert the Note into a Mastodon status */