commit f88a32dbe0805fceb3fb75b01de61616d7953f5e
parent 5d2a5f160adc0992178812bcaa72df9cd5f072a7
Author: default <nobody@localhost>
Date: Sun, 12 Jan 2025 11:30:16 +0100
mastoapi: fixed Events not being shown.
Diffstat:
2 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/main.c b/main.c
@@ -351,6 +351,22 @@ int main(int argc, char *argv[])
return 0;
}
+
+ if (strcmp(cmd, "assist") == 0) { /** **/
+ /* undocumented: experimental (do not use) */
+ xs *msg = msg_admiration(&snac, url, "Accept");
+
+ if (msg != NULL) {
+ enqueue_message(&snac, msg);
+
+ if (dbglevel) {
+ xs_json_dump(msg, 4, stdout);
+ }
+ }
+
+ return 0;
+ }
+
if (strcmp(cmd, "unboost") == 0) { /** **/
xs *msg = msg_repulsion(&snac, url, "Announce");
diff --git a/mastoapi.c b/mastoapi.c
@@ -1428,9 +1428,9 @@ xs_list *mastoapi_timeline(snac *user, const xs_dict *args, const char *index_fn
continue;
}
- /* if it has a name and it's not a Page or a Video,
+ /* if it has a name and it's not an object that may have one,
it's a poll vote, so discard it */
- if (!xs_is_null(xs_dict_get(msg, "name")) && !xs_match(type, "Page|Video"))
+ if (!xs_is_null(xs_dict_get(msg, "name")) && !xs_match(type, "Page|Video|Audio|Event"))
continue;
/* convert the Note into a Mastodon status */