add message visibility to messages and query model