Implement filters on list_messages.

Doesn't work with searches with spaces in it.