Set subject for posts sent to group

main2
Bob Mottram 2019-10-04 15:08:57 +01:00
parent f8237edd26
commit 33b7393a77
1 changed files with 3 additions and 7 deletions

View File

@ -1307,13 +1307,9 @@ def sendToGroupMembers(session,baseDir: str,handle: str,port: int,postJsonObject
if memberHandle!=handle: if memberHandle!=handle:
memberNickname=memberHandle.split('@')[0] memberNickname=memberHandle.split('@')[0]
memberDomain=memberHandle.split('@')[1] memberDomain=memberHandle.split('@')[1]
# set subject including group name # set subject
postJsonObject['object']['sensitive']=True if not postJsonObject['object'].get('summary'):
if postJsonObject['object'].get('summary'): postJsonObject['object']['summary']='General Discussion'
if not postJsonObject['object']['summary'].startswith(groupname+': '):
postJsonObject['object']['summary']=groupname+': '+postJsonObject['object']['summary']
else:
postJsonObject['object']['summary']=groupname
memberPort=port memberPort=port
if ':' in memberDomain: if ':' in memberDomain:
memberPortStr=memberDomain.split(':')[1] memberPortStr=memberDomain.split(':')[1]