Skip to content

Prosody module to convert AstraChat style stanza-embedded images to XEP-0363

License

Notifications You must be signed in to change notification settings

lixmal/mod_img2url

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

mod_img2url

Converts stanzes with embedded images or audio sent by the AstraChat clients to XEP-0363 (HTTP File Upload). Files will be written to the http_upload directory and an external link will be send to the recipient instead of the (possibly large) file. The module will strip binaries early, so they don't get archived.

PREREQUISITES

Requires the mod_http_upload prosody module installed.

It is recommended to set http_external_url in prosody.cfg.lua to something like:

http_external_url = "https://example.org:5281/"

The module will build the url from (http_external_url || basic http url) + (config setting img2url_url || "/upload")

INSTALL

  • Clone the repo to the prosody plugins directory, e.g.

git clone https://github.com/lixmal/mod_img2url.git /etc/prosody/plugins/mod_img2url

  • Enable in prosody.cfg.lua:
    modules_enabled = {
       'img2url';
    }
    

TODO

  • Match more mime types

About

Prosody module to convert AstraChat style stanza-embedded images to XEP-0363

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages