-
Notifications
You must be signed in to change notification settings - Fork 1
rburakov/openfire-callbackOnMessage-plugin
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title> Callback on message Plugin Readme</title>
<style type="text/css">
BODY {
font-size : 100%;
}
BODY, TD, TH {
font-family : tahoma, verdana, arial, helvetica, sans-serif;
font-size : 0.8em;
}
H2 {
font-size : 10pt;
font-weight : bold;
}
A:hover {
text-decoration : none;
}
H1 {
font-family : tahoma, arial, helvetica, sans-serif;
font-size : 1.4em;
font-weight: bold;
border-bottom : 1px #ccc solid;
padding-bottom : 2px;
}
TT {
font-family : courier new;
font-weight : bold;
color : #060;
}
PRE {
font-family : courier new;
font-size : 100%;
}
#datatable TH {
color : #fff;
background-color : #2A448C;
text-align : left;
}
#datatable TD {
background-color : #FAF6EF;
}
#datatable .name {
background-color : #DCE2F5;
}
</style>
</head>
<body>
<h1>
Callback on message Plugin Readme
</h1>
<h2>Overview</h2>
<p>
Plugin intercepts messages and sends async POST request with JSON body to defined url. It's based on callbackOnOffline plugin created by Pavel Goski and Krzysztof Misztal.
Could be used for a bot implementation. Custom API endpoint gets incoming message callback request, analyses data and sends response message back to a user via Chat API plugin.
</p>
<p>
Example JSON body:
<pre>
<code>
{
"token":"21uh9d1h91d",
"from":"[email protected]",
"to":"[email protected]",
"body":"Message body, so what user's typed"
}
</code>
</pre>
</p>
<h2>Installation</h2>
<p>
Copy callbackOnMessage.jar into the plugins directory of your Openfire installation.
The plugin will then be automatically deployed. To upgrade to a new version,
copy the new callbackOnMessage.jar file over the existing file.
</p>
<h2>
Callback properties
</h2>
There are few properties that can be defined to change plugin behaviour:
<ul>
<li><code>plugin.callback_on_message.debug</code> - enable debug logs. If something doesn't work set property to true</li>
<li><code>plugin.callback_on_message.url</code> - url that will be called</li>
<li><code>plugin.callback_on_message.token</code> - token to be send with request</li>
<li><code>plugin.callback_on_message.send_body</code> - boolean value to determine if message's body will be send. True by default.</li>
<li><code>plugin.callback_on_message.user_status</code> - string value to determine recipient user status (Both, Online, Offline). Both by default.</li>
<li><code>plugin.callback_on_message.user_regex</code> - regular expression to filter recipient user name. Not applicable by default. E.g. "^somebot$" to handle messages sent to [email protected].</li>
</ul>
</body>
</html>
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published