-
-
Notifications
You must be signed in to change notification settings - Fork 28
Example: Matrix
Lorenzo Mangani edited this page Oct 2, 2021
·
2 revisions
Matrix is an open network for secure, decentralized communication.
In this example we'll use Matrix for two paStash instances using Matrix rooms to securely connect and exchange data, with optional e2e encryption 🔒
Install pastash and the required plugin on two separate systems:
npm install -g @pastash/pastash @pastash/input_matrix @pastash/output_matrix
Create a recipe on the sender and receiver, joining the same roomId
.
input {
stdin {}
}
output {
matrix {
userId => "@some_account:matrix.org"
roomId => "#some_room:matrix.org"
token => "xxx_XXXXXXXXXXXXXXXXXXXXXXXXXXXX_xxxxx"
}
}
pastash --config_file=/tmp/sender.conf
input {
matrix {
userId => "@some_account:matrix.org"
roomId => "#some_room:matrix.org"
token => "xxx_XXXXXXXXXXXXXXXXXXXXXXXXXXXX_xxxxx"
}
}
output {
stdout {}
}
pastash --config_file=/tmp/receiver.conf
Type something in the sender console and you should see corresponding events on the receiver. Et Voila'!