Change link structure for edit button

main
Bob Mottram 2022-11-16 20:16:48 +00:00
parent 63b7d81c3d
commit b87650b3ed
2 changed files with 12 additions and 12 deletions

View File

@ -18239,14 +18239,14 @@ class PubServer(BaseHTTPRequestHandler):
edit_post_params = {}
if authorized and \
'/users/' in self.path and \
'/postedit?scope=' in self.path and \
';postid=' in self.path and \
'?postedit=' in self.path and \
';scope=' in self.path and \
';actor=' in self.path:
post_scope = self.path.split('?scope=')[1]
post_scope = self.path.split(';scope=')[1]
if ';' in post_scope:
post_scope = post_scope.split(';')[0]
edit_post_params['scope'] = post_scope
message_id = self.path.split(';postid=')[1]
message_id = self.path.split('?postedit=')[1]
if ';' in message_id:
message_id = message_id.split(';')[0]
if ';replyTo=' in self.path:

View File

@ -586,8 +586,8 @@ def _get_edit_icon_html(base_dir: str, nickname: str, domain_full: str,
edit_str += \
' ' + \
'<a class="imageAnchor" href="/users/' + \
nickname + '/postedit?scope=public;postid=' + \
post_id.split('/statuses/')[1] + \
nickname + '?postedit=' + \
post_id.split('/statuses/')[1] + ';scope=public' + \
';actor=' + actor_nickname + reply_to + \
'" title="' + edit_post_str + '" tabindex="10">' + \
'<img loading="lazy" decoding="async" title="' + \
@ -601,8 +601,8 @@ def _get_edit_icon_html(base_dir: str, nickname: str, domain_full: str,
edit_str += \
' ' + \
'<a class="imageAnchor" href="/users/' + \
nickname + '/postedit?scope=dm;postid=' + \
post_id.split('/statuses/')[1] + \
nickname + '?postedit=' + \
post_id.split('/statuses/')[1] + ';scope=dm' + \
';actor=' + actor_nickname + reply_to + \
'" title="' + edit_post_str + '" tabindex="10">' + \
'<img loading="lazy" decoding="async" title="' + \
@ -616,8 +616,8 @@ def _get_edit_icon_html(base_dir: str, nickname: str, domain_full: str,
edit_str += \
' ' + \
'<a class="imageAnchor" href="/users/' + \
nickname + '/postedit?scope=unlisted;postid=' + \
post_id.split('/statuses/')[1] + \
nickname + '?postedit=' + \
post_id.split('/statuses/')[1] + ';scope=unlisted' + \
';actor=' + actor_nickname + reply_to + \
'" title="' + edit_post_str + '" tabindex="10">' + \
'<img loading="lazy" decoding="async" title="' + \
@ -631,8 +631,8 @@ def _get_edit_icon_html(base_dir: str, nickname: str, domain_full: str,
edit_str += \
' ' + \
'<a class="imageAnchor" href="/users/' + \
nickname + '/postedit?scope=followers;postid=' + \
post_id.split('/statuses/')[1] + \
nickname + '?postedit=' + \
post_id.split('/statuses/')[1] + ';scope=followers' + \
';actor=' + actor_nickname + reply_to + \
'" title="' + edit_post_str + '" tabindex="10">' + \
'<img loading="lazy" decoding="async" title="' + \