mirror of https://gitlab.com/bashrc2/epicyon
Use full post id
parent
36077696a8
commit
e97dc8c8ce
19
daemon.py
19
daemon.py
|
@ -6740,13 +6740,14 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
# save the announce straight to the outbox
|
# save the announce straight to the outbox
|
||||||
# This is because the subsequent send is within a separate thread
|
# This is because the subsequent send is within a separate thread
|
||||||
# but the html still needs to be generated before this call ends
|
# but the html still needs to be generated before this call ends
|
||||||
announceId = removeIdEnding(announceJson['id'])
|
# announceId = removeIdEnding(announceJson['id'])
|
||||||
|
announceId = announceJson['id']
|
||||||
announceFilename = \
|
announceFilename = \
|
||||||
savePostToBox(baseDir, httpPrefix, announceId,
|
savePostToBox(baseDir, httpPrefix, announceId,
|
||||||
self.postToNickname, domainFull,
|
self.postToNickname, domainFull,
|
||||||
announceJson, 'outbox')
|
announceJson, 'outbox')
|
||||||
# also copy the post id to the inbox index
|
# also copy the post id to the inbox index
|
||||||
indexes = ['outbox', 'inbox']
|
indexes = ['inbox']
|
||||||
for boxNameIndex in indexes:
|
for boxNameIndex in indexes:
|
||||||
inboxUpdateIndex(boxNameIndex, baseDir,
|
inboxUpdateIndex(boxNameIndex, baseDir,
|
||||||
self.postToNickname + '@' + domain,
|
self.postToNickname + '@' + domain,
|
||||||
|
@ -6760,14 +6761,12 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self._postToOutboxThread(announceJson)
|
self._postToOutboxThread(announceJson)
|
||||||
|
|
||||||
# generate the html for the announce
|
# generate the html for the announce
|
||||||
if announceFilename:
|
if announceJson and announceFilename:
|
||||||
print('Generating html post for announce')
|
print('Generating html post for announce')
|
||||||
announcePostJson = loadJson(announceFilename, 0, 1)
|
|
||||||
if announcePostJson:
|
|
||||||
cachedPostFilename = \
|
cachedPostFilename = \
|
||||||
getCachedPostFilename(baseDir, self.postToNickname,
|
getCachedPostFilename(baseDir, self.postToNickname,
|
||||||
domain, announcePostJson)
|
domain, announceJson)
|
||||||
print('Announced post json: ' + str(announcePostJson))
|
print('Announced post json: ' + str(announceJson))
|
||||||
print('Announced post nickname: ' +
|
print('Announced post nickname: ' +
|
||||||
self.postToNickname + ' ' + domain)
|
self.postToNickname + ' ' + domain)
|
||||||
print('Announced post cache: ' + str(cachedPostFilename))
|
print('Announced post cache: ' + str(cachedPostFilename))
|
||||||
|
@ -6784,7 +6783,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.cachedWebfingers,
|
self.server.cachedWebfingers,
|
||||||
self.server.personCache,
|
self.server.personCache,
|
||||||
self.postToNickname, domain,
|
self.postToNickname, domain,
|
||||||
self.server.port, announcePostJson,
|
self.server.port, announceJson,
|
||||||
None, True,
|
None, True,
|
||||||
self.server.allowDeletion,
|
self.server.allowDeletion,
|
||||||
httpPrefix, self.server.projectVersion,
|
httpPrefix, self.server.projectVersion,
|
||||||
|
@ -6796,12 +6795,10 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.themeName,
|
self.server.themeName,
|
||||||
self.server.systemLanguage,
|
self.server.systemLanguage,
|
||||||
self.server.maxLikeCount,
|
self.server.maxLikeCount,
|
||||||
not isDM(announcePostJson),
|
not isDM(announceJson),
|
||||||
showIndividualPostIcons,
|
showIndividualPostIcons,
|
||||||
manuallyApproveFollowers,
|
manuallyApproveFollowers,
|
||||||
False, True, False)
|
False, True, False)
|
||||||
else:
|
|
||||||
print('WARN: Announced post not found: ' + announceFilename)
|
|
||||||
|
|
||||||
self.server.GETbusy = False
|
self.server.GETbusy = False
|
||||||
actorAbsolute = self._getInstalceUrl(callingDomain) + actor
|
actorAbsolute = self._getInstalceUrl(callingDomain) + actor
|
||||||
|
|
Loading…
Reference in New Issue