Gamend.Chat.FilterWord (gamend_core v1.0.1192)

Copy Markdown View Source

Ecto schema for the chat_filter_words table — one entry of the chat word blocklist.

Fields

  • word — the normalized form (see Gamend.Chat.Moderation.Normalizer)
  • severity"block" rejects the message, "mask" replaces the hit with ***, "flag" stores it verbatim and files a report
  • match_mode"substring" matches anywhere, "exact" only a whole word
  • lang — provenance of a bundled-list import ("en", "de", …), nil for a hand-added word. Matching is language-agnostic; this only records where the row came from so a list can be removed in bulk.

Summary

Functions

The match modes a filter word may have.

The severities a filter word may have.

Types

t()

@type t() :: %Gamend.Chat.FilterWord{
  __meta__: term(),
  id: term(),
  inserted_at: term(),
  lang: term(),
  match_mode: term(),
  severity: term(),
  updated_at: term(),
  word: term()
}

Functions

match_modes()

@spec match_modes() :: [String.t()]

The match modes a filter word may have.

severities()

@spec severities() :: [String.t()]

The severities a filter word may have.