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
messageId.startswith(postActor))):
if '/users/' + nickname + '/' in messageId:
if not isNewsPost(postJsonObject):
deleteStr = \
' <a class="imageAnchor" href="/users/' + nickname + \
' <a class="imageAnchor" href="/users/' + \
nickname + \
'?delete=' + messageId + pageNumberParam + \
'" title="' + translate['Delete this post'] + '">\n'
deleteStr += \
' ' + \
'<img loading="lazy" alt="' + translate['Delete this post'] + \
'<img loading="lazy" alt="' + \
translate['Delete this post'] + \
' |" title="' + translate['Delete this post'] + \
'" src="/' + iconsDir + '/delete.png"/></a>\n'
else: