diff options
author | default <nobody@localhost> | 2023-09-21 21:35:34 +0200 |
---|---|---|
committer | default <nobody@localhost> | 2023-09-21 21:35:34 +0200 |
commit | 5278e89142d4b65816f9b412faf2894923f29775 (patch) | |
tree | cf47bbc4e04f6059fecd62e31c6e8523a75d74e9 | |
parent | 749dbef349c53ff9bf13f705e674c72ac76e20ca (diff) |
Added more calls to xs_match().
-rw-r--r-- | html.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -1035,8 +1035,7 @@ xs_str *html_entry(snac *user, xs_str *os, const xs_dict *msg, int local, return xs_str_cat(os, s); } else - if (strcmp(type, "Note") != 0 && strcmp(type, "Question") != 0 && - strcmp(type, "Page") != 0 && strcmp(type, "Article") != 0) { + if (!xs_match(type, "Note|Question|Page|Article")) { /* skip oddities */ return os; } @@ -1390,9 +1389,7 @@ xs_str *html_entry(snac *user, xs_str *os, const xs_dict *msg, int local, if (xs_list_len(attach) < 2 && xs_match(t, "Link|Document")) { const char *mt = xs_mime_by_ext(url); - if (xs_startswith(mt, "image/") || - xs_startswith(mt, "audio/") || - xs_startswith(mt, "video/")) + if (xs_match(mt, "image/*|audio/*|video/*")) /* */ t = mt; } |