Reminder post content includes handle

main
Bob Mottram 2020-06-24 13:33:06 +01:00
parent 6e7a25f62e
commit e1470a7d37
2 changed files with 13 additions and 3 deletions

View File

@ -5452,7 +5452,6 @@ class PubServer(BaseHTTPRequestHandler):
filename, attachmentMediaType, filename, attachmentMediaType,
fields['imageDescription'], fields['imageDescription'],
self.server.useBlurHash, self.server.useBlurHash,
None, None,
fields['subject'], fields['subject'],
True, fields['schedulePost'], True, fields['schedulePost'],
fields['eventDate'], fields['eventDate'],

View File

@ -1184,7 +1184,6 @@ def createReminderPost(baseDir: str,
saveToFile: bool, clientToServer: bool, saveToFile: bool, clientToServer: bool,
attachImageFilename: str, mediaType: str, attachImageFilename: str, mediaType: str,
imageDescription: str, useBlurhash: bool, imageDescription: str, useBlurhash: bool,
inReplyTo=None, inReplyToAtomUri=None,
subject=None, debug=False, subject=None, debug=False,
schedulePost=False, schedulePost=False,
eventDate=None, eventTime=None, eventDate=None, eventTime=None,
@ -1194,6 +1193,13 @@ def createReminderPost(baseDir: str,
""" """
postTo = None postTo = None
postCc = None postCc = None
domainFull = domain
if port:
if port != 80 and port != 443:
domainFull = domain + ':' + str(port)
handle = '@' + nickname + '@' + domainFull
if handle not in content:
content = handle + ' ' + content
messageJson = \ messageJson = \
createPostBase(baseDir, nickname, domain, port, createPostBase(baseDir, nickname, domain, port,
postTo, postCc, postTo, postCc,
@ -1201,8 +1207,13 @@ def createReminderPost(baseDir: str,
clientToServer, clientToServer,
attachImageFilename, mediaType, attachImageFilename, mediaType,
imageDescription, useBlurhash, imageDescription, useBlurhash,
False, False, inReplyTo, inReplyToAtomUri, subject, False, False, None, None, subject,
schedulePost, eventDate, eventTime, location) schedulePost, eventDate, eventTime, location)
# mentioned recipients go into To rather than Cc
messageJson['to'] = messageJson['object']['cc']
messageJson['object']['to'] = messageJson['to']
messageJson['cc'] = []
messageJson['object']['cc'] = []
if schedulePost: if schedulePost:
savePostToBox(baseDir, httpPrefix, messageJson['object']['id'], savePostToBox(baseDir, httpPrefix, messageJson['object']['id'],
nickname, domain, messageJson, 'scheduled') nickname, domain, messageJson, 'scheduled')