mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-09 19:50:26 +03:00
Added more calls to xs_match().
This commit is contained in:
parent
749dbef349
commit
5278e89142
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 New Issue
Block a user