commit b5eaabe

default  ·  2023-05-17 08:49:46 +0000 UTC
parent 83aad1b
When updating the user info, also spam the following list.
1 files changed,  +11, -1
+11, -1
 1@@ -555,7 +555,7 @@ d_char *msg_accept(snac *snac, char *object, char *to)
 2 xs_dict *msg_update(snac *snac, xs_dict *object)
 3 /* creates an Update message */
 4 {
 5-    d_char *msg = msg_base(snac, "Update", "@object", snac->actor, "@now", object);
 6+    xs_dict *msg = msg_base(snac, "Update", "@object", snac->actor, "@now", object);
 7 
 8     char *type = xs_dict_get(object, "type");
 9 
10@@ -563,6 +563,16 @@ xs_dict *msg_update(snac *snac, xs_dict *object)
11         msg = xs_dict_append(msg, "to", xs_dict_get(object, "to"));
12         msg = xs_dict_append(msg, "cc", xs_dict_get(object, "cc"));
13     }
14+    else
15+    if (strcmp(type, "Person") == 0) {
16+        msg = xs_dict_append(msg, "to", public_address);
17+
18+        /* also spam the people being followed, so that
19+           they have the newest information about who we are */
20+        xs *cc = following_list(snac);
21+
22+        msg = xs_dict_append(msg, "cc", cc);
23+    }
24     else
25         msg = xs_dict_append(msg, "to", public_address);
26