mirror of https://gitlab.com/bashrc2/epicyon
Check if mention exists
parent
5b1692a3c7
commit
193ac8916c
9
inbox.py
9
inbox.py
|
@ -1311,6 +1311,15 @@ def sendToGroupMembers(session,baseDir: str,handle: str,port: int,postJsonObject
|
|||
# add mention to tag list
|
||||
if not postJsonObject['object']['tag']:
|
||||
postJsonObject['object']['tag']=[]
|
||||
# check if the mention already exists
|
||||
mentionExists=False
|
||||
for mention in postJsonObject['object']['tag']:
|
||||
if mention['type']=='Mention':
|
||||
if mention.get('href'):
|
||||
if mention['href']==sendingActor:
|
||||
mentionExists=True
|
||||
if not mentionExists:
|
||||
# add the mention of the original sender
|
||||
postJsonObject['object']['tag'].append({
|
||||
'href': sendingActor,
|
||||
'name': senderStr,
|
||||
|
|
Loading…
Reference in New Issue