By | Chris Done |
At | 2013-06-24 |
Title | Don't announce pastes with http:// in author |
Description |
Edit file src/Hpaste/Model/Paste.hs 33188 → 33188
164 164 -- | Announce the paste.
165 165 announcePaste :: PasteType -> Text -> PasteSubmit -> PasteId -> HPModel ()
166 166 announcePaste ptype channel PasteSubmit{..} pid = do
167 167 conf <- env modelStateConfig
168 168 verb <- getVerb
- 169 unless (seemsLikeSpam pasteSubmitTitle) $
+ 169 unless (seemsLikeSpam pasteSubmitTitle || seemsLikeSpam pasteSubmitAuthor) $
170 170 announce (fromStrict channel) $ fromStrict $ do
171 171 nick ++ " " ++ verb ++ " “" ++ pasteSubmitTitle ++ "” at " ++ link conf
172 172 where nick | validNick (unpack pasteSubmitAuthor) = pasteSubmitAuthor
173 173 | otherwise = "“" ++ pasteSubmitAuthor ++ "”"
174 174 link Config{..} = "http://" ++ pack configDomain ++ "/" ++ pid'
… … … …