A very basic incoming webhook for Matrix
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Dave Umrysh a2e6d171a1 first commit 3 months ago
incoming_webhook first commit 3 months ago
.htaccess first commit 3 months ago
LICENSE first commit 3 months ago
README.md first commit 3 months ago
base-config.yaml first commit 3 months ago
maubot.yaml first commit 3 months ago

README.md

incoming webhook

An incoming webhook maubot based on the maugitea plugin

WARNING: This bot is still under development, so things may change, break, or even work properly.

Install & Run

icoming_webhook: just a regular plugin, zip it and upload it.

Webhooks

url: https://fancy.domain/_matrix/maubot/plugin/<instance_name>/webhook/r0?room=<room-id>

Add the secret to base-config.yaml

  • webhook-secret: "your secret here"

Bot usage

Add the bot to the room and then when you POST a message to the webhook URL the bot will post the message to the room.

Example:

<?php
	$ch = curl_init();
	curl_setopt($ch, CURLOPT_URL,$web_hook_url);
	curl_setopt($ch, CURLOPT_POST, 1);
	curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(array('secret' => $web_hook_secret, 'message' => "Here is a test message ")));
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
	curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));
	$result = curl_exec($ch);
	curl_close($ch);
?>