No delete button for news posts

main
Bob Mottram 2020-10-08 10:14:21 +01:00
parent eca0cbe982
commit a7cd3d160e
1 changed files with 12 additions and 9 deletions

View File

@ -4686,13 +4686,16 @@ def individualPostAsHtml(allowDownloads: bool,
('/' + fullDomain + '/' in postActor and ('/' + fullDomain + '/' in postActor and
messageId.startswith(postActor))): messageId.startswith(postActor))):
if '/users/' + nickname + '/' in messageId: if '/users/' + nickname + '/' in messageId:
if not isNewsPost(postJsonObject):
deleteStr = \ deleteStr = \
' <a class="imageAnchor" href="/users/' + nickname + \ ' <a class="imageAnchor" href="/users/' + \
nickname + \
'?delete=' + messageId + pageNumberParam + \ '?delete=' + messageId + pageNumberParam + \
'" title="' + translate['Delete this post'] + '">\n' '" title="' + translate['Delete this post'] + '">\n'
deleteStr += \ deleteStr += \
' ' + \ ' ' + \
'<img loading="lazy" alt="' + translate['Delete this post'] + \ '<img loading="lazy" alt="' + \
translate['Delete this post'] + \
' |" title="' + translate['Delete this post'] + \ ' |" title="' + translate['Delete this post'] + \
'" src="/' + iconsDir + '/delete.png"/></a>\n' '" src="/' + iconsDir + '/delete.png"/></a>\n'
else: else: