def _ParseChatData(self, data):
    """Parses chat comment data.

    Args:
      data (dict[str, object]): chat comment data as returned by SQLite.

    Returns:
      dict[str, object]: parsed chat comment data.
    """
    data_store = {}

    if 'body' in data:
      body = data.get('body', '').replace('\n', ' ')
      if body.startswith('//') and '{' in body:
        body_dict = self._ExtractJQuery(body)
        title, _, _ = body.partition('{')
        body = '{0:s} <{1!s}>'.format(
            title[2:], self._DictToListOfStrings(body_dict))
    else:
      body = 'No text.'

    data_store['text'] = body

    room = data.get('rooms', None)
    if not room:
      room = data.get('room', None)
    if room:
      data_store['room'] = room

    data_store['id'] = data.get('id', None)
    user = data.get('user', None)
    if user:
      try:
        user_sid = int(user)
        data_store['sid'] = user_sid
      except (ValueError, TypeError):
        data_store['user'] = user

    return data_store
Parses chat comment data.

    Args:
      data (dict[str, object]): chat comment data as returned by SQLite.

    Returns:
      dict[str, object]: parsed chat comment data.