forked from indymedia/epicyon
Like activities without 'to' field
parent
115127c730
commit
8f582d6a72
12
daemon.py
12
daemon.py
|
@ -949,9 +949,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
"@context": "https://www.w3.org/ns/activitystreams",
|
"@context": "https://www.w3.org/ns/activitystreams",
|
||||||
'type': 'Like',
|
'type': 'Like',
|
||||||
'actor': likeActor,
|
'actor': likeActor,
|
||||||
'object': likeUrl,
|
'object': likeUrl
|
||||||
'to': [actorLiked],
|
|
||||||
'cc': [likeActor+'/followers']
|
|
||||||
}
|
}
|
||||||
self._postToOutbox(likeJson)
|
self._postToOutbox(likeJson)
|
||||||
self.server.GETbusy=False
|
self.server.GETbusy=False
|
||||||
|
@ -975,12 +973,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
'object': {
|
'object': {
|
||||||
'type': 'Like',
|
'type': 'Like',
|
||||||
'actor': undoActor,
|
'actor': undoActor,
|
||||||
'object': likeUrl,
|
'object': likeUrl
|
||||||
'cc': [undoActor+'/followers'],
|
}
|
||||||
'to': [actorLiked]
|
|
||||||
},
|
|
||||||
'cc': [undoActor+'/followers'],
|
|
||||||
'to': [actorLiked]
|
|
||||||
}
|
}
|
||||||
self._postToOutbox(undoLikeJson)
|
self._postToOutbox(undoLikeJson)
|
||||||
self.server.GETbusy=False
|
self.server.GETbusy=False
|
||||||
|
|
21
like.py
21
like.py
|
@ -99,7 +99,6 @@ def updateLikesCollection(postFilename: str,objectUrl: str, actor: str,debug: bo
|
||||||
'items': [{
|
'items': [{
|
||||||
'type': 'Like',
|
'type': 'Like',
|
||||||
'actor': actor
|
'actor': actor
|
||||||
|
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
postJsonObject['object']['likes']=likesJson
|
postJsonObject['object']['likes']=likesJson
|
||||||
|
@ -151,9 +150,7 @@ def like(session,baseDir: str,federationList: [],nickname: str,domain: str,port:
|
||||||
"@context": "https://www.w3.org/ns/activitystreams",
|
"@context": "https://www.w3.org/ns/activitystreams",
|
||||||
'type': 'Like',
|
'type': 'Like',
|
||||||
'actor': httpPrefix+'://'+fullDomain+'/users/'+nickname,
|
'actor': httpPrefix+'://'+fullDomain+'/users/'+nickname,
|
||||||
'object': objectUrl,
|
'object': objectUrl
|
||||||
'to': likeTo,
|
|
||||||
'cc': [httpPrefix+'://'+fullDomain+'/users/'+nickname+'/followers']
|
|
||||||
}
|
}
|
||||||
if ccList:
|
if ccList:
|
||||||
if len(ccList)>0:
|
if len(ccList)>0:
|
||||||
|
@ -248,12 +245,8 @@ def undolike(session,baseDir: str,federationList: [],nickname: str,domain: str,p
|
||||||
'object': {
|
'object': {
|
||||||
'type': 'Like',
|
'type': 'Like',
|
||||||
'actor': httpPrefix+'://'+fullDomain+'/users/'+nickname,
|
'actor': httpPrefix+'://'+fullDomain+'/users/'+nickname,
|
||||||
'object': objectUrl,
|
'object': objectUrl
|
||||||
'to': likeTo,
|
}
|
||||||
'cc': [httpPrefix+'://'+fullDomain+'/users/'+nickname+'/followers']
|
|
||||||
},
|
|
||||||
'cc': [httpPrefix+'://'+fullDomain+'/users/'+nickname+'/followers'],
|
|
||||||
'to': likeTo
|
|
||||||
}
|
}
|
||||||
if ccList:
|
if ccList:
|
||||||
if len(ccList)>0:
|
if len(ccList)>0:
|
||||||
|
@ -344,9 +337,7 @@ def sendLikeViaServer(session,fromNickname: str,password: str,
|
||||||
"@context": "https://www.w3.org/ns/activitystreams",
|
"@context": "https://www.w3.org/ns/activitystreams",
|
||||||
'type': 'Like',
|
'type': 'Like',
|
||||||
'actor': httpPrefix+'://'+fromDomainFull+'/users/'+fromNickname,
|
'actor': httpPrefix+'://'+fromDomainFull+'/users/'+fromNickname,
|
||||||
'object': likeUrl,
|
'object': likeUrl
|
||||||
'to': toUrl,
|
|
||||||
'cc': [ccUrl]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
handle=httpPrefix+'://'+fromDomainFull+'/@'+fromNickname
|
handle=httpPrefix+'://'+fromDomainFull+'/@'+fromNickname
|
||||||
|
@ -422,9 +413,7 @@ def sendUndoLikeViaServer(session,fromNickname: str,password: str,
|
||||||
'object': {
|
'object': {
|
||||||
'type': 'Like',
|
'type': 'Like',
|
||||||
'actor': httpPrefix+'://'+fromDomainFull+'/users/'+fromNickname,
|
'actor': httpPrefix+'://'+fromDomainFull+'/users/'+fromNickname,
|
||||||
'object': likeUrl,
|
'object': likeUrl
|
||||||
'to': toUrl,
|
|
||||||
'cc': [ccUrl]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue