Software /
code /
prosody-modules
File
mod_tweet_data/README.md @ 6111:ffd0184cd478
mod_compliance_latest: New module that depends on and therefore loads the latest compliance tester mod.
diff --git a/mod_compliance_latest/README.md b/mod_compliance_latest/README.md
new file mode 100644
--- /dev/null
+++ b/mod_compliance_latest/README.md
@@ -0,0 +1,25 @@
+---
+summary: XMPP Compliance Suites self-test
+labels:
+- Stage-Beta
+rockspec:
+ dependencies:
+ - mod_compliance_2023
+...
+
+# Introduction
+
+This module will always require and load to the lastest compliance tester we have in the community modules.
+Currently this is [mod_compliance_2023].
+
+# Configuration
+
+Just load this module as any other module and it will automatically install [mod_compliance_2023] if you use the Prosody plugin installer.
+See the linked module for further details.
+
+# Compatibility
+
+ Prosody-Version Status
+ --------------- ----------------------
+ trunk Works as of 2024-12-22
+ 0.12 Works
diff --git a/mod_compliance_latest/mod_compliance_latest.lua b/mod_compliance_latest/mod_compliance_latest.lua
new file mode 100644
--- /dev/null
+++ b/mod_compliance_latest/mod_compliance_latest.lua
@@ -0,0 +1,1 @@
+module:depends("compliance_2023");
author | Menel <menel@snikket.de> |
---|---|
date | Sun, 22 Dec 2024 18:12:42 +0100 |
parent | 4597:c858c76d0845 |
line wrap: on
line source
# mod_tweet_data This module adds [Open Graph Protocol](https://ogp.me) metadata to Twitter.com tweet URLs sent inside a MUC. It's similar to [mod_ogp](https://modules.prosody.im/mod_ogp.html) but is adapted specifically to Twitter.com, which doesn't support the [Open Graph Protocol](https://ogp.me). When a user sends a tweet URL in a MUC (where the message has its `id` equal to its `origin-id`), this module calls that URL to get the tweet data. If it finds any, it sends a [XEP-0422 fastening](https://xmpp.org/extensions/xep-0422.html) applied to the original message that looks as follows (note, I haven't used real data here): ```xml <message xmlns="jabber:client" to="user@chat.example.org/resource" from="chatroom@muc.example.org" type="groupchat"> <apply-to xmlns="urn:xmpp:fasten:0" id="82dbc94c-c18a-4e51-a0d5-9fd3a7bfd267"> <meta xmlns="http://www.w3.org/1999/xhtml" property="og:article:author" content="TwitterCritter" /> <meta xmlns="http://www.w3.org/1999/xhtml" property="og:article:published_time" content="2021-06-22T06:44:20.000Z" /> <meta xmlns="http://www.w3.org/1999/xhtml" property="og:description" content="I'm in ur twitterz" /> <meta xmlns="http://www.w3.org/1999/xhtml" property="og:image" content="https://pbs.twimg.com/profile_images/984325764849045505/Ty3F93Ln_normal.jpg" /> <meta xmlns="http://www.w3.org/1999/xhtml" property="og:title" content="TwitterCritter" /> <meta xmlns="http://www.w3.org/1999/xhtml" property="og:type" content="tweet" /> <meta xmlns="http://www.w3.org/1999/xhtml" property="og:url" content="https://twitter.com/TwitterCritter/status/1407227938391707648" /> </apply-to> <stanza-id xmlns="urn:xmpp:sid:0" by="chatroom@muc.example.org" id="90e8818d-390a-4c69-a2d8-0fd463fb3366"/> </message> ``` Configuration ------------- You'll need to provide a Twitter APIv2 bearer token. ```lua Component "muc.example.org" "muc" modules_enabled = { "tweet_data" } twitter_apiv2_bearer_token = { "some-very-long-string" } ```