diff options
| author | 2024-05-11 18:46:15 +0200 | |
|---|---|---|
| committer | 2024-05-11 18:46:15 +0200 | |
| commit | e1ce85debd5b192b5dc56a4e9810839cc52b0f8b (patch) | |
| tree | 76b44e0d587b7476bd0dcf2f054e813583001a4b /mastoapi.c | |
| parent | Updated TODO. (diff) | |
| download | snac2-e1ce85debd5b192b5dc56a4e9810839cc52b0f8b.tar.gz snac2-e1ce85debd5b192b5dc56a4e9810839cc52b0f8b.tar.xz snac2-e1ce85debd5b192b5dc56a4e9810839cc52b0f8b.zip | |
Unified post-like object type match.
Diffstat (limited to 'mastoapi.c')
| -rw-r--r-- | mastoapi.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -1504,7 +1504,7 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path, | |||
| 1504 | /* discard non-Notes */ | 1504 | /* discard non-Notes */ |
| 1505 | const char *id = xs_dict_get(msg, "id"); | 1505 | const char *id = xs_dict_get(msg, "id"); |
| 1506 | const char *type = xs_dict_get(msg, "type"); | 1506 | const char *type = xs_dict_get(msg, "type"); |
| 1507 | if (!xs_match(type, "Note|Question|Page|Article|Video")) | 1507 | if (!xs_match(type, POSTLIKE_OBJECT_TYPE)) |
| 1508 | continue; | 1508 | continue; |
| 1509 | 1509 | ||
| 1510 | const char *from = NULL; | 1510 | const char *from = NULL; |
| @@ -1681,7 +1681,7 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path, | |||
| 1681 | /* discard non-Notes */ | 1681 | /* discard non-Notes */ |
| 1682 | const char *id = xs_dict_get(msg, "id"); | 1682 | const char *id = xs_dict_get(msg, "id"); |
| 1683 | const char *type = xs_dict_get(msg, "type"); | 1683 | const char *type = xs_dict_get(msg, "type"); |
| 1684 | if (!xs_match(type, "Note|Question|Page|Article|Video")) | 1684 | if (!xs_match(type, POSTLIKE_OBJECT_TYPE)) |
| 1685 | continue; | 1685 | continue; |
| 1686 | 1686 | ||
| 1687 | const char *from = NULL; | 1687 | const char *from = NULL; |