summaryrefslogtreecommitdiff
path: root/activitypub.c
diff options
context:
space:
mode:
Diffstat (limited to 'activitypub.c')
-rw-r--r--activitypub.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/activitypub.c b/activitypub.c
index 57a5680..9928c76 100644
--- a/activitypub.c
+++ b/activitypub.c
@@ -1553,7 +1553,7 @@ int process_input_message(snac *snac, xs_dict *msg, xs_dict *req)
1553 type = "Note"; 1553 type = "Note";
1554 1554
1555 /* reject uninteresting messages right now */ 1555 /* reject uninteresting messages right now */
1556 if (strcmp(type, "Add") == 0) { 1556 if (xs_match(type, "Add|View")) {
1557 srv_debug(0, xs_fmt("Ignored message of type '%s'", type)); 1557 srv_debug(0, xs_fmt("Ignored message of type '%s'", type));
1558 return -1; 1558 return -1;
1559 } 1559 }
@@ -1822,17 +1822,17 @@ int process_input_message(snac *snac, xs_dict *msg, xs_dict *req)
1822 snac_log(snac, xs_fmt("updated actor %s", actor)); 1822 snac_log(snac, xs_fmt("updated actor %s", actor));
1823 } 1823 }
1824 else 1824 else
1825 if (xs_match(utype, "Note|Page|Article")) { /** **/ 1825 if (xs_match(utype, "Note|Page|Article|Video")) { /** **/
1826 const char *id = xs_dict_get(object, "id"); 1826 const char *id = xs_dict_get(object, "id");
1827 1827
1828 if (object_here(id)) { 1828 if (object_here(id)) {
1829 object_add_ow(id, object); 1829 object_add_ow(id, object);
1830 timeline_touch(snac); 1830 timeline_touch(snac);
1831 1831
1832 snac_log(snac, xs_fmt("updated post %s", id)); 1832 snac_log(snac, xs_fmt("updated '%s' %s", utype, id));
1833 } 1833 }
1834 else 1834 else
1835 snac_log(snac, xs_fmt("dropped update for unknown post %s", id)); 1835 snac_log(snac, xs_fmt("dropped update for unknown '%s' %s", utype, id));
1836 } 1836 }
1837 else 1837 else
1838 if (strcmp(utype, "Question") == 0) { /** **/ 1838 if (strcmp(utype, "Question") == 0) { /** **/
@@ -1847,8 +1847,11 @@ int process_input_message(snac *snac, xs_dict *msg, xs_dict *req)
1847 if (closed != NULL) 1847 if (closed != NULL)
1848 do_notify = 1; 1848 do_notify = 1;
1849 } 1849 }
1850 else 1850 else {
1851 srv_archive_error("unsupported_update", "unsupported_update", req, msg);
1852
1851 snac_log(snac, xs_fmt("ignored 'Update' for object type '%s'", utype)); 1853 snac_log(snac, xs_fmt("ignored 'Update' for object type '%s'", utype));
1854 }
1852 } 1855 }
1853 else 1856 else
1854 if (strcmp(type, "Delete") == 0) { /** **/ 1857 if (strcmp(type, "Delete") == 0) { /** **/
@@ -1874,8 +1877,11 @@ int process_input_message(snac *snac, xs_dict *msg, xs_dict *req)
1874 1877
1875 enqueue_output_by_actor(snac, rsp, actor, 0); 1878 enqueue_output_by_actor(snac, rsp, actor, 0);
1876 } 1879 }
1877 else 1880 else {
1881 srv_archive_error("unsupported_type", "unsupported_type", req, msg);
1882
1878 snac_debug(snac, 1, xs_fmt("process_input_message type '%s' ignored", type)); 1883 snac_debug(snac, 1, xs_fmt("process_input_message type '%s' ignored", type));
1884 }
1879 1885
1880 if (do_notify) { 1886 if (do_notify) {
1881 notify(snac, type, utype, actor, msg); 1887 notify(snac, type, utype, actor, msg);