snac2

Fork of https://codeberg.org/grunfink/snac2
git clone https://git.inz.fi/snac2
Log | Files | Refs | README | LICENSE

commit 90ee416bf809b280cb2136e1c36b9424076fdacf
parent abb4f16c71bd4ecb3bc25815dbbc2d8c3ba3b4ca
Author: default <nobody@localhost>
Date:   Wed, 10 Apr 2024 17:21:58 +0200

Changed admiration message ids from dummy ones to having an md5 of the object.

Diffstat:
Mactivitypub.c | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/activitypub.c b/activitypub.c @@ -1149,8 +1149,10 @@ xs_dict *msg_admiration(snac *snac, char *object, char *type) if (valid_status(object_get(object, &a_msg))) { xs *rcpts = xs_list_new(); + xs *o_md5 = xs_md5_hex(object, strlen(object)); + xs *id = xs_fmt("%s/%s/%s", snac->actor, *type == 'L' ? "l" : "a", o_md5); - msg = msg_base(snac, type, "@dummy", snac->actor, "@now", object); + msg = msg_base(snac, type, id, snac->actor, "@now", object); if (is_msg_public(a_msg)) rcpts = xs_list_append(rcpts, public_address);