from afew.filters.BaseFilter  import Filter
from afew.FilterRegistry import register_filter

@register_filter
class ArchiveSentTrashFilter(Filter):
    message = 'Remove any message tagged with archive or trash from inbox'
    query = 'tag:archive or tag:trash or tag:sent'

    def handle_message(self, message):
        self.remove_tags(message, 'new', 'inbox')
