code: def delete_logs(room):
      
      from indico_chat.plugin import ChatPlugin
  
      base_url = ChatPlugin.settings.get('log_url')
      if not base_url or room.custom_server:
          return
  
      try:
          response = requests.get(posixpath.join(base_url, 'delete'), params={'cr': room.jid}).json()
      except (RequestException, ValueError):
          current_plugin.logger.exception('Could not delete logs for %s', room.jid)
          return
      if not response.get('success'):
          current_plugin.logger.warning('Could not delete logs for %s: %s', room.jid, response.get('error'))
docs: Deletes chat logs