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.
|
|
|
|
|
|
|
|
This also comes with an update to evtclib 0.6.0, therefore we get access
to some new boss enums.
|
|
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.
|
|
serenity and matrix-sdk pull in quite a lot of dependencies, which for a
minimal use of ezau might not be wanted. Therefore, we now disable those
parts by default, and the user has to opt-in into building ezau with
Discord or Matrix functionality.
|
|
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!
|
|
The functionality has been merged upstream and the repository has been
deleted, so we no longer need (or should have) this patch here.
|
|
This is a bit bigger than usual, because it brings the serenity update
from 0.8.x to 0.9 with a lot of API changes. The biggest offender is the
new async environment, which means that we need to sprinkle some .awaits
here and there, as well as use tokio to spawn a runtime. Serenity
currently uses tokio 0.2, so we need to stick to the older version until
serenity updates, otherwise we'll get a runtime mismatch.
Another small change comes from serenity switching to typemap_rev[1]
instead of their old implementation, which is currently still missing
some methods. Until those are implemented[2], we're patching the
dependency directly.
The good news is that all of the changes are pretty much contained to
src/discord.rs only, as the other parts of ezau could stay untouched.
[1]: https://github.com/bdashore3/typemap_rev
[2]: https://github.com/bdashore3/typemap_rev/pull/1
|
|
|
|
There's a good chance that this version of evtclib will stay as 0.5, so
it's a good idea to adapt our code to the API changes (mainly using
evtclib::Encounter instead of evtclib::Boss).
|
|
|
|
The CM detection in evtclib has been fixed in 0.4.3 so we can now rely
on that again.
|
|
|
|
|
|
|
|
ezau having the watching functionality is nice, but sometimes for
scripts you might want to have the old "upload this single log and post
it to discord" functionality. As such, ezau has now been split into two
subcommands (which use the same core):
ezau watch runs the inotify-based directory watcher to zip and upload
new logs. Additionally, it now respects the "upload = ..." config
settings, which means you can also use it as a zipper only, without
having every log uploaded.
ezau upload performs a single-shot upload with the discord notification.
Furthermore, the discord auth token/channel id have been moved to a
configuration file. Switches to override this for single runs might be
provided in the future, but for now, it seems more sensible to have it
in a persistent configuration.
|
|
evtc-watch consists of three parts at the moment: watch the files, zip
them up and call ezau to upload them. We can now just do all of those
inside of ezau, which saves us the extra script, makes it more
platform-independent (as notify also works on Windows) and makes
configuration and everything easier, as all the data will be inside of
one program and doesn't need to be passed around.
A flag (or subcommand!) to upload a single file might be added later to
retain the previous behaviour of ezau.
|
|
|