From d29c00bd8f35c41a8cd9826d3353e1768da4e670 Mon Sep 17 00:00:00 2001 From: default Date: Sun, 2 Oct 2022 17:42:36 +0200 Subject: [PATCH] An 'Update' message is set to everyone when data is changed. --- html.c | 5 +++++ snac.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/html.c b/html.c index 3233df8..2a0b2a8 100644 --- a/html.c +++ b/html.c @@ -990,6 +990,11 @@ int html_post_handler(d_char *req, char *q_path, d_char *payload, int p_size, history_del(&snac, "_timeline.html"); + xs *a_msg = msg_actor(&snac); + xs *u_msg = msg_update(&snac, a_msg); + + post(&snac, u_msg); + status = 303; } diff --git a/snac.h b/snac.h index dc49e8d..7d07da0 100644 --- a/snac.h +++ b/snac.h @@ -111,6 +111,8 @@ d_char *msg_follow(snac *snac, char *actor); d_char *msg_note(snac *snac, char *content, char *rcpts, char *in_reply_to); d_char *msg_undo(snac *snac, char *object); d_char *msg_delete(snac *snac, char *id); +d_char *msg_actor(snac *snac); +d_char *msg_update(snac *snac, char *object); int activitypub_request(snac *snac, char *url, d_char **data); int actor_request(snac *snac, char *actor, d_char **data);