Diff

mod_muc_media_metadata/README.md @ 3682:47e1c94fb6fb

mod_muc_media_metadata: Module to automatically fetch metadata for posted media
author Matthew Wild <mwild1@gmail.com>
date Sun, 29 Sep 2019 16:47:57 +0100
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mod_muc_media_metadata/README.md	Sun Sep 29 16:47:57 2019 +0100
@@ -0,0 +1,38 @@
+# Introduction
+
+This module adds additional metadata to media shared in a MUC. This can help clients
+make decisions and provide better UI and enhanced privacy, by knowing things like file
+size without needing to make external network requests.
+
+# Configuring
+
+## Enabling
+
+``` {.lua}
+Component "rooms.example.net" "muc"
+modules_enabled = {
+    "muc_hide_media";
+}
+```
+
+## Settings
+
+There are no configuration options for this module.
+
+# Developers
+
+Example stanza:
+
+```
+<message from="test@rooms.example.com/matthew" id="9f45a784-5e5b-4db5-a9b3-8ea1d7c1162d" type="groupchat">
+  <body>https://matthewwild.co.uk/share.php/70334772-ff74-439b-8173-a71e40ca28db/mam-flow.png</body>
+  <x xmlns="jabber:x:oob">
+    <url>https://matthewwild.co.uk/share.php/70334772-ff74-439b-8173-a71e40ca28db/mam-flow.png</url>
+    <metadata xmlns="https://prosody.im/protocol/media-metadata#0">
+      <bytes>15690</bytes>
+      <type>image/png</type>
+      <blurhash>LEHV6nWB2yk8pyo0adR*.7kCMdnj</blurhash>
+    </metadata>
+  </x>
+</message>
+```