Check that the post replies to is a status

merge-requests/30/head
Bob Mottram 2021-09-10 12:12:52 +01:00
parent 68c93ce5e5
commit 67a2c2939f
2 changed files with 4 additions and 1 deletions

View File

@ -11307,7 +11307,8 @@ class PubServer(BaseHTTPRequestHandler):
replyIntervalHours = self.server.defaultReplyIntervalHours
if not canReplyTo(baseDir, nickname, domain,
inReplyToUrl, replyIntervalHours):
print('Reply outside of time window ' + inReplyToUrl)
print('Reply outside of time window ' + inReplyToUrl +
str(replyIntervalHours) + ' hours')
self._403()
self.server.GETbusy = False
return True

View File

@ -1375,6 +1375,8 @@ def canReplyTo(baseDir: str, nickname: str, domain: str,
This is a spam mitigation feature, so that spammers can't
add a lot of replies to old post which you don't notice.
"""
if '/statuses/' not in postUrl:
return True
if not postJsonObject:
postFilename = locatePost(baseDir, nickname, domain, postUrl)
if not postFilename: