mirror of https://gitlab.com/bashrc2/epicyon
Simplify
parent
a20003360a
commit
0b26fe7c99
15
posts.py
15
posts.py
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue