mirror of https://gitlab.com/bashrc2/epicyon
Instead of checkoing for dms check for public status
parent
55bec518c0
commit
6352a931ce
|
@ -65,7 +65,6 @@ from person import removeAccount
|
|||
from person import canRemovePost
|
||||
from person import personSnooze
|
||||
from person import personUnsnooze
|
||||
from posts import isDM
|
||||
from posts import isModerator
|
||||
from posts import mutePost
|
||||
from posts import unmutePost
|
||||
|
@ -178,6 +177,7 @@ from shares import addShare
|
|||
from shares import removeShare
|
||||
from shares import expireShares
|
||||
from categories import setHashtagCategory
|
||||
from utils import isPublicPost
|
||||
from utils import getLockedAccount
|
||||
from utils import hasUsersPath
|
||||
from utils import getFullDomain
|
||||
|
@ -6997,7 +6997,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
# more social graph info
|
||||
if not authorized:
|
||||
pjo = postJsonObject
|
||||
if isDM(pjo):
|
||||
if not isPublicPost(pjo):
|
||||
self._404()
|
||||
self.server.GETbusy = False
|
||||
return True
|
||||
|
@ -7119,7 +7119,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
if not authorized:
|
||||
pjo = postJsonObject
|
||||
self._removePostInteractions(pjo)
|
||||
if isDM(pjo):
|
||||
if not isPublicPost(pjo):
|
||||
self._404()
|
||||
self.server.GETbusy = False
|
||||
return True
|
||||
|
|
3
posts.py
3
posts.py
|
@ -30,6 +30,7 @@ from session import postJsonString
|
|||
from session import postImage
|
||||
from webfinger import webfingerHandle
|
||||
from httpsig import createSignedHeader
|
||||
from utils import isPublicPost
|
||||
from utils import hasUsersPath
|
||||
from utils import validPostDate
|
||||
from utils import getFullDomain
|
||||
|
@ -3091,7 +3092,7 @@ def _createBoxIndexed(recentPostsCache: {},
|
|||
if not authorized:
|
||||
if p.get('object'):
|
||||
if isinstance(p['object'], dict):
|
||||
if isDM(p):
|
||||
if not isPublicPost(p):
|
||||
continue
|
||||
if p['object'].get('likes'):
|
||||
p['likes'] = {'items': []}
|
||||
|
|
Loading…
Reference in New Issue