mirror of
https://gitlab.com/bashrc2/epicyon
synced 2026-10-30 17:43:44 +00:00
Check that the post replies to is a status
This commit is contained in:
1 parent
68c93ce5e5
commit
67a2c2939f
2 files changed
+4
-1
No files matched your search
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user