diff options
| author | 2022-10-01 09:12:33 +0200 | |
|---|---|---|
| committer | 2022-10-01 09:12:33 +0200 | |
| commit | 2c00c7b0b585867495a505a9daf3ab48aa1dfa0b (patch) | |
| tree | ba3d8f3619f80ab269a24da861ebb38c7056581d /activitypub.c | |
| parent | New web action 'Follow'. (diff) | |
| download | snac2-2c00c7b0b585867495a505a9daf3ab48aa1dfa0b.tar.gz snac2-2c00c7b0b585867495a505a9daf3ab48aa1dfa0b.tar.xz snac2-2c00c7b0b585867495a505a9daf3ab48aa1dfa0b.zip | |
New web action 'Unfollow'.
Diffstat (limited to 'activitypub.c')
| -rw-r--r-- | activitypub.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/activitypub.c b/activitypub.c index 5e26fb6..29ce676 100644 --- a/activitypub.c +++ b/activitypub.c | |||
| @@ -437,6 +437,17 @@ d_char *msg_create(snac *snac, char *object) | |||
| 437 | } | 437 | } |
| 438 | 438 | ||
| 439 | 439 | ||
| 440 | d_char *msg_undo(snac *snac, char *object) | ||
| 441 | /* creates an 'Undo' message */ | ||
| 442 | { | ||
| 443 | d_char *msg = msg_base(snac, "Undo", "@object", snac->actor, "@now", object); | ||
| 444 | |||
| 445 | msg = xs_dict_append(msg, "to", xs_dict_get(object, "object")); | ||
| 446 | |||
| 447 | return msg; | ||
| 448 | } | ||
| 449 | |||
| 450 | |||
| 440 | d_char *msg_follow(snac *snac, char *actor) | 451 | d_char *msg_follow(snac *snac, char *actor) |
| 441 | /* creates a 'Follow' message */ | 452 | /* creates a 'Follow' message */ |
| 442 | { | 453 | { |