'This gets the rules for all users in the room at the time of the event,
as well as the push rules for the invitee if the event is an invite.
Returns:
dict of user_id -> push_rules'

@defer.inlineCallbacks
def _get_rules_for_event(self, event, context):

    room_id = event.room_id
    rules_for_room = self._get_rules_for_room(room_id)
    rules_by_user = (yield rules_for_room.get_rules(event, context))
    if ((event.type == 'm.room.member') and (event.content['membership'] == 'invite')):
        invited = event.state_key
        if (invited and self.hs.is_mine_id(invited)):
            has_pusher = (yield self.store.user_has_pusher(invited))
            if has_pusher:
                rules_by_user = dict(rules_by_user)
                rules_by_user[invited] = (yield self.store.get_push_rules_for_user(invited))
    defer.returnValue(rules_by_user)
