diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c91aaab..0704941 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,4 +28,4 @@ jobs: key: ${{ runner.os }}-v2-${{ matrix.ghc }}-${{ github.run_id }} restore-keys: ${{ runner.os }}-v2-${{ matrix.ghc }}- - run: | - cabal build all -fexamples + cabal build all -fexamples --ghc-options=-Werror diff --git a/telegram-bot-api/src/Telegram/Bot/API/Methods/SendDocument.hs b/telegram-bot-api/src/Telegram/Bot/API/Methods/SendDocument.hs index 68dfa21..1a7dae6 100644 --- a/telegram-bot-api/src/Telegram/Bot/API/Methods/SendDocument.hs +++ b/telegram-bot-api/src/Telegram/Bot/API/Methods/SendDocument.hs @@ -115,7 +115,9 @@ instance ToMultipart Tmp SendDocumentRequest where = (FileData "file" (T.pack $ takeFileName path) ct path) : maybe [] (\t -> [FileData "thumbnail" (T.pack $ takeFileName t) "image/jpeg" t]) sendDocumentThumbnail - DocumentFile path ct = sendDocumentDocument + (path, ct) = case sendDocumentDocument of + DocumentFile path' ct' -> (path', ct') + _ -> error "ToMultipart Tmp SendDocumentRequest: cannot use multipart for links or file ids" instance ToJSON SendDocumentRequest where toJSON = gtoJSON diff --git a/telegram-bot-api/src/Telegram/Bot/API/Methods/SendPhoto.hs b/telegram-bot-api/src/Telegram/Bot/API/Methods/SendPhoto.hs index 2b95bfc..2ee26e4 100644 --- a/telegram-bot-api/src/Telegram/Bot/API/Methods/SendPhoto.hs +++ b/telegram-bot-api/src/Telegram/Bot/API/Methods/SendPhoto.hs @@ -104,7 +104,9 @@ instance ToMultipart Tmp SendPhotoRequest where = (FileData "file" (T.pack $ takeFileName path) ct path) : maybe [] (\t -> [FileData "thumb" (T.pack $ takeFileName t) "image/jpeg" t]) sendPhotoThumb - PhotoFile path ct = sendPhotoPhoto + (path, ct) = case sendPhotoPhoto of + PhotoFile path' ct' -> (path', ct') + _ -> error "ToMultipart Tmp SendPhotoRequest: cannot use multipart for links or file ids" instance ToJSON SendPhotoRequest where toJSON = gtoJSON diff --git a/telegram-bot-simple/src/Telegram/Bot/Simple/Reply.hs b/telegram-bot-simple/src/Telegram/Bot/Simple/Reply.hs index 0e3587c..cdacea3 100644 --- a/telegram-bot-simple/src/Telegram/Bot/Simple/Reply.hs +++ b/telegram-bot-simple/src/Telegram/Bot/Simple/Reply.hs @@ -61,6 +61,7 @@ replyMessageToSendMessageRequest :: SomeChatId -> ReplyMessage -> SendMessageReq replyMessageToSendMessageRequest someChatId ReplyMessage{..} = SendMessageRequest { sendMessageChatId = someChatId , sendMessageBusinessConnectionId = Nothing + , sendMessageMessageEffectId = Nothing , sendMessageMessageThreadId = replyMessageMessageThreadId , sendMessageText = replyMessageText , sendMessageParseMode = replyMessageParseMode