:py:mod:`matridge.command`
==========================

.. py:module:: matridge.command


Module Contents
---------------

Classes
~~~~~~~

.. autoapisummary::

   matridge.command.ListSpaces
   matridge.command.ManageTrust




.. py:class:: ListSpaces(xmpp)


   Bases: :py:obj:`slidge.command.Command`

   Abstract base class to implement gateway commands (chatbot and ad-hoc)

   .. py:attribute:: NAME
      :value: 'Matrix spaces'

      

   .. py:attribute:: HELP
      :value: "List the matrix spaces you're part of"

      

   .. py:attribute:: ACCESS

      

   .. py:method:: run(session, _ifrom, *args)
      :async:

      Entry point of the command

      :param session: If triggered by a registered user, its slidge Session
      :param ifrom: JID of the command-triggering entity
      :param args: When triggered via chatbot type message, additional words
          after the CHAT_COMMAND string was passed

      :return: Either a TableResult, a Form, a Confirmation, a text, or None


   .. py:method:: finish(form_values, session, _ifrom, rooms)
      :staticmethod:
      :async:



.. py:class:: ManageTrust(xmpp)


   Bases: :py:obj:`slidge.command.Command`

   Abstract base class to implement gateway commands (chatbot and ad-hoc)

   .. py:attribute:: NAME
      :value: 'Manage trust'

      

   .. py:attribute:: HELP
      :value: 'Manage which OLM keys you trust or not.'

      

   .. py:attribute:: ACCESS

      

   .. py:attribute:: HUMAN_STATES

      

   .. py:method:: __human_device(d, state=True)


   .. py:method:: run(session, _ifrom, *args)
      :async:

      Entry point of the command

      :param session: If triggered by a registered user, its slidge Session
      :param ifrom: JID of the command-triggering entity
      :param args: When triggered via chatbot type message, additional words
          after the CHAT_COMMAND string was passed

      :return: Either a TableResult, a Form, a Confirmation, a text, or None


   .. py:method:: step2(form_values, session, _ifrom, devices)
      :async:



