diff options
author | lassulus <lassulus@lassul.us> | 2021-05-03 11:56:12 +0200 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2021-05-03 11:56:12 +0200 |
commit | 734863be5c2cd7f7bdf5e60d957fb104c525abe6 (patch) | |
tree | 307b38490b3a728263f4d9b00ad08aca5a7e6f40 | |
parent | a01ae1498f5c32fe06fef4327f23be4e5fbd73f3 (diff) |
Reaktor.API: allow NOTICE messages
-rw-r--r-- | src/Reaktor/API.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Reaktor/API.hs b/src/Reaktor/API.hs index 4cc4fe9..83fe27a 100644 --- a/src/Reaktor/API.hs +++ b/src/Reaktor/API.hs @@ -79,10 +79,14 @@ main Actions{..} = \case serveTest :: Message -> Handler NoContent serveTest = \case - -- Allowing just private messages to (registered) channels for now. + -- Allowing private messages to (registered) channels. msg@(Message Nothing PRIVMSG [msgtarget,_]) | isChannelName msgtarget -> do liftIO $ aSend msg return NoContent + -- Allowing notice messages to (registered) channels. + msg@(Message Nothing NOTICE [msgtarget,_]) | isChannelName msgtarget -> do + liftIO $ aSend msg + return NoContent _ -> throwError err403 where |