Directory

Introducing "relay" plugin by ashfame · Pull Request #3 · WordPress/matrix-bots · GitHub
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introducing "relay" plugin #3

Merged
merged 2 commits into from
Dec 7, 2023
Merged

Introducing "relay" plugin #3

merged 2 commits into from
Dec 7, 2023

Conversation

ashfame
Copy link
Member

@ashfame ashfame commented Nov 30, 2023

This PR introduces a relay plugin which relays events from a room to an outside HTTP endpoint.

In turn, the HTTP endpoint can also choose to respond to a particular event by just returning a JSON response, which would then be posted in the room.

As of version 1.0.0 it supports the following fields in JSON response:

  • messages or message field for what should be posted in the room (basic markdown support included)
  • reply_in_thread which can be set to true or false and the message(s) returned would be posted in a thread to the observed event. If the event was already in a thread, the value of this field is ignored and message(s) is always posted in the thread.

This would power the tracbot functionality and any other outgoing webhooks based integrations, for which the logic of those bots sit elsewhere.

@ashfame ashfame self-assigned this Nov 30, 2023
Copy link
Member

@psrpinto psrpinto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@ashfame ashfame merged commit c24a5de into main Dec 7, 2023
@ashfame ashfame deleted the relaybot branch December 7, 2023 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants