Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Commit

Permalink
Automatic moderation (#875)
Browse files Browse the repository at this point in the history
* Automatic moderation

* finish

* modpack fixes

* fix unknown license msg

* fix moderation issues
  • Loading branch information
Geometrically authored Feb 21, 2024
1 parent 33b2a94 commit 04d8341
Show file tree
Hide file tree
Showing 43 changed files with 1,597 additions and 158 deletions.
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,5 @@ CLICKHOUSE_DATABASE=staging_ariadne
MAXMIND_LICENSE_KEY=none

PAYOUTS_BUDGET=100

FLAME_ANVIL_URL=none

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ sha1 = { version = "0.6.1", features = ["std"] }
sha2 = "0.9.9"
hmac = "0.11.0"
argon2 = { version = "0.5.0", features = ["std"] }
murmur2 = "0.1.0"
bitflags = "2.4.0"
hex = "0.4.3"
zxcvbn = "2.2.2"
Expand Down
19 changes: 19 additions & 0 deletions migrations/20240131224610_moderation_packs.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
CREATE TABLE moderation_external_licenses (
id bigint PRIMARY KEY,
title text not null,
status text not null,
link text null,
exceptions text null,
proof text null,
flame_project_id integer null
);

CREATE TABLE moderation_external_files (
sha1 bytea PRIMARY KEY,
external_license_id bigint references moderation_external_licenses not null
);

ALTER TABLE files ADD COLUMN metadata jsonb NULL;

INSERT INTO users (id, username, name, email, avatar_url, bio, role, badges, balance)
VALUES (0, 'AutoMod', 'AutoMod', '[email protected]', 'https://cdn.modrinth.com/user/2REoufqX/6aabaf2d1fca2935662eca4ce451cd9775054c22.png', 'An automated account performing moderation utilities for Modrinth.', 'moderator', 0, 0)
2 changes: 2 additions & 0 deletions migrations/20240221215354_moderation_pack_fixes.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER TABLE moderation_external_files ALTER COLUMN sha1 SET NOT NULL;
ALTER TABLE moderation_external_licenses ALTER COLUMN title DROP NOT NULL;
Loading

0 comments on commit 04d8341

Please sign in to comment.