return luaL_error (L, "invalid arguments");
}
- if (!(part->flags & (RSPAMD_MIME_PART_IMAGE|RSPAMD_MIME_PART_TEXT))) {
+ if (!(part->flags & (RSPAMD_MIME_PART_IMAGE))) {
if (part->cd && part->cd->type == RSPAMD_CT_ATTACHMENT) {
lua_pushboolean (L, true);
}
local parts = task:get_parts()
local function filter_parts(p)
- return (not p:is_text()) and (not p:is_multipart())
+ return p:is_attachment() or (not p:is_text()) and (not p:is_multipart())
end
for p in fun.iter(fun.filter(filter_parts, parts)) do