changeset 4316:4bba01ce2f98

mod_pastebin: Document tresholds inclusion in disco#info
author Kim Alvefur <zash@zash.se>
date Sat, 02 Jan 2021 15:38:15 +0100
parents 87e250409998
children 456b9f608fcf
files mod_pastebin/README.markdown
diffstat 1 files changed, 30 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mod_pastebin/README.markdown	Sat Jan 02 15:28:45 2021 +0100
+++ b/mod_pastebin/README.markdown	Sat Jan 02 15:38:15 2021 +0100
@@ -44,6 +44,36 @@
 or you can forward another external URL from your web server to Prosody,
 use `pastebin_url` to set that URL.
 
+# Discovery
+
+The line and character tresholds are advertised in
+[service discovery][xep-0030] like this:
+
+``` {.xml}
+<iq id="791d37e8-86d8-45df-adc2-9bcb17c45cb7" type="result" xml:lang="en" from="prosody@conference.prosody.im">
+  <query xmlns="http://jabber.org/protocol/disco#info">
+    <identity type="text" name="Prosŏdy IM Chatroom" category="conference"/>
+    <feature var="http://jabber.org/protocol/muc"/>
+    <feature var="https://modules.prosody.im/mod_pastebin"/>
+    <x xmlns="jabber:x:data" type="result">
+      <field type="hidden" var="FORM_TYPE">
+        <value>http://jabber.org/protocol/muc#roominfo</value>
+      </field>
+      <field label="Title" type="text-single" var="muc#roomconfig_roomname">
+        <value>Prosŏdy IM Chatroom</value>
+      </field>
+      <!-- etc... -->
+      <field type="text-single" var="{https://modules.prosody.im/mod_pastebin}max_lines">
+        <value>12</value>
+      </field>
+      <field type="text-single" var="{https://modules.prosody.im/mod_pastebin}max_characters">
+        <value>1584</value>
+      </field>
+    </x>
+  </query>
+</iq>
+```
+
 # Configuration
 
   Option                    Description