View Source Mobilizon.Service.AntiSpam.Provider behaviour (Mobilizon v5.0.0-beta.1)
Provider Behaviour for anti-spam detection.
Supported backends
Summary
Callbacks
Check a comment details
Check an event details
Check a profile details
Check an user details
Make sure the provider is ready
Types
@type result() :: spam_result() | {:error, any()}
@type spam_result() :: :ham | :spam | :discard
Callbacks
Link to this callback
check_comment(comment_body, username, is_reply?, email, ip, user_agent)
View Source@callback check_comment( comment_body :: String.t(), username :: String.t(), is_reply? :: boolean(), email :: String.t() | nil, ip :: String.t(), user_agent :: String.t() | nil ) :: result()
Check a comment details
@callback check_event( event_body :: String.t(), username :: String.t(), email :: String.t() | nil, ip :: String.t(), user_agent :: String.t() | nil ) :: result()
Check an event details
@callback check_profile( username :: String.t(), summary :: String.t(), email :: String.t() | nil, ip :: String.t(), user_agent :: String.t() | nil ) :: result()
Check a profile details
Check an user details
@callback ready?() :: boolean()
Make sure the provider is ready