Mentioned recipients go into 'to' for dms

main
Bob Mottram 2019-11-10 12:28:12 +00:00
parent c417f18c65
commit 9e53f93997
2 changed files with 19 additions and 13 deletions

View File

@ -2801,6 +2801,7 @@ class PubServer(BaseHTTPRequestHandler):
if messageJson:
self.postToNickname=nickname
if self.server.debug:
pprint(messageJson)
print('DEBUG: new DM to '+str(messageJson['object']['to']))
if self._postToOutbox(messageJson,__version__):
populateReplies(self.server.baseDir, \

View File

@ -920,7 +920,8 @@ def createDirectMessagePost(baseDir: str,
return None
postTo=None
postCc=None
return createPostBase(baseDir,nickname,domain,port, \
messageJson= \
createPostBase(baseDir,nickname,domain,port, \
postTo,postCc, \
httpPrefix,content,followersOnly,saveToFile, \
clientToServer, \
@ -928,6 +929,10 @@ def createDirectMessagePost(baseDir: str,
imageDescription,useBlurhash, \
False,inReplyTo,inReplyToAtomUri,subject, \
eventDate,eventTime,location)
# mentioned recipients go into To rather than Cc
messageJson['object']['to']=messageJson['object']['cc']
messageJson['object']['cc']=[]
return messageJson
def createReportPost(baseDir: str,
nickname: str, domain: str, port: int,httpPrefix: str, \