Age | Commit message (Collapse) | Author |
|
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.
|
|
Equipped with the LogBag, we can now rework the "madness" that is the
Discord `find_insertion` thing, even though it wasn't all too bad (and
probably faster than the current version).
|
|
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!
|
|
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
|
|
This is way more accurate than Log::was_rewarded, especially for
repeated kills in a week.
|
|
This will ensure that ezau will post a new message if editing the old
one would push it above the character limit.
|
|
This makes discord::post_link return any Error (or well, Result) that is
produced by the ready event handler.
|
|
The other one was hard to see, as it was rendered as a darkgrey
checkmark on grey background.
|
|
|