Configuration¶
Minimal setup¶
For a minimal prosody <https://prosody.im>
based setup, add these lines at the bottom of
/etc/prosody/prosody.cfg.lua
:
Component "slidge-whatsapp.example.org"
component_secret = "secret"
And start slidge-whatsapp with:
slidge-whatsapp \
--jid slidge-whatsapp.example.org \
--secret secret \
--home-dir /somewhere/writable
Advanced usage¶
Refer to the slidge admin docs for more advanced setups and examples of configuration for other XMPP servers.
You will probably want to add support for attachments received from WhatsApp, and setup slidge-whatsapp as a privileged component for better UX.
Optional dependencies¶
WhatsApp requires that image, audio, and video attachments are sent in specific formats; these formats are generaly incompatible with prevailing standards across XMPP clients.
Thus, sending attachments with full client compatibility requires that we convert these on-the-fly; this requires that FFmpeg is installed. If a valid FFmpeg installation is not found, attachments will still be sent in their original formats, which may cause these to appear as “document” attachments in official WhatsApp clients.
FFmpeg is widely used and packaged – please refer to your distribution’s documentation on how to install the FFmpeg package.
slidge-whatsapp-specific config¶
All generic slidge configuration options apply.
slidge-whatsapp provides the additional component-wide options displayed in the table below. They can be used:
in an INI config file by starting slidge-whatsapp with
-c /path/to/file.ini
;as command line arguments, prepended with
--
, e.g.,--some-option=value
;as environment variables, upper case, prepended with
SLIDGE_WHATSAPP_
, and with dashes substituted with underscores, e.g.,SLIDGE_WHATSAPP_SOME_OPTION=value
.
name | default | help |
---|---|---|
always-sync-roster | False | Whether or not to perform a full sync of the WhatsApp roster on startup. |
db-path | None | The path to the database used for the WhatsApp plugin. Default to ${SLIDGE_HOME_DIR}/whatsapp/whatsapp.db |
enable-link-previews | True | Whether or not previews for links (URLs) should be generated on outgoing messages |