Age | Commit message (Collapse) | Author |
|
|
|
(not available as a setting yet)
|
|
|
|
|
|
|
|
This also removes the direct import of ruma and instead imports
matrix_sdk::ruma. This is simply to avoid mismatched versions, otherwise
there might be errors popping up about missing traits.
|
|
The biggest adaption was the update to matrix-sdk 0.4, as some types got
shuffled around and the API is now imported from ruma. The
relates_to.is_none() check seems to no longer work, as Relation::_Custom
is used instead, so instead we now explicitely check if the message is
neither a reply nor a replacement (on a related note, it is unknown to
me whether we need to find the first original message or if we could
also set a replaces on the last message in the chain).
serenity, tokio and reqwest needed no API updates on the other hand.
|
|
In matrix, every edit count is also sent as a room message, so are
joins, leaves, ... which makes 10 (the default) a pretty low number of
previous messages to check for. In comparison, the discord integration
checks the last 25 messages to find the correct one.
This patch increases the limit to 60 messages, loaded in 3 chunks a 20
messages each. This should ensure that even for more edited channels,
the message is found in more cases.
|
|
Doing all the "new log" insertion based on simple string operations is a
bit of madness, so the proper course of action is to parse them into a
proper intermediate representation from which we can then generate a
plain and HTML body.
In addition, this has some other minor code cleanup for the matrix
module.
|
|
|
|
Similar to Discord posting, this now allows ezau to post a message to
the given Matrix room for every log.
The text handling is still pretty bad and should be reworked, but so
should the Discord one. This is just the initial support, now that the
actual posting works we can add some tests and proper text parsing,
together with unifying some of the logic between Discord and Matrix.
Note that this currently only works for unencrypted rooms!
|