merge-requests/30/head
Bob Mottram 2021-12-06 16:02:47 +00:00
parent a20003360a
commit 0b26fe7c99
1 changed files with 13 additions and 18 deletions

View File

@ -1418,14 +1418,15 @@ def _createPostBase(baseDir: str,
if mention not in toCC: if mention not in toCC:
toCC.append(mention) toCC.append(mention)
# create a list of hashtags
# Only posts which are #Public are searchable by hashtag
if hashtagsDict:
isPublic = False isPublic = False
for recipient in toRecipients: for recipient in toRecipients:
if recipient.endswith('#Public'): if recipient.endswith('#Public'):
isPublic = True isPublic = True
break break
# create a list of hashtags
# Only posts which are #Public are searchable by hashtag
if hashtagsDict:
for tagName, tag in hashtagsDict.items(): for tagName, tag in hashtagsDict.items():
if not tagExists(tag['type'], tag['name'], tags): if not tagExists(tag['type'], tag['name'], tags):
tags.append(tag) tags.append(tag)
@ -1458,13 +1459,7 @@ def _createPostBase(baseDir: str,
for ccRemoval in removeFromCC: for ccRemoval in removeFromCC:
toCC.remove(ccRemoval) toCC.remove(ccRemoval)
if inReplyTo: if inReplyTo and isPublic:
isPublic = False
for recipient in toRecipients:
if recipient.endswith('#Public'):
isPublic = True
break
if isPublic:
# If this is a public post then get the actor being # If this is a public post then get the actor being
# replied to end ensure that it is within the CC list # replied to end ensure that it is within the CC list
replyActor = _getActorFromInReplyTo(inReplyTo) replyActor = _getActorFromInReplyTo(inReplyTo)