diff options
Diffstat (limited to 'mastoapi.c')
| -rw-r--r-- | mastoapi.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -1919,7 +1919,7 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path, | |||
| 1919 | /* add only posts by the author */ | 1919 | /* add only posts by the author */ |
| 1920 | if (!xs_is_null(msg_id) && | 1920 | if (!xs_is_null(msg_id) && |
| 1921 | strcmp(xs_dict_get(msg, "type"), "Note") == 0 && | 1921 | strcmp(xs_dict_get(msg, "type"), "Note") == 0 && |
| 1922 | xs_startswith(xs_dict_get(msg, "id"), snac2.actor) && is_msg_public(msg)) { | 1922 | is_msg_mine(&snac2, xs_dict_get(msg, "id")) && is_msg_public(msg)) { |
| 1923 | 1923 | ||
| 1924 | /* if max_id is set, skip entries until we find it */ | 1924 | /* if max_id is set, skip entries until we find it */ |
| 1925 | if (skip_until_max) { | 1925 | if (skip_until_max) { |
| @@ -3824,7 +3824,7 @@ int mastoapi_delete_handler(const xs_dict *req, const char *q_path, | |||
| 3824 | if (valid_status(object_get_by_md5(p, &obj))) { | 3824 | if (valid_status(object_get_by_md5(p, &obj))) { |
| 3825 | const char *id = xs_dict_get(obj, "id"); | 3825 | const char *id = xs_dict_get(obj, "id"); |
| 3826 | 3826 | ||
| 3827 | if (xs_is_string(id) && xs_startswith(id, snac.actor)) { | 3827 | if (xs_is_string(id) && is_msg_mine(&snac, id)) { |
| 3828 | xs *out = mastoapi_status(&snac, obj); | 3828 | xs *out = mastoapi_status(&snac, obj); |
| 3829 | 3829 | ||
| 3830 | xs *msg = msg_delete(&snac, id); | 3830 | xs *msg = msg_delete(&snac, id); |