def add(self, data):
        try:
            json_obj = json.loads(data)
            token = Token()
            self._compat_transform(json_obj)
            if token.get_data(json_obj['token'], json_obj['data']['room']):
                #uid = self._generate_id(json_obj)
                host = self.get_host()
                room = json_obj['data']['room']
                uid = self.conn.id
                self.conn.sockjs_server.add_subscriber_room(
                    room, self.conn
                )
                self.logger.debug(
                    'django-sockjs-server (Subscribe): Subscribe to channel %s' % room
                )
                self.redis.lpush(
                    room,
                    json.dumps({'host': host, 'id': uid})
                )
        except (KeyError, TypeError):
            pass
dataset/ETHPy150Open alfss/django-sockjs-server/django_sockjs_server/lib/subscribe.py/Subscribe.add/original