aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2017-08-01 23:51:28 +0200
committerTeddy Wing2017-08-01 23:51:28 +0200
commita1c7bde56adbe85ef81c0e9aaced869f16f864c1 (patch)
tree1491f8710b15a399d13c07d8731b9640f8b3df46
parent8b8c6864b7b1c2edcd93ce75393cef36883622b9 (diff)
downloadsorbot-a1c7bde56adbe85ef81c0e9aaced869f16f864c1.tar.bz2
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.
-rw-r--r--src/Message.hs15
1 files changed, 15 insertions, 0 deletions
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
+ }