mirror of https://gitlab.com/bashrc2/epicyon
Check that the post replies to is a status
parent
68c93ce5e5
commit
67a2c2939f
|
@ -11307,7 +11307,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
replyIntervalHours = self.server.defaultReplyIntervalHours
|
replyIntervalHours = self.server.defaultReplyIntervalHours
|
||||||
if not canReplyTo(baseDir, nickname, domain,
|
if not canReplyTo(baseDir, nickname, domain,
|
||||||
inReplyToUrl, replyIntervalHours):
|
inReplyToUrl, replyIntervalHours):
|
||||||
print('Reply outside of time window ' + inReplyToUrl)
|
print('Reply outside of time window ' + inReplyToUrl +
|
||||||
|
str(replyIntervalHours) + ' hours')
|
||||||
self._403()
|
self._403()
|
||||||
self.server.GETbusy = False
|
self.server.GETbusy = False
|
||||||
return True
|
return True
|
||||||
|
|
2
utils.py
2
utils.py
|
@ -1375,6 +1375,8 @@ def canReplyTo(baseDir: str, nickname: str, domain: str,
|
||||||
This is a spam mitigation feature, so that spammers can't
|
This is a spam mitigation feature, so that spammers can't
|
||||||
add a lot of replies to old post which you don't notice.
|
add a lot of replies to old post which you don't notice.
|
||||||
"""
|
"""
|
||||||
|
if '/statuses/' not in postUrl:
|
||||||
|
return True
|
||||||
if not postJsonObject:
|
if not postJsonObject:
|
||||||
postFilename = locatePost(baseDir, nickname, domain, postUrl)
|
postFilename = locatePost(baseDir, nickname, domain, postUrl)
|
||||||
if not postFilename:
|
if not postFilename:
|
||||||
|
|
Loading…
Reference in New Issue