diff --git a/lib/Lacuna/RPC/Inbox.pm b/lib/Lacuna/RPC/Inbox.pm index 084eaf01..16f79232 100644 --- a/lib/Lacuna/RPC/Inbox.pm +++ b/lib/Lacuna/RPC/Inbox.pm @@ -119,9 +119,9 @@ sub trash_messages_where { { ++$count; my %where; - $where{tag} = $spec->{tags} if $spec->{tags} && ref $spec->{tags} eq 'ARRAY'; - $where{tag} ||= $spec->{tag} if $spec->{tag}; - $where{from_name} = [ $spec->{from} ] if $spec->{from}; + $where{tag} = $spec->{tags} if $spec->{tags} && ref $spec->{tags} eq 'ARRAY'; + $where{tag} ||= $spec->{tag} if $spec->{tag} && !ref $spec->{tag}; + $where{from_name} = [ $spec->{from} ] if $spec->{from} && !ref $spec->{from}; if ($spec->{subject}) {