This shows you the differences between two versions of the page.
Next revision | Previous revision Next revision Both sides next revision | ||
matrix_bot [2020/05/30 08:06] admin created |
matrix_bot [2020/05/30 08:17] admin |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Matrix Bot ====== | ====== Matrix Bot ====== | ||
- | My first attempt at a Matrix box. I've been looking at the docs and it seems like, while there was an event stream in the past, it's now deprecated. The way to get a list of events to respond to is just to ask for them every couple of seconds. Doesn't sound very efficent, but the server seems to process the request extremely quickly (and the result is a couple of bytes). | + | My first attempt at a Matrix box. I've been looking at the docs and it seems like, while there was an event stream in the past, it's now deprecated. The way to get a list of events to respond to is just to ask for them every couple of seconds. Doesn't sound very efficent, but the server seems to process the request extremely quickly (and the null result is a couple of bytes). |
So, a simple way to get the events is something like this: | So, a simple way to get the events is something like this: | ||
Line 62: | Line 62: | ||
</code> | </code> | ||
- | There's a bit more there where it checks access lists and include files depending on what rule it is, but you get the idea. Simple. | + | There's a bit more there where it checks access lists and include files depending on what rule it is, but you get the idea. I only have around 30 rules, so it's pretty much instant. Simple. |