def is_member(self, m):
        if not m:
            return False
        elif isinstance(m, basestring):
            jid = m
        else:
            jid = m['JID']

        is_member = len(filter(lambda m: m['JID'] == jid and m.get('STATUS') in ('ACTIVE', 'INVITED'), self.params['MEMBERS'])) > 0

        return is_member
Check if a user is a member of the chatroom
dataset/ETHPy150Open mattlong/hermes/hermes/chatroom.py/Chatroom.is_member