summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordefault <nobody@localhost>2023-05-17 10:49:46 +0200
committerdefault <nobody@localhost>2023-05-17 10:49:46 +0200
commitb5eaabe77e9c048cf417598f36ea29e1fbc1bb58 (patch)
tree0ea78439acda48d40d3c2b0cd5ee51a243152886
parent83aad1b7a44a125efe369f39c55ee1c373327322 (diff)
When updating the user info, also spam the following list.
-rw-r--r--activitypub.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/activitypub.c b/activitypub.c
index 13e17b3..39d1605 100644
--- a/activitypub.c
+++ b/activitypub.c
@@ -555,7 +555,7 @@ d_char *msg_accept(snac *snac, char *object, char *to)
xs_dict *msg_update(snac *snac, xs_dict *object)
/* creates an Update message */
{
- d_char *msg = msg_base(snac, "Update", "@object", snac->actor, "@now", object);
+ xs_dict *msg = msg_base(snac, "Update", "@object", snac->actor, "@now", object);
char *type = xs_dict_get(object, "type");
@@ -564,6 +564,16 @@ xs_dict *msg_update(snac *snac, xs_dict *object)
msg = xs_dict_append(msg, "cc", xs_dict_get(object, "cc"));
}
else
+ if (strcmp(type, "Person") == 0) {
+ msg = xs_dict_append(msg, "to", public_address);
+
+ /* also spam the people being followed, so that
+ they have the newest information about who we are */
+ xs *cc = following_list(snac);
+
+ msg = xs_dict_append(msg, "cc", cc);
+ }
+ else
msg = xs_dict_append(msg, "to", public_address);
return msg;