ejabberd-contrib/mod_post_log
Badlop b3c8d25104 Reword modules documentation to reflect the usage of local configuration files 2022-08-12 10:52:20 +02:00
..
conf Modules that require configuration, provide it commented (#303) 2021-07-07 21:53:44 +02:00
src Fix compilation and Xref warnings 2022-07-27 18:14:29 +02:00
COPYING Add README and license to mod_post_log 2015-02-25 15:43:22 -03:00
README.md Reword modules documentation to reflect the usage of local configuration files 2022-08-12 10:52:20 +02:00
mod_post_log.spec Cleanup for module packaging support in ejabberd 2015-03-11 14:19:35 +01:00

README.md

mod_post_log - Logs messages to an HTTP API

  • Author: Tim Stewart, Mojo Lingo LLC
  • Requirements: ejabberd 14.07 or later

This module implements logging of all messages sent (chat and groupchat) via an HTTP API.

Configuration

  • url: URL where the HTTP POSTs are to be sent.

  • ts_header: Default value: "X-Message-Timestamp"

  • from_header: Default value: "X-Message-From"

  • to_header: Default value: "X-Message-To"

  • headers: Default value: []

  • content_type: Default value: "text/xml"

  • http_options: Default value: []

  • req_options: Default value: []

Example Configuration

modules:
  mod_post_log:
    url: "http://foo.bar.com/messages"

API Example

POST /messages HTTP/1.0
HTTP-X-MESSAGE-FROM: doo@dah.com
HTTP_X_MESSAGE_TO: foo@bar.com
Content-Type: application/xml
Content-Length: 122

<message to='foo@bar.com' from='doo@dah.com' type='chat'>
  <body xmlns='jabber:client'>Hello there Foo!</body>
</message>