mirror of https://gitlab.com/bashrc2/epicyon
Liking announces
parent
247c689c62
commit
00f8531c9c
|
@ -7378,10 +7378,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
|
|
||||||
print('Locating liked post ' + likeUrl)
|
print('Locating liked post ' + likeUrl)
|
||||||
# directly like the post file
|
# directly like the post file
|
||||||
likedPostFilename = locatePost(baseDir,
|
likedPostFilename = \
|
||||||
self.postToNickname,
|
locatePost(baseDir, self.postToNickname, domain, likeUrl)
|
||||||
domain,
|
|
||||||
likeUrl)
|
|
||||||
if likedPostFilename:
|
if likedPostFilename:
|
||||||
# if debug:
|
# if debug:
|
||||||
print('Updating likes for ' + likedPostFilename)
|
print('Updating likes for ' + likedPostFilename)
|
||||||
|
|
|
@ -545,7 +545,7 @@ def _getLikeIconHtml(nickname: str, domainFull: str,
|
||||||
likeStr += '<label class="likesCount">'
|
likeStr += '<label class="likesCount">'
|
||||||
likeStr += likeCountStr.replace('(', '').replace(')', '').strip()
|
likeStr += likeCountStr.replace('(', '').replace(')', '').strip()
|
||||||
likeStr += '</label>\n'
|
likeStr += '</label>\n'
|
||||||
likePostId = removeIdEnding(postJsonObject['object']['id'])
|
likePostId = removeIdEnding(postJsonObject['id'])
|
||||||
likeStr += \
|
likeStr += \
|
||||||
' <a class="imageAnchor" href="/users/' + nickname + '?' + \
|
' <a class="imageAnchor" href="/users/' + nickname + '?' + \
|
||||||
likeLink + '=' + likePostId + \
|
likeLink + '=' + likePostId + \
|
||||||
|
@ -1525,10 +1525,13 @@ def individualPostAsHtml(signingPrivateKeyPem: str,
|
||||||
if os.path.isfile(hideLikeButtonFile):
|
if os.path.isfile(hideLikeButtonFile):
|
||||||
showLikeButton = False
|
showLikeButton = False
|
||||||
|
|
||||||
|
likeJsonObject = postJsonObject
|
||||||
|
if announceJsonObject:
|
||||||
|
likeJsonObject = announceJsonObject
|
||||||
likeStr = _getLikeIconHtml(nickname, domainFull,
|
likeStr = _getLikeIconHtml(nickname, domainFull,
|
||||||
isModerationPost,
|
isModerationPost,
|
||||||
showLikeButton,
|
showLikeButton,
|
||||||
postJsonObject,
|
likeJsonObject,
|
||||||
enableTimingLog,
|
enableTimingLog,
|
||||||
postStartTime,
|
postStartTime,
|
||||||
translate, pageNumberParam,
|
translate, pageNumberParam,
|
||||||
|
|
Loading…
Reference in New Issue