Check that notes belong to the viewer

merge-requests/30/head
Bob Mottram 2021-02-23 17:35:26 +00:00
parent 0dbd048a15
commit 8124a7cdc6
1 changed files with 7 additions and 6 deletions

View File

@ -351,12 +351,13 @@ def htmlPersonOptions(defaultTimeline: str,
translate['Info'] + '</button>\n'
personNotes = ''
personNotesFilename = \
baseDir + '/accounts/' + nickname + '@' + domain + \
'/notes/' + handle + '.txt'
if os.path.isfile(personNotesFilename):
with open(personNotesFilename, 'r') as fp:
personNotes = fp.read()
if originPathStr.startswith('/' + nickname + '/'):
personNotesFilename = \
baseDir + '/accounts/' + nickname + '@' + domain + \
'/notes/' + handle + '.txt'
if os.path.isfile(personNotesFilename):
with open(personNotesFilename, 'r') as fp:
personNotes = fp.read()
optionsStr += \
' <br><br>' + translate['Notes'] + ': \n'