aboutsummaryrefslogtreecommitdiff
path: root/src/Tomato/Validate.hs
blob: fe0d82a060b4954070585e7fe58d0199749be728 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
module Tomato.Validate
    ( isTomato
    ) where

import RIO

import Tomato.Data.Message (InMessage (..))


-- | Check if a message is a tomato request
isTomato :: InMessage -> Bool
isTomato m =
    not (hasAttach m) &&
    groupId m == "87220147" && 
    isUser m &&
    text m == "tomato"