matrix-bot-0.2.0: Matrix multipurpose bot
Safe HaskellNone
LanguageHaskell2010

MatrixBot.Bot.EventsListener.Filters

Description

Events filtering implementation

Documentation

type UsersFilter = NonEmpty Mxid Source #

filterByUser Source #

Arguments

:: forall (m :: Type -> Type). MonadLogger m 
=> Maybe UsersFilter

Whitelisted user IDs

-> Mxid

Current user ID

-> ExceptT Text m () 

type RoomsFilter = NonEmpty RoomId Source #

filterByRoom Source #

Arguments

:: forall (m :: Type -> Type). MonadLogger m 
=> Maybe RoomsFilter

Whitelisted room IDs

-> RoomId

Current room ID

-> ExceptT Text m () 

data MediaMsgtype Source #

Instances

Instances details
FromJSON MediaMsgtype Source # 
Instance details

Defined in MatrixBot.Bot.EventsListener.Filters

Methods

parseJSON :: Value -> Parser MediaMsgtype

parseJSONList :: Value -> Parser [MediaMsgtype]

omittedField :: Maybe MediaMsgtype

ToJSON MediaMsgtype Source # 
Instance details

Defined in MatrixBot.Bot.EventsListener.Filters

Methods

toJSON :: MediaMsgtype -> Value

toEncoding :: MediaMsgtype -> Encoding

toJSONList :: [MediaMsgtype] -> Value

toEncodingList :: [MediaMsgtype] -> Encoding

omitField :: MediaMsgtype -> Bool

Bounded MediaMsgtype Source # 
Instance details

Defined in MatrixBot.Bot.EventsListener.Filters

Enum MediaMsgtype Source # 
Instance details

Defined in MatrixBot.Bot.EventsListener.Filters

Generic MediaMsgtype Source # 
Instance details

Defined in MatrixBot.Bot.EventsListener.Filters

Associated Types

type Rep MediaMsgtype 
Instance details

Defined in MatrixBot.Bot.EventsListener.Filters

type Rep MediaMsgtype = D1 ('MetaData "MediaMsgtype" "MatrixBot.Bot.EventsListener.Filters" "matrix-bot-0.2.0-9uSIHSa7xxj9RTOQ8eXB9Z" 'False) ((C1 ('MetaCons "MediaMsgtype_File" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MediaMsgtype_Image" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "MediaMsgtype_Video" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MediaMsgtype_Audio" 'PrefixI 'False) (U1 :: Type -> Type)))
Show MediaMsgtype Source # 
Instance details

Defined in MatrixBot.Bot.EventsListener.Filters

Methods

showsPrec :: Int -> MediaMsgtype -> ShowS

show :: MediaMsgtype -> String

showList :: [MediaMsgtype] -> ShowS

Eq MediaMsgtype Source # 
Instance details

Defined in MatrixBot.Bot.EventsListener.Filters

Methods

(==) :: MediaMsgtype -> MediaMsgtype -> Bool

(/=) :: MediaMsgtype -> MediaMsgtype -> Bool

type Rep MediaMsgtype Source # 
Instance details

Defined in MatrixBot.Bot.EventsListener.Filters

type Rep MediaMsgtype = D1 ('MetaData "MediaMsgtype" "MatrixBot.Bot.EventsListener.Filters" "matrix-bot-0.2.0-9uSIHSa7xxj9RTOQ8eXB9Z" 'False) ((C1 ('MetaCons "MediaMsgtype_File" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MediaMsgtype_Image" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "MediaMsgtype_Video" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MediaMsgtype_Audio" 'PrefixI 'False) (U1 :: Type -> Type)))

filterByMediaMsgtype Source #

Arguments

:: forall (m :: Type -> Type). MonadLogger m 
=> Maybe MediaMsgtypeFilter

Whitelisted msgtypes

-> MRoomMessageClientEventContent 
-> ExceptT Text m ()