diff options
| author | 2024-05-11 18:46:15 +0200 | |
|---|---|---|
| committer | 2024-05-11 18:46:15 +0200 | |
| commit | e1ce85debd5b192b5dc56a4e9810839cc52b0f8b (patch) | |
| tree | 76b44e0d587b7476bd0dcf2f054e813583001a4b /html.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 'html.c')
| -rw-r--r-- | html.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -256,7 +256,7 @@ xs_html *html_msg_icon(snac *user, char *actor_id, const xs_dict *msg) | |||
| 256 | int priv = 0; | 256 | int priv = 0; |
| 257 | const char *type = xs_dict_get(msg, "type"); | 257 | const char *type = xs_dict_get(msg, "type"); |
| 258 | 258 | ||
| 259 | if (xs_match(type, "Note|Question|Page|Article|Video")) | 259 | if (xs_match(type, POSTLIKE_OBJECT_TYPE)) |
| 260 | url = xs_dict_get(msg, "id"); | 260 | url = xs_dict_get(msg, "id"); |
| 261 | 261 | ||
| 262 | priv = !is_msg_public(msg); | 262 | priv = !is_msg_public(msg); |
| @@ -1405,7 +1405,7 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only, | |||
| 1405 | html_msg_icon(read_only ? NULL : user, xs_dict_get(msg, "actor"), msg))); | 1405 | html_msg_icon(read_only ? NULL : user, xs_dict_get(msg, "actor"), msg))); |
| 1406 | } | 1406 | } |
| 1407 | else | 1407 | else |
| 1408 | if (!xs_match(type, "Note|Question|Page|Article|Video")) { | 1408 | if (!xs_match(type, POSTLIKE_OBJECT_TYPE)) { |
| 1409 | /* skip oddities */ | 1409 | /* skip oddities */ |
| 1410 | return NULL; | 1410 | return NULL; |
| 1411 | } | 1411 | } |