aboutsummaryrefslogtreecommitdiffstats
path: root/src/Message.hs
AgeCommit message (Collapse)Author
2017-08-17Message: Add a function to get the `text` field as a stringTeddy Wing
Clean up some of the calls to get the `text` field by adding a function that abstracts the call to `Data.Text(unpack)`.
2017-08-17Change `Plugin` and `Message` from `String` to `Data.Text`Teddy Wing
Use the `Data.Text` type instead of `String` in most of the places we use it in `Plugin` and `Message`. This allows us to more easily pass data between the IRC package. No more kludgy `pack`s and `unpack`s in our IRC message handler. The one thing we couldn't convert was our regex. From what I understand (https://stackoverflow.com/questions/14922579/haskell-regular-expressions-and-data-text#14922626), the regex library I'm using doesn't support `Data.Text`, so use `String`s for that instead.
2017-08-01Add `Message` typesTeddy Wing
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.