Extra options for reaction emoji links

main
Bob Mottram 2021-11-12 11:54:47 +00:00
parent 1281596208
commit 615212a54f
2 changed files with 7 additions and 3 deletions

View File

@ -8353,7 +8353,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.signingPrivateKeyPem, self.server.signingPrivateKeyPem,
self.server.CWlists, self.server.CWlists,
self.server.listsEnabled, self.server.listsEnabled,
self.server.defaultTimeline) timelineStr, pageNumber)
msg = msg.encode('utf-8') msg = msg.encode('utf-8')
msglen = len(msg) msglen = len(msg)
self._set_headers('text/html', msglen, self._set_headers('text/html', msglen,

View File

@ -2197,7 +2197,7 @@ def htmlEmojiReactionPicker(cssCache: {},
themeName: str, systemLanguage: str, themeName: str, systemLanguage: str,
maxLikeCount: int, signingPrivateKeyPem: str, maxLikeCount: int, signingPrivateKeyPem: str,
CWlists: {}, listsEnabled: str, CWlists: {}, listsEnabled: str,
defaultTimeline: str) -> str: boxName: str, pageNumber: int) -> str:
"""Returns the emoji picker screen """Returns the emoji picker screen
""" """
reactedToPostStr = \ reactedToPostStr = \
@ -2235,6 +2235,9 @@ def htmlEmojiReactionPicker(cssCache: {},
emojiContentEncoded = urllib.parse.quote_plus(emojiContent) emojiContentEncoded = urllib.parse.quote_plus(emojiContent)
emojiUrl = \ emojiUrl = \
baseUrl + '?react=' + postId + \ baseUrl + '?react=' + postId + \
'?actor=' + postJsonObject['actor'] + \
'?tl=' + boxName + \
'?page=' + str(pageNumber) + \
'?emojreact=' + emojiContentEncoded '?emojreact=' + emojiContentEncoded
emojiLabel = '<label class="rlab">' + emojiContent + '</label>' emojiLabel = '<label class="rlab">' + emojiContent + '</label>'
emojiPicksStr += \ emojiPicksStr += \
@ -2257,7 +2260,8 @@ def htmlEmojiReactionPicker(cssCache: {},
# banner # banner
headerStr += \ headerStr += \
'<header>\n' + \ '<header>\n' + \
'<a href="/users/' + nickname + '/' + defaultTimeline + '" title="' + \ '<a href="/users/' + nickname + '/' + boxName + \
'?page=' + str(pageNumber) + '" title="' + \
translate['Switch to timeline view'] + '" alt="' + \ translate['Switch to timeline view'] + '" alt="' + \
translate['Switch to timeline view'] + '">\n' translate['Switch to timeline view'] + '">\n'
headerStr += '<img loading="lazy" class="timeline-banner" ' + \ headerStr += '<img loading="lazy" class="timeline-banner" ' + \