flake8 format

main
Bob Mottram 2020-04-03 16:36:21 +00:00
parent 6b092d63ec
commit 128e431e9f
1 changed files with 31 additions and 27 deletions

10
like.py
View File

@ -361,10 +361,12 @@ def sendLikeViaServer(baseDir: str, session,
if ':' not in fromDomain: if ':' not in fromDomain:
fromDomainFull = fromDomain + ':' + str(fromPort) fromDomainFull = fromDomain + ':' + str(fromPort)
actor = httpPrefix + '://' + fromDomainFull + '/users/' + fromNickname
newLikeJson = { newLikeJson = {
"@context": "https://www.w3.org/ns/activitystreams", "@context": "https://www.w3.org/ns/activitystreams",
'type': 'Like', 'type': 'Like',
'actor': httpPrefix+'://'+fromDomainFull+'/users/'+fromNickname, 'actor': actor,
'object': likeUrl 'object': likeUrl
} }
@ -436,13 +438,15 @@ def sendUndoLikeViaServer(baseDir: str, session,
if ':' not in fromDomain: if ':' not in fromDomain:
fromDomainFull = fromDomain + ':' + str(fromPort) fromDomainFull = fromDomain + ':' + str(fromPort)
actor = httpPrefix + '://' + fromDomainFull + '/users/' + fromNickname
newUndoLikeJson = { newUndoLikeJson = {
"@context": "https://www.w3.org/ns/activitystreams", "@context": "https://www.w3.org/ns/activitystreams",
'type': 'Undo', 'type': 'Undo',
'actor': httpPrefix+'://'+fromDomainFull+'/users/'+fromNickname, 'actor': actor,
'object': { 'object': {
'type': 'Like', 'type': 'Like',
'actor': httpPrefix+'://'+fromDomainFull+'/users/'+fromNickname, 'actor': actor,
'object': likeUrl 'object': likeUrl
} }
} }