diff options
| author | 2023-05-01 17:20:49 +0200 | |
|---|---|---|
| committer | 2023-05-01 17:20:49 +0200 | |
| commit | 4595a3685992a8f31b86cca0ecf10e286dec52eb (patch) | |
| tree | 6be6e834c212a9e4676182c26baf4a937d34b6da /mastoapi.c | |
| parent | New functions index_del_md5(), index_del() and object_unadmire(). (diff) | |
| download | snac2-4595a3685992a8f31b86cca0ecf10e286dec52eb.tar.gz snac2-4595a3685992a8f31b86cca0ecf10e286dec52eb.tar.xz snac2-4595a3685992a8f31b86cca0ecf10e286dec52eb.zip | |
Partial support for mastoapi unfavourite / unreblog.
Diffstat (limited to 'mastoapi.c')
| -rw-r--r-- | mastoapi.c | 9 |
1 files changed, 7 insertions, 2 deletions
| @@ -1670,7 +1670,11 @@ int mastoapi_post_handler(const xs_dict *req, const char *q_path, | |||
| 1670 | } | 1670 | } |
| 1671 | else | 1671 | else |
| 1672 | if (strcmp(op, "unfavourite") == 0) { | 1672 | if (strcmp(op, "unfavourite") == 0) { |
| 1673 | /* snac does not support Undo+Like */ | 1673 | /* partial support: as the original Like message |
| 1674 | is not stored anywhere here, it's not possible | ||
| 1675 | to send an Undo + Like; the only thing done here | ||
| 1676 | is to delete the actor from the list of likes */ | ||
| 1677 | object_unadmire(id, snac.actor, 1); | ||
| 1674 | } | 1678 | } |
| 1675 | else | 1679 | else |
| 1676 | if (strcmp(op, "reblog") == 0) { | 1680 | if (strcmp(op, "reblog") == 0) { |
| @@ -1685,7 +1689,8 @@ int mastoapi_post_handler(const xs_dict *req, const char *q_path, | |||
| 1685 | } | 1689 | } |
| 1686 | else | 1690 | else |
| 1687 | if (strcmp(op, "unreblog") == 0) { | 1691 | if (strcmp(op, "unreblog") == 0) { |
| 1688 | /* snac does not support Undo+Announce */ | 1692 | /* partial support: see comment in 'unfavourite' */ |
| 1693 | object_unadmire(id, snac.actor, 0); | ||
| 1689 | } | 1694 | } |
| 1690 | else | 1695 | else |
| 1691 | if (strcmp(op, "bookmark") == 0) { | 1696 | if (strcmp(op, "bookmark") == 0) { |