mirror of
https://codeberg.org/grunfink/snac2.git
synced 2025-03-13 12:15:05 +00:00
Added more calls to xs_match().
This commit is contained in:
parent
749dbef349
commit
5278e89142
1 changed files with 2 additions and 5 deletions
7
html.c
7
html.c
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue