Добавить автомодерацию: политики, порог жалоб, settings/hits API и тесты.
Refs EventHub/EventHubBack#37 Refs EventHub/EventHubBack#38 Refs EventHub/EventHubBack#39 Refs EventHub/EventHubBack#40
This commit is contained in:
@@ -203,6 +203,29 @@
|
||||
added_at :: calendar:datetime()
|
||||
}).
|
||||
|
||||
%% ------------------- Автомодерация -----------------------------------
|
||||
-record(automod_settings, {
|
||||
id :: binary(), % singleton <<"default">>
|
||||
keyword_action :: reject | flag | censor,
|
||||
match_mode :: word_boundary | substring,
|
||||
report_threshold :: pos_integer(),
|
||||
updated_at :: calendar:datetime(),
|
||||
updated_by :: binary()
|
||||
}).
|
||||
|
||||
-record(automod_hit, {
|
||||
id :: binary(),
|
||||
entity_type :: calendar | event | review,
|
||||
entity_id :: binary(),
|
||||
trigger :: keyword | report_threshold,
|
||||
matched_words :: [binary()],
|
||||
action_taken :: reject | flag | censor | freeze | hide,
|
||||
status :: open | approved | rejected,
|
||||
created_at :: calendar:datetime(),
|
||||
resolved_at :: calendar:datetime() | undefined,
|
||||
resolved_by :: binary()
|
||||
}).
|
||||
|
||||
%% ------------------- Баг-трекер --------------------------------------
|
||||
-record(ticket, {
|
||||
id :: binary(),
|
||||
|
||||
Reference in New Issue
Block a user