aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordefault <nobody@localhost>2024-12-23 10:31:37 +0100
committerdefault <nobody@localhost>2024-12-23 10:31:37 +0100
commitea0c128cf0067946cab47bdce09df791be8038f5 (patch)
tree4c7ca437728192244d590db28c7e716912fe6421
parent89a8c2e0cc4fcd1f9450dfeb13bf5d83730c52ae (diff)
Accept 'Audio' as a valid entry type.
Also, done a tweak to read attributedTo fields that are a JSON object, with the id in the "id" field (returned by bandwagon.fm).
-rw-r--r--activitypub.c5
-rw-r--r--snac.h2
2 files changed, 6 insertions, 1 deletions
diff --git a/activitypub.c b/activitypub.c
index 34cc32f..88d8fd8 100644
--- a/activitypub.c
+++ b/activitypub.c
@@ -178,6 +178,11 @@ const char *get_atto(const xs_dict *msg)
}
}
}
+ else
+ if (xs_type(actor) == XSTYPE_DICT) {
+ /* bandwagon.fm returns this */
+ actor = xs_dict_get(actor, "id");
+ }
return actor;
}
diff --git a/snac.h b/snac.h
index af6e597..b56761e 100644
--- a/snac.h
+++ b/snac.h
@@ -32,7 +32,7 @@ extern int dbglevel;
#define L(s) (s)
-#define POSTLIKE_OBJECT_TYPE "Note|Question|Page|Article|Video|Event"
+#define POSTLIKE_OBJECT_TYPE "Note|Question|Page|Article|Video|Audio|Event"
int mkdirx(const char *pathname);