author | Matthew Wild <mwild1@gmail.com> |
Thu, 08 Jun 2023 11:30:39 +0100 | |
changeset 5536 | d84757f9adcb |
parent 4602 | 09f0911c735d |
permissions | -rw-r--r-- |
4464 | 1 |
# mod_ogp |
2 |
||
3 |
This module adds [Open Graph Protocol](https://ogp.me) metadata to URLs sent inside a MUC. |
|
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. |
|
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 |
||
4488
6813a00878ea
mod_ogp/README: Annotate example as XML to enable syntax highlighting
Kim Alvefur <zash@zash.se>
parents:
4487
diff
changeset
|
8 |
```xml |
4601
c858c76d0845
mod_tweet_data: New module that fetches and sends tweet data
JC Brand <jc@opkode.com>
parents:
4489
diff
changeset
|
9 |
<message id="example" from="chatroom@muc.example.org" to="user@chat.example.org/resource"> |
4487
c4f11a4b5ac7
mod_ogp: Add the ability to whitelist domains
JC Brand <jc@opkode.com>
parents:
4464
diff
changeset
|
10 |
<apply-to xmlns="urn:xmpp:fasten:0" id="origin-id-X"> |
c4f11a4b5ac7
mod_ogp: Add the ability to whitelist domains
JC Brand <jc@opkode.com>
parents:
4464
diff
changeset
|
11 |
<meta xmlns="http://www.w3.org/1999/xhtml" property="og:title" content="The Rock"/> |
c4f11a4b5ac7
mod_ogp: Add the ability to whitelist domains
JC Brand <jc@opkode.com> |