summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/source/commands.rst10
-rw-r--r--doc/source/dev/e2ee.rst52
-rw-r--r--doc/source/dev/index.rst1
-rw-r--r--doc/source/dev/slix.rst4
-rw-r--r--doc/source/keys.rst4
5 files changed, 65 insertions, 6 deletions
diff --git a/doc/source/commands.rst b/doc/source/commands.rst
index 3f3bb475..bea44fe0 100644
--- a/doc/source/commands.rst
+++ b/doc/source/commands.rst
@@ -218,12 +218,12 @@ These commands work in *any* tab.
/invitations
Show the pending invitations.
- /impromptu
+ /impromptu
**Usage:** ``/impromptu <jid> [jid ..]``
Invite specified JIDs into a newly created room.
- .. versionadded:: 0.13
+ .. versionadded:: 0.13
/activity
**Usage:** ``/activity [<general> [specific] [comment]]``
@@ -316,6 +316,12 @@ These commands will work in any conversation tab (MultiUserChat, Private, or
/clear
Clear the current buffer.
+ /scrollback
+ /sb
+ **Usage:** ``/scrollback end home clear status goto <+|-linecount>|<linenum>|<timestamp>``
+
+ Allows to go to the given line or message in the window.
+
.. _muctab-commands:
MultiUserChat tab commands
diff --git a/doc/source/dev/e2ee.rst b/doc/source/dev/e2ee.rst
new file mode 100644
index 00000000..23304512
--- /dev/null
+++ b/doc/source/dev/e2ee.rst
@@ -0,0 +1,52 @@
+End-to-end Encryption API documentation
+=======================================
+
+E2EEPlugin
+----------
+
+.. module:: poezio.plugin_e2ee
+
+
+.. autoclass:: E2EEPlugin
+ :members: decrypt, encrypt, encryption_name, encryption_short_name, eme_ns, replace_body_with_eme, stanza_encryption, tag_whitelist
+
+
+Please refer to :py:class:`~BasePlugin` for more information on how to
+write plugins.
+
+Example plugins
+---------------
+
+**Example 1:** Base64 plugin
+
+.. code-block:: python
+
+ from base64 import b64decode, b64encode
+ from poezio.plugin_e2ee import E2EEPlugin
+ from slixmpp import Message
+
+
+ class Plugin(E2EEPlugin):
+ """Base64 Plugin"""
+
+ encryption_name = 'base64'
+ encryption_short_name = 'b64'
+ eme_ns = 'urn:xmpps:base64:0'
+
+ # This encryption mechanism is using <body/> as a container
+ replace_body_with_eme = False
+
+ def decrypt(self, message: Message, _tab) -> None:
+ """
+ Decrypt base64
+ """
+ body = message['body']
+ message['body'] = b64decode(body.encode()).decode()
+
+ def encrypt(self, message: Message, _tab) -> None:
+ """
+ Encrypt to base64
+ """
+ # TODO: Stop using <body/> for this. Put the encoded payload in another element.
+ body = message['body']
+ message['body'] = b64encode(body.encode()).decode()
diff --git a/doc/source/dev/index.rst b/doc/source/dev/index.rst
index 21ea6253..630abfad 100644
--- a/doc/source/dev/index.rst
+++ b/doc/source/dev/index.rst
@@ -14,6 +14,7 @@ About plugins
:maxdepth: 2
plugin
+ e2ee
events
slix
xep
diff --git a/doc/source/dev/slix.rst b/doc/source/dev/slix.rst
index 3c06e349..50f9dd07 100644
--- a/doc/source/dev/slix.rst
+++ b/doc/source/dev/slix.rst
@@ -1,5 +1,5 @@
-SleekXMPP classes
-=================
+Slixmpp classes
+===============
.. module:: slixmpp
diff --git a/doc/source/keys.rst b/doc/source/keys.rst
index ae641c26..dc5fa35b 100644
--- a/doc/source/keys.rst
+++ b/doc/source/keys.rst
@@ -1,7 +1,7 @@
.. _keys-page:
-Keys
-====
+Keyboard Shortcuts
+==================
This file describes the default keys of poezio and explains how to
configure them.