matridge.util
=============

.. py:module:: matridge.util


Attributes
----------

.. autoapisummary::

   matridge.util.log


Classes
-------

.. autoapisummary::

   matridge.util.MatrixMixin
   matridge.util.Credentials


Functions
---------

.. autoapisummary::

   matridge.util.strip_reply_fallback
   matridge.util.get_reply_to
   matridge.util.get_replace
   matridge.util.get_rel
   matridge.util.get_new_content
   matridge.util.get_new_message
   matridge.util.get_body
   matridge.util.server_timestamp_to_datetime
   matridge.util.get_content


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

.. py:class:: MatrixMixin

   Bases: :py:obj:`slidge.core.mixins.MessageMixin`


   .. py:attribute:: session
      :type:  matridge.session.Session


   .. py:attribute:: muc
      :type:  matridge.group.MUC


   .. py:attribute:: log
      :type:  logging.Logger


   .. py:method:: __get_reply_to(msg)
      :async:



   .. py:method:: __add_reply_to(msg, replace, kwargs)
      :async:



   .. py:method:: __get_attachments(msg, **kwargs)
      :async:



   .. py:method:: __get_encrytped_attachments(msg)
      :async:



   .. py:method:: send_matrix_message(msg, replace=None, replacement_event_id=None, archive_only=False)
      :async:



.. py:function:: strip_reply_fallback(formatted_body)

.. py:function:: get_reply_to(source)

.. py:function:: get_replace(source)

.. py:function:: get_rel(source, rel_type)

.. py:function:: get_new_content(source)

.. py:function:: get_new_message(msg)

.. py:function:: get_body(msg)

.. py:function:: server_timestamp_to_datetime(event)

.. py:function:: get_content(text, mentions = None)

.. py:data:: log

.. py:class:: Credentials

   Bases: :py:obj:`TypedDict`


   dict() -> new empty dictionary
   dict(mapping) -> new dictionary initialized from a mapping object's
       (key, value) pairs
   dict(iterable) -> new dictionary initialized as if via:
       d = {}
       for k, v in iterable:
           d[k] = v
   dict(**kwargs) -> new dictionary initialized with the name=value pairs
       in the keyword argument list.  For example:  dict(one=1, two=2)

   Initialize self.  See help(type(self)) for accurate signature.


   .. py:attribute:: homeserver
      :type:  str


   .. py:attribute:: user_id
      :type:  str


   .. py:attribute:: device_id
      :type:  str


   .. py:attribute:: access_token
      :type:  str


