Send message to one more person
This commit is contained in:
parent
996e325038
commit
cb8ad94ad0
|
@ -225,11 +225,19 @@ notify offer = do
|
|||
offerLink = "<a href=\"https://inberlinwohnen.de" <> offer.link <> "\" >Apply Here</a>"
|
||||
offerBody = offerAddress <> "\n" <> offerRooms <> "\n" <> offerArea <> "\n" <> offerLink
|
||||
offerText = offerTitle <> "\n\n" <> offerBody
|
||||
sendMsgReq = (defSendMessage (SomeChatId $ ChatId 952512153) offerText) {sendMessageParseMode = Just HTML}
|
||||
res <- runTG sendMsgReq
|
||||
sendMsgReq1 = (defSendMessage (SomeChatId $ ChatId 952512153) offerText) {sendMessageParseMode = Just HTML}
|
||||
sendMsgReq2 = (defSendMessage (SomeChatId $ ChatId 116981707) offerText) {sendMessageParseMode = Just HTML}
|
||||
res1 <- runTG sendMsgReq1
|
||||
liftIO $
|
||||
if res.responseOk
|
||||
if res1.responseOk
|
||||
then putStrLn "Notified successfully"
|
||||
else do
|
||||
putStrLn $ "Failed to notify the offer: " <> show offer
|
||||
Text.putStrLn $ "Response: " <> Text.decodeUtf8 (LBS.toStrict $ Aeson.encode res)
|
||||
Text.putStrLn $ "Response: " <> Text.decodeUtf8 (LBS.toStrict $ Aeson.encode res1)
|
||||
res2 <- runTG sendMsgReq2
|
||||
liftIO $
|
||||
if res2.responseOk
|
||||
then putStrLn "Notified successfully"
|
||||
else do
|
||||
putStrLn $ "Failed to notify the offer: " <> show offer
|
||||
Text.putStrLn $ "Response: " <> Text.decodeUtf8 (LBS.toStrict $ Aeson.encode res2)
|
||||
|
|
Loading…
Reference in a new issue