Explorar o código

Added a 'webfinger' field to 'Person' objects.

grunfink hai 5 meses
pai
achega
1543bb74f8
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      activitypub.c

+ 3 - 0
activitypub.c

@@ -1921,6 +1921,9 @@ xs_dict *msg_actor(snac *snac)
     if (xs_type(location) == XSTYPE_DICT)
     if (xs_type(location) == XSTYPE_DICT)
         msg = xs_dict_set(msg, "location", location);
         msg = xs_dict_set(msg, "location", location);
 
 
+    xs *webfinger = xs_fmt("%s@%s", snac->uid, xs_dict_get(srv_config, "host"));
+    msg = xs_dict_set(msg, "webfinger", webfinger);
+
     /* cache it */
     /* cache it */
     snac_debug(snac, 1, xs_fmt("Caching actor %s", snac->actor));
     snac_debug(snac, 1, xs_fmt("Caching actor %s", snac->actor));
     object_add_ow(snac->actor, msg);
     object_add_ow(snac->actor, msg);