From d0b9ccef4d3ded2d64b81f5f1c5670ec41d23d9e Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Fri, 4 Feb 2022 10:09:27 +0100 Subject: [PATCH] Add Talk OCP docs to dev manual Signed-off-by: Christoph Wurst --- developer_manual/digging_deeper/index.rst | 1 + developer_manual/digging_deeper/talk.rst | 63 +++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 developer_manual/digging_deeper/talk.rst diff --git a/developer_manual/digging_deeper/index.rst b/developer_manual/digging_deeper/index.rst index 3d31c96b3..6c5f1389a 100644 --- a/developer_manual/digging_deeper/index.rst +++ b/developer_manual/digging_deeper/index.rst @@ -21,6 +21,7 @@ Digging deeper rest_apis search settings + talk two-factor-provider users dashboard diff --git a/developer_manual/digging_deeper/talk.rst b/developer_manual/digging_deeper/talk.rst new file mode 100644 index 000000000..60c85c77e --- /dev/null +++ b/developer_manual/digging_deeper/talk.rst @@ -0,0 +1,63 @@ +================ +Talk Integration +================ + +`Nextcloud Talk `_ is the chat, video and audio conferencing solution in Nextcloud. Apps can access Talk capabilities through a public API. + + +All communication from an app to the Talk backend is handled through a *broker* ``\OCP\Talk\IBroker``. :ref:`Inject ` the Talk broker into your class to make use of it. + + +Check for Talk existence +------------------------ + +Talk is an optional app. It has to be installed and enable to be used. + +.. code-block:: php + + hasBackend()) { + // Do something with it + } else { + // Hide Talk integration from a user or use other communication channels, if applicable + } + + +Create a conversation +--------------------- + +A new conversation needs a name and at least one moderator. By default this conversation will be private. + +.. code-block:: php + + createConversation( + 'Weekly 1:1', + [$alice, $bob] + ); + + +Customize the conversation +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +It's possible to adjust the defaults. + +.. code-block:: php + + newConversationOptions(); + $conversation = $broker->createConversation( + 'Weekly 1:1', + [$alice, $bob], + $broker->newConversationOptions()->setPublic() + );