* basic ban conversion, but i have better ideas
* Still very WIP on CLIM prompt-for-accept semantics.
* Introduce promotable streams.
This allows parameters to specify details to prompt for missing
arguments
and allow for interactive commands.
* Changes that were made before PolicyListManager that no longer make sense
We don't want the default list anymore since we're just going to prompt
with the lists that they can choose from.
* Fix semantics of TagDynamicEnvironment.
Bind and write were wrong and bind was binding to the node name
instead of the variable name.
* The JSX factory can render presentation types to DocumentNodes, unsure if this is the right
move yet but it works
* Attributes for anchor nodes now render properly
* Ban command prompts are working!!!!
* Stub AppserviceBotEmitter.
There isn't much we can do right now until there is time to work on
https://github.com/Gnuxie/Draupnir/issues/13.
* Combine ban/unban syntax.
* Remove old UnbanBanCommands.
WARNING: There is a major difference in that the ban command no longer supports
globs, I don't think?
* Activate new unban command.
* The presentation type boolean will have to be just a string for now.
I don't think it makes sense to read them into actual booleans.
* configurable defaults for ban reason.
So as a history lesson.
The Matrix Bot SDK uses the npm library "requests".
When there was a http error, matrix-bot-sdk
would literally throw the response object.
This would be a horrible 1000+line long thing to accidentally
be logged to the console via node's inspect.
Though it was inevitable since you can't be sure every catch
was handling the error correctly. Irregardless, the solution
developed at Element was to create an error object
that had concise details.
This was great, however, within the matrix-bot-sdk there is
[this](https://github.com/Half-Shot/matrix-bot-sdk/blob/f58d7ea6e24d1db8b9b8009dea4cd97cbff54d0c/src/http.ts#L66)
awful line of code which logs every http error as error using the
matrix-bot-sdk logger.
This wastes so much log space and causes alarm fatigue,
rather than muting the module, the action instead taken
was to redact stack traces from http errors.
This was not a good idea.
Eventually matrix-bot-sdk was updated to have a MatrixError type
when a request was performed via the client-server api that had an
error.
matrix-appservice-bridge depends upon this and so Mjolnir now needs
to be updated to throw MatrixError's.
We have gone a step further in this commit and also muted
the matrix-bot-sdk http module, to stop the alarm fatigue problem
https://github.com/turt2live/matrix-bot-sdk/pull/158
We haven't changed this yet and I'd like to merge the current changes
to the new command framework before we go to town changing all the legacy commands.
Yes a test should probably be written for this, even if just as a debug
utility. This test just wasn't testing much regardless and
time needs to be put aside to do it properly.
The feature is still under development though.
They're required which is bs because people are just going to make
up bullshit to satisfy the requirement. And it's rare
that they need to be intercepted.
What's rarer is intercepting them and not being able to change
the implementation.
So what am i going to do instead?
just not have it and you can subtype CommandError.
until i can think of something else.
This commit is NOT contributed under the Apache-2.0 License.
Copyright (C) 2022 Gnuxie <Gnuxie@protonmail.com>
All rights reserved.
we need it for more than validation
probably considering getting rid of the error code thing
or making it optional idk.
This commit is NOT contributed under the Apache-2.0 License.
Copyright (C) 2022 Gnuxie <Gnuxie@protonmail.com>
All rights reserved.
We've basically made an embedded mini language for commands.
The idea is that there are a sequence of strings at the start
of a command that are pattern matched against a table.
Then eventually we will also pattern match against the presentation
types that they each accept.
This commit is NOT contributed under the Apache-2.0 License.
Copyright (C) 2022 Gnuxie <Gnuxie@protonmail.com>
All rights reserved.