From a1c7bde56adbe85ef81c0e9aaced869f16f864c1 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Tue, 1 Aug 2017 23:51:28 +0200 Subject: Add `Message` types Add a few types to collect properties of a message, including message body, channel posted to, and sender. Need something like this for the GitHub Commit plugin, where we need access to the message to get the SHA, and we need the channel to get the repo URL from the database. --- src/Message.hs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/Message.hs (limited to 'src/Message.hs') diff --git a/src/Message.hs b/src/Message.hs new file mode 100644 index 0000000..6a95638 --- /dev/null +++ b/src/Message.hs @@ -0,0 +1,15 @@ +module Message + ( Message(..) + , Channel + , Nick + ) where + +type Channel = String + +type Nick = String + +data Message = Message + { text :: String + , channel :: Channel + , nick :: Nick + } -- cgit v1.2.3