Comparison

mod_ogp/README.markdown @ 4597:c858c76d0845

mod_tweet_data: New module that fetches and sends tweet data based on tweet URLs in MUC messages.
author JC Brand <jc@opkode.com>
date Tue, 22 Jun 2021 11:41:16 +0200
parent 4485:2c4b65bfac62
child 4598:09f0911c735d
comparison
equal deleted inserted replaced
4596:c406e4bf7ee5 4597:c858c76d0845
4 4
5 With mod_ogp enabled, when a user sends a URL in a MUC (where the message has its `id` equal to its `origin-id`), the module calls the URL and parses the result for `<meta>` html tags that have any `og:...` properties. 5 With mod_ogp enabled, when a user sends a URL in a MUC (where the message has its `id` equal to its `origin-id`), the module calls the URL and parses the result for `<meta>` html tags that have any `og:...` properties.
6 If it finds any, it sends a [XEP-0422 fastening](https://xmpp.org/extensions/xep-0422.html) applied to the original message that looks like: 6 If it finds any, it sends a [XEP-0422 fastening](https://xmpp.org/extensions/xep-0422.html) applied to the original message that looks like:
7 7
8 ```xml 8 ```xml
9 <message id="example" from="chatroom@muc.example.org" to="chatroom@muc.example.org"> 9 <message id="example" from="chatroom@muc.example.org" to="user@chat.example.org/resource">
10 <apply-to xmlns="urn:xmpp:fasten:0" id="origin-id-X"> 10 <apply-to xmlns="urn:xmpp:fasten:0" id="origin-id-X">
11 <meta xmlns="http://www.w3.org/1999/xhtml" property="og:title" content="The Rock"/> 11 <meta xmlns="http://www.w3.org/1999/xhtml" property="og:title" content="The Rock"/>
12 <meta xmlns="http://www.w3.org/1999/xhtml" property="og:url" content="https://www.imdb.com/title/tt0117500/"/> 12 <meta xmlns="http://www.w3.org/1999/xhtml" property="og:url" content="https://www.imdb.com/title/tt0117500/"/>
13 <meta xmlns="http://www.w3.org/1999/xhtml" property="og:image" content="https://ia.media-imdb.com/images/rock.jpg"/> 13 <meta xmlns="http://www.w3.org/1999/xhtml" property="og:image" content="https://ia.media-imdb.com/images/rock.jpg"/>
14 </apply-to> 14 </apply-to>