mirror of
https://github.com/the-draupnir-project/Draupnir.git
synced 2026-06-05 23:31:24 +00:00
601aa33bc6
A bizarre contraption. The ErrorCache was seemingly introduced to reduce the number of errors in the management room. https://github.com/matrix-org/mjolnir/commit/82214c6cd88d83abed05fec4a871a874e6e0265b It makes sense why it was added if you consider that many admins will run Draupnir without giving it the permission to manage server ACL in its rooms. Though, I'm not sure why then you would add the error cache rather than properly supporting that use case. So perhaps there were other reasons. Either way, what is drawing the line for me is that the ErrorCache will suppress any error within rooms that is not a permission error, if there was any error that was not a permission error within a 15 minute window. Considering the typical Draupnir will not even sync for hours at a time, even in large communities. It does present a problem for rooms with a lot of join/leave events. I think that's probably why the error cache was added. Ahh, well, fuck. Well what is the real solution to this? The real solution when the kind is acl is to allow the bot to run without applying ACLs. Ok fine but, hey wait a minute. Why would there be any other kind of persistent error when banning someone that would be unimportant enough to silently hide in an ErrorCache?? IDK let's just add an opttion to disable server ACL, since they might want to use another tool for that anyhow. Out of scope for the current work though. https://github.com/Gnuxie/Draupnir/pull/85
36 lines
1.2 KiB
TypeScript
36 lines
1.2 KiB
TypeScript
/**
|
|
* Copyright (C) 2022 Gnuxie <Gnuxie@protonmail.com>
|
|
* All rights reserved.
|
|
*
|
|
* This file is modified and is NOT licensed under the Apache License.
|
|
* This modified file incorperates work from mjolnir
|
|
* https://github.com/matrix-org/mjolnir
|
|
* which included the following license notice:
|
|
|
|
Copyright 2019 The Matrix.org Foundation C.I.C.
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
*
|
|
* However, this file is modified and the modifications in this file
|
|
* are NOT distributed, contributed, committed, or licensed under the Apache License.
|
|
*/
|
|
|
|
export const ERROR_KIND_PERMISSION = "permission";
|
|
export const ERROR_KIND_FATAL = "fatal";
|
|
|
|
export interface RoomUpdateError {
|
|
roomId: string;
|
|
errorMessage: string;
|
|
errorKind: string;
|
|
}
|