mirror of https://gitlab.com/bashrc2/epicyon
Filename not json
parent
7ee48e6d20
commit
3edc55341b
12
daemon.py
12
daemon.py
|
@ -7372,11 +7372,11 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
getOriginalPostFromAnnounceUrl(likeUrl, baseDir,
|
getOriginalPostFromAnnounceUrl(likeUrl, baseDir,
|
||||||
self.postToNickname, domain)
|
self.postToNickname, domain)
|
||||||
likeUrl2 = likeUrl
|
likeUrl2 = likeUrl
|
||||||
likedPostJson = origFilename
|
likedPostFilename = origFilename
|
||||||
if origActor and origPostUrl:
|
if origActor and origPostUrl:
|
||||||
actorLiked = origActor
|
actorLiked = origActor
|
||||||
likeUrl2 = origPostUrl
|
likeUrl2 = origPostUrl
|
||||||
likedPostJson = None
|
likedPostFilename = None
|
||||||
|
|
||||||
likeJson = {
|
likeJson = {
|
||||||
"@context": "https://www.w3.org/ns/activitystreams",
|
"@context": "https://www.w3.org/ns/activitystreams",
|
||||||
|
@ -7391,7 +7391,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
|
|
||||||
print('Locating liked post ' + likeUrl)
|
print('Locating liked post ' + likeUrl)
|
||||||
# directly like the post file
|
# directly like the post file
|
||||||
if not likedPostJson:
|
if not likedPostFilename:
|
||||||
likedPostFilename = \
|
likedPostFilename = \
|
||||||
locatePost(baseDir, self.postToNickname, domain, likeUrl)
|
locatePost(baseDir, self.postToNickname, domain, likeUrl)
|
||||||
if likedPostFilename:
|
if likedPostFilename:
|
||||||
|
@ -7538,11 +7538,11 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
getOriginalPostFromAnnounceUrl(likeUrl, baseDir,
|
getOriginalPostFromAnnounceUrl(likeUrl, baseDir,
|
||||||
self.postToNickname, domain)
|
self.postToNickname, domain)
|
||||||
likeUrl2 = likeUrl
|
likeUrl2 = likeUrl
|
||||||
likedPostJson = origFilename
|
likedPostFilename = origFilename
|
||||||
if origActor and origPostUrl:
|
if origActor and origPostUrl:
|
||||||
actorLiked = origActor
|
actorLiked = origActor
|
||||||
likeUrl2 = origPostUrl
|
likeUrl2 = origPostUrl
|
||||||
likedPostJson = None
|
likedPostFilename = None
|
||||||
|
|
||||||
undoLikeJson = {
|
undoLikeJson = {
|
||||||
"@context": "https://www.w3.org/ns/activitystreams",
|
"@context": "https://www.w3.org/ns/activitystreams",
|
||||||
|
@ -7561,7 +7561,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self._postToOutbox(undoLikeJson, self.server.projectVersion, None)
|
self._postToOutbox(undoLikeJson, self.server.projectVersion, None)
|
||||||
|
|
||||||
# directly undo the like within the post file
|
# directly undo the like within the post file
|
||||||
if not likedPostJson:
|
if not likedPostFilename:
|
||||||
likedPostFilename = locatePost(baseDir, self.postToNickname,
|
likedPostFilename = locatePost(baseDir, self.postToNickname,
|
||||||
domain, likeUrl)
|
domain, likeUrl)
|
||||||
if likedPostFilename:
|
if likedPostFilename:
|
||||||
|
|
1
posts.py
1
posts.py
|
@ -5089,4 +5089,5 @@ def getOriginalPostFromAnnounceUrl(announceUrl: str, baseDir: str,
|
||||||
origPostId.split('/' + origNick + '/')[0] + \
|
origPostId.split('/' + origNick + '/')[0] + \
|
||||||
'/' + origNick
|
'/' + origNick
|
||||||
url = origPostId
|
url = origPostId
|
||||||
|
|
||||||
return actor, url, origFilename
|
return actor, url, origFilename
|
||||||
|
|
Loading…
Reference in New Issue