From 3d3163a1028e99e5073fd39adc9aee5d76a5e5a2 Mon Sep 17 00:00:00 2001 From: Jacques Comeaux Date: Fri, 27 May 2022 21:07:43 -0500 Subject: Initial Commit --- src/Tomato/Validate.hs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/Tomato/Validate.hs (limited to 'src/Tomato/Validate.hs') diff --git a/src/Tomato/Validate.hs b/src/Tomato/Validate.hs new file mode 100644 index 0000000..a3dd328 --- /dev/null +++ b/src/Tomato/Validate.hs @@ -0,0 +1,16 @@ +module Tomato.Validate + ( isTomato + ) where + +import RIO + +import Data.Message (InMessage (..)) + + +isTomato :: InMessage -> Bool +isTomato m = + not (hasAttach m) && + groupId m == 87220147 && + isUser m && + text m == "tomato" + -- cgit v1.2.3