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

@register_filter
class ArchiveFilter(Filter):
    message = 'Remove any message tagged with archive from inbox'
    query = 'tag:archive'

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