Skip to content

Commit

Permalink
Fixing replies.
Browse files Browse the repository at this point in the history
  • Loading branch information
rekcuFniarB committed Apr 14, 2024
1 parent 1481879 commit 5c8c411
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/messy_fediverse/fediverse.py
Original file line number Diff line number Diff line change
Expand Up @@ -693,8 +693,6 @@ async def new_status(self, replyToObj=None, activity_type='Create', on_federate_
'tag': [],
'attachment': []
}
if type(replyToObj) is dict:
data.update(replyToObj)

if activity_type == 'Create':
## Creating new
Expand All @@ -706,8 +704,6 @@ async def new_status(self, replyToObj=None, activity_type='Create', on_federate_
'source': kwargs.get('content'),
'sensitive': bool(kwargs.get('sensitive')),
'summary': kwargs.get('summary'),
'tag': [],
"attachment": []
})

uniqid = self.uniqid()
Expand All @@ -725,16 +721,15 @@ async def new_status(self, replyToObj=None, activity_type='Create', on_federate_
#"conversation": "tag:mastodon.ml,2022-05-21:objectId=9633346:objectType=Conversation",
data['context'] = data['conversation'] = data['id']
else:
if activity_type == 'Update' and type(replyToObj) is dict:
data.update(replyToObj or {})
if activity_type == 'Update':
data.update({
'url': kwargs.get('url') or data.get('url') or data.get('id'),
'content': kwargs.get('content'),
'source': kwargs.get('content'),
'sensitive': bool(kwargs.get('sensitive')),
'summary': kwargs.get('summary'),
'updated': now.isoformat() + 'Z',
'tag': [],
"attachment": []
})

## If content language defined
Expand Down

0 comments on commit 5c8c411

Please sign in to comment.