annotate mod_muc_media_metadata/README.markdown @ 3902:341850e8866f

mod_muc_moderation: Broadcast retraction via method that saves it Otherwise the retraction is not saved to history, so that those who join after it was sent are unaware of the retraction
author Kim Alvefur <zash@zash.se>
date Sat, 22 Feb 2020 21:41:31 +0100
parents c40422cca3b7
children 20d436a1028d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3682
47e1c94fb6fb mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
1 # Introduction
47e1c94fb6fb mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
2
47e1c94fb6fb mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
3 This module adds additional metadata to media shared in a MUC. This can help clients
47e1c94fb6fb mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
4 make decisions and provide better UI and enhanced privacy, by knowing things like file
47e1c94fb6fb mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
5 size without needing to make external network requests.
47e1c94fb6fb mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
6
47e1c94fb6fb mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
7 # Configuring
47e1c94fb6fb mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
8
47e1c94fb6fb mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
9 ## Enabling
47e1c94fb6fb mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
10
47e1c94fb6fb mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
11 ``` {.lua}
47e1c94fb6fb mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
12 Component "rooms.example.net" "muc"
47e1c94fb6fb mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
13 modules_enabled = {
3684
0f3cb1247682 mod_muc_media_metadata: Fix example config
Matthew Wild <mwild1@gmail.com>
parents: 3683
diff changeset
14 "muc_media_metadata";
3682
47e1c94fb6fb mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
15 }
47e1c94fb6fb mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
16 ```
47e1c94fb6fb mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
17
47e1c94fb6fb mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
18 ## Settings
47e1c94fb6fb mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
19
47e1c94fb6fb mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
20 There are no configuration options for this module.
47e1c94fb6fb mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
21
47e1c94fb6fb mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
22 # Developers
47e1c94fb6fb mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
23
3687
c40422cca3b7 mod_muc_media_metadata: Include original message stanza example
Matthew Wild <mwild1@gmail.com>
parents: 3686
diff changeset
24 ## Example stanzas
c40422cca3b7 mod_muc_media_metadata: Include original message stanza example
Matthew Wild <mwild1@gmail.com>
parents: 3686
diff changeset
25
c40422cca3b7 mod_muc_media_metadata: Include original message stanza example
Matthew Wild <mwild1@gmail.com>
parents: 3686
diff changeset
26 A normal message in a chatroom containing an image:
c40422cca3b7 mod_muc_media_metadata: Include original message stanza example
Matthew Wild <mwild1@gmail.com>
parents: 3686
diff changeset
27
c40422cca3b7 mod_muc_media_metadata: Include original message stanza example
Matthew Wild <mwild1@gmail.com>
parents: 3686
diff changeset
28 ```
c40422cca3b7 mod_muc_media_metadata: Include original message stanza example
Matthew Wild <mwild1@gmail.com>
parents: 3686
diff changeset
29 <message from="test@rooms.example.com/matthew" id="9f45a784-5e5b-4db5-a9b3-8ea1d7c1162d" type="groupchat">
c40422cca3b7 mod_muc_media_metadata: Include original message stanza example
Matthew Wild <mwild1@gmail.com>
parents: 3686
diff changeset
30 <body>https://matthewwild.co.uk/share.php/70334772-ff74-439b-8173-a71e40ca28db/mam-flow.png</body>
c40422cca3b7 mod_muc_media_metadata: Include original message stanza example
Matthew Wild <mwild1@gmail.com>
parents: 3686
diff changeset
31 <x xmlns="jabber:x:oob">
c40422cca3b7 mod_muc_media_metadata: Include original message stanza example
Matthew Wild <mwild1@gmail.com>
parents: 3686
diff changeset
32 <url>https://matthewwild.co.uk/share.php/70334772-ff74-439b-8173-a71e40ca28db/mam-flow.png</url>
c40422cca3b7 mod_muc_media_metadata: Include original message stanza example
Matthew Wild <mwild1@gmail.com>
parents: 3686
diff changeset
33 </x>
c40422cca3b7 mod_muc_media_metadata: Include original message stanza example
Matthew Wild <mwild1@gmail.com>
parents: 3686
diff changeset
34 </message>
c40422cca3b7 mod_muc_media_metadata: Include original message stanza example
Matthew Wild <mwild1@gmail.com>
parents: 3686
diff changeset
35 ```
c40422cca3b7 mod_muc_media_metadata: Include original message stanza example
Matthew Wild <mwild1@gmail.com>
parents: 3686
diff changeset
36
c40422cca3b7 mod_muc_media_metadata: Include original message stanza example
Matthew Wild <mwild1@gmail.com>
parents: 3686
diff changeset
37 The same stanza with this module loaded now contains additional metadata added by the server:
3682
47e1c94fb6fb mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
38
47e1c94fb6fb mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
39 ```
47e1c94fb6fb mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
40 <message from="test@rooms.example.com/matthew" id="9f45a784-5e5b-4db5-a9b3-8ea1d7c1162d" type="groupchat">
47e1c94fb6fb mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
41 <body>https://matthewwild.co.uk/share.php/70334772-ff74-439b-8173-a71e40ca28db/mam-flow.png</body>
47e1c94fb6fb mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
42 <x xmlns="jabber:x:oob">
47e1c94fb6fb mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
43 <url>https://matthewwild.co.uk/share.php/70334772-ff74-439b-8173-a71e40ca28db/mam-flow.png</url>
3686
2573d143621f mod_muc_media_metadata: Update namespace
Matthew Wild <mwild1@gmail.com>
parents: 3684
diff changeset
44 <metadata xmlns="xmpp:prosody.im/protocol/media-metadata#0">
3682
47e1c94fb6fb mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
45 <bytes>15690</bytes>
47e1c94fb6fb mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
46 <type>image/png</type>
47e1c94fb6fb mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
47 <blurhash>LEHV6nWB2yk8pyo0adR*.7kCMdnj</blurhash>
47e1c94fb6fb mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
48 </metadata>
47e1c94fb6fb mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
49 </x>
47e1c94fb6fb mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
50 </message>
47e1c94fb6fb mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
51 ```