mirror of https://gitlab.com/bashrc2/epicyon
Show Leave rather than Unfollow for groups
parent
d02adbc8cd
commit
bf1255647e
28
announce.py
28
announce.py
|
@ -264,13 +264,13 @@ def sendAnnounceViaServer(baseDir: str, session,
|
||||||
originDomain = fromDomain
|
originDomain = fromDomain
|
||||||
(inboxUrl, pubKeyId, pubKey, fromPersonId,
|
(inboxUrl, pubKeyId, pubKey, fromPersonId,
|
||||||
sharedInbox, avatarUrl,
|
sharedInbox, avatarUrl,
|
||||||
displayName) = getPersonBox(signingPrivateKeyPem,
|
displayName, _) = getPersonBox(signingPrivateKeyPem,
|
||||||
originDomain,
|
originDomain,
|
||||||
baseDir, session, wfRequest,
|
baseDir, session, wfRequest,
|
||||||
personCache,
|
personCache,
|
||||||
projectVersion, httpPrefix,
|
projectVersion, httpPrefix,
|
||||||
fromNickname, fromDomain,
|
fromNickname, fromDomain,
|
||||||
postToBox, 73528)
|
postToBox, 73528)
|
||||||
|
|
||||||
if not inboxUrl:
|
if not inboxUrl:
|
||||||
if debug:
|
if debug:
|
||||||
|
@ -349,13 +349,13 @@ def sendUndoAnnounceViaServer(baseDir: str, session,
|
||||||
originDomain = domain
|
originDomain = domain
|
||||||
(inboxUrl, pubKeyId, pubKey, fromPersonId,
|
(inboxUrl, pubKeyId, pubKey, fromPersonId,
|
||||||
sharedInbox, avatarUrl,
|
sharedInbox, avatarUrl,
|
||||||
displayName) = getPersonBox(signingPrivateKeyPem,
|
displayName, _) = getPersonBox(signingPrivateKeyPem,
|
||||||
originDomain,
|
originDomain,
|
||||||
baseDir, session, wfRequest,
|
baseDir, session, wfRequest,
|
||||||
personCache,
|
personCache,
|
||||||
projectVersion, httpPrefix,
|
projectVersion, httpPrefix,
|
||||||
nickname, domain,
|
nickname, domain,
|
||||||
postToBox, 73528)
|
postToBox, 73528)
|
||||||
|
|
||||||
if not inboxUrl:
|
if not inboxUrl:
|
||||||
if debug:
|
if debug:
|
||||||
|
|
|
@ -123,14 +123,13 @@ def sendAvailabilityViaServer(baseDir: str, session,
|
||||||
|
|
||||||
# get the actor inbox for the To handle
|
# get the actor inbox for the To handle
|
||||||
originDomain = domain
|
originDomain = domain
|
||||||
(inboxUrl, pubKeyId, pubKey,
|
(inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl,
|
||||||
fromPersonId, sharedInbox,
|
displayName, _) = getPersonBox(signingPrivateKeyPem,
|
||||||
avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem,
|
originDomain,
|
||||||
originDomain,
|
baseDir, session, wfRequest,
|
||||||
baseDir, session, wfRequest,
|
personCache, projectVersion,
|
||||||
personCache, projectVersion,
|
httpPrefix, nickname,
|
||||||
httpPrefix, nickname,
|
domain, postToBox, 57262)
|
||||||
domain, postToBox, 57262)
|
|
||||||
|
|
||||||
if not inboxUrl:
|
if not inboxUrl:
|
||||||
if debug:
|
if debug:
|
||||||
|
|
32
bookmarks.py
32
bookmarks.py
|
@ -399,14 +399,14 @@ def sendBookmarkViaServer(baseDir: str, session,
|
||||||
|
|
||||||
# get the actor inbox for the To handle
|
# get the actor inbox for the To handle
|
||||||
originDomain = domain
|
originDomain = domain
|
||||||
(inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox,
|
(inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl,
|
||||||
avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem,
|
displayName, _) = getPersonBox(signingPrivateKeyPem,
|
||||||
originDomain,
|
originDomain,
|
||||||
baseDir, session, wfRequest,
|
baseDir, session, wfRequest,
|
||||||
personCache,
|
personCache,
|
||||||
projectVersion, httpPrefix,
|
projectVersion, httpPrefix,
|
||||||
nickname, domain,
|
nickname, domain,
|
||||||
postToBox, 58391)
|
postToBox, 58391)
|
||||||
|
|
||||||
if not inboxUrl:
|
if not inboxUrl:
|
||||||
if debug:
|
if debug:
|
||||||
|
@ -489,14 +489,14 @@ def sendUndoBookmarkViaServer(baseDir: str, session,
|
||||||
|
|
||||||
# get the actor inbox for the To handle
|
# get the actor inbox for the To handle
|
||||||
originDomain = domain
|
originDomain = domain
|
||||||
(inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox,
|
(inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl,
|
||||||
avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem,
|
displayName, _) = getPersonBox(signingPrivateKeyPem,
|
||||||
originDomain,
|
originDomain,
|
||||||
baseDir, session, wfRequest,
|
baseDir, session, wfRequest,
|
||||||
personCache,
|
personCache,
|
||||||
projectVersion, httpPrefix,
|
projectVersion, httpPrefix,
|
||||||
nickname, domain,
|
nickname, domain,
|
||||||
postToBox, 52594)
|
postToBox, 52594)
|
||||||
|
|
||||||
if not inboxUrl:
|
if not inboxUrl:
|
||||||
if debug:
|
if debug:
|
||||||
|
|
|
@ -75,10 +75,10 @@ def sendDeleteViaServer(baseDir: str, session,
|
||||||
originDomain = fromDomain
|
originDomain = fromDomain
|
||||||
(inboxUrl, pubKeyId, pubKey,
|
(inboxUrl, pubKeyId, pubKey,
|
||||||
fromPersonId, sharedInbox, avatarUrl,
|
fromPersonId, sharedInbox, avatarUrl,
|
||||||
displayName) = getPersonBox(signingPrivateKeyPem, originDomain,
|
displayName, _) = getPersonBox(signingPrivateKeyPem, originDomain,
|
||||||
baseDir, session, wfRequest, personCache,
|
baseDir, session, wfRequest, personCache,
|
||||||
projectVersion, httpPrefix, fromNickname,
|
projectVersion, httpPrefix, fromNickname,
|
||||||
fromDomain, postToBox, 53036)
|
fromDomain, postToBox, 53036)
|
||||||
|
|
||||||
if not inboxUrl:
|
if not inboxUrl:
|
||||||
if debug:
|
if debug:
|
||||||
|
|
27
follow.py
27
follow.py
|
@ -1096,10 +1096,10 @@ def sendFollowRequestViaServer(baseDir: str, session,
|
||||||
originDomain = fromDomain
|
originDomain = fromDomain
|
||||||
(inboxUrl, pubKeyId, pubKey,
|
(inboxUrl, pubKeyId, pubKey,
|
||||||
fromPersonId, sharedInbox, avatarUrl,
|
fromPersonId, sharedInbox, avatarUrl,
|
||||||
displayName) = getPersonBox(signingPrivateKeyPem, originDomain,
|
displayName, _) = getPersonBox(signingPrivateKeyPem, originDomain,
|
||||||
baseDir, session, wfRequest, personCache,
|
baseDir, session, wfRequest, personCache,
|
||||||
projectVersion, httpPrefix, fromNickname,
|
projectVersion, httpPrefix, fromNickname,
|
||||||
fromDomain, postToBox, 52025)
|
fromDomain, postToBox, 52025)
|
||||||
|
|
||||||
if not inboxUrl:
|
if not inboxUrl:
|
||||||
if debug:
|
if debug:
|
||||||
|
@ -1188,16 +1188,15 @@ def sendUnfollowRequestViaServer(baseDir: str, session,
|
||||||
|
|
||||||
# get the actor inbox for the To handle
|
# get the actor inbox for the To handle
|
||||||
originDomain = fromDomain
|
originDomain = fromDomain
|
||||||
(inboxUrl, pubKeyId, pubKey,
|
(inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl,
|
||||||
fromPersonId, sharedInbox,
|
displayName, _) = getPersonBox(signingPrivateKeyPem,
|
||||||
avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem,
|
originDomain,
|
||||||
originDomain,
|
baseDir, session,
|
||||||
baseDir, session,
|
wfRequest, personCache,
|
||||||
wfRequest, personCache,
|
projectVersion, httpPrefix,
|
||||||
projectVersion, httpPrefix,
|
fromNickname,
|
||||||
fromNickname,
|
fromDomain, postToBox,
|
||||||
fromDomain, postToBox,
|
76536)
|
||||||
76536)
|
|
||||||
|
|
||||||
if not inboxUrl:
|
if not inboxUrl:
|
||||||
if debug:
|
if debug:
|
||||||
|
|
32
like.py
32
like.py
|
@ -202,14 +202,14 @@ def sendLikeViaServer(baseDir: str, session,
|
||||||
|
|
||||||
# get the actor inbox for the To handle
|
# get the actor inbox for the To handle
|
||||||
originDomain = fromDomain
|
originDomain = fromDomain
|
||||||
(inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox,
|
(inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl,
|
||||||
avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem,
|
displayName, _) = getPersonBox(signingPrivateKeyPem,
|
||||||
originDomain,
|
originDomain,
|
||||||
baseDir, session, wfRequest,
|
baseDir, session, wfRequest,
|
||||||
personCache,
|
personCache,
|
||||||
projectVersion, httpPrefix,
|
projectVersion, httpPrefix,
|
||||||
fromNickname, fromDomain,
|
fromNickname, fromDomain,
|
||||||
postToBox, 72873)
|
postToBox, 72873)
|
||||||
|
|
||||||
if not inboxUrl:
|
if not inboxUrl:
|
||||||
if debug:
|
if debug:
|
||||||
|
@ -290,14 +290,14 @@ def sendUndoLikeViaServer(baseDir: str, session,
|
||||||
|
|
||||||
# get the actor inbox for the To handle
|
# get the actor inbox for the To handle
|
||||||
originDomain = fromDomain
|
originDomain = fromDomain
|
||||||
(inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox,
|
(inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl,
|
||||||
avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem,
|
displayName, _) = getPersonBox(signingPrivateKeyPem,
|
||||||
originDomain,
|
originDomain,
|
||||||
baseDir, session, wfRequest,
|
baseDir, session, wfRequest,
|
||||||
personCache, projectVersion,
|
personCache, projectVersion,
|
||||||
httpPrefix, fromNickname,
|
httpPrefix, fromNickname,
|
||||||
fromDomain, postToBox,
|
fromDomain, postToBox,
|
||||||
72625)
|
72625)
|
||||||
|
|
||||||
if not inboxUrl:
|
if not inboxUrl:
|
||||||
if debug:
|
if debug:
|
||||||
|
|
11
pgp.py
11
pgp.py
|
@ -575,12 +575,11 @@ def pgpPublicKeyUpload(baseDir: str, session,
|
||||||
|
|
||||||
# get the actor inbox for the To handle
|
# get the actor inbox for the To handle
|
||||||
originDomain = domain
|
originDomain = domain
|
||||||
(inboxUrl, pubKeyId, pubKey,
|
(inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl,
|
||||||
fromPersonId, sharedInbox, avatarUrl,
|
displayName, _) = getPersonBox(signingPrivateKeyPem, originDomain,
|
||||||
displayName) = getPersonBox(signingPrivateKeyPem, originDomain,
|
baseDir, session, wfRequest, personCache,
|
||||||
baseDir, session, wfRequest, personCache,
|
__version__, httpPrefix, nickname,
|
||||||
__version__, httpPrefix, nickname,
|
domain, postToBox, 35725)
|
||||||
domain, postToBox, 35725)
|
|
||||||
|
|
||||||
if not inboxUrl:
|
if not inboxUrl:
|
||||||
if debug:
|
if debug:
|
||||||
|
|
168
posts.py
168
posts.py
|
@ -329,7 +329,7 @@ def getPersonBox(signingPrivateKeyPem: str, originDomain: str,
|
||||||
projectVersion: str, httpPrefix: str,
|
projectVersion: str, httpPrefix: str,
|
||||||
nickname: str, domain: str,
|
nickname: str, domain: str,
|
||||||
boxName: str = 'inbox',
|
boxName: str = 'inbox',
|
||||||
sourceId=0) -> (str, str, str, str, str, str, str, str):
|
sourceId=0) -> (str, str, str, str, str, str, str, str, str):
|
||||||
debug = False
|
debug = False
|
||||||
profileStr = 'https://www.w3.org/ns/activitystreams'
|
profileStr = 'https://www.w3.org/ns/activitystreams'
|
||||||
asHeader = {
|
asHeader = {
|
||||||
|
@ -368,6 +368,11 @@ def getPersonBox(signingPrivateKeyPem: str, originDomain: str,
|
||||||
if not personJson:
|
if not personJson:
|
||||||
return None, None, None, None, None, None, None
|
return None, None, None, None, None, None, None
|
||||||
|
|
||||||
|
isGroup = False
|
||||||
|
if personJson.get('type'):
|
||||||
|
if personJson['type'] == 'Group':
|
||||||
|
isGroup = True
|
||||||
|
|
||||||
# get the url for the box/collection
|
# get the url for the box/collection
|
||||||
boxJson = None
|
boxJson = None
|
||||||
if not personJson.get(boxName):
|
if not personJson.get(boxName):
|
||||||
|
@ -416,7 +421,7 @@ def getPersonBox(signingPrivateKeyPem: str, originDomain: str,
|
||||||
storePersonInCache(baseDir, personUrl, personJson, personCache, True)
|
storePersonInCache(baseDir, personUrl, personJson, personCache, True)
|
||||||
|
|
||||||
return boxJson, pubKeyId, pubKey, personId, sharedInbox, \
|
return boxJson, pubKeyId, pubKey, personId, sharedInbox, \
|
||||||
avatarUrl, displayName
|
avatarUrl, displayName, isGroup
|
||||||
|
|
||||||
|
|
||||||
def _isPublicFeedPost(item: {}, personPosts: {}, debug: bool) -> bool:
|
def _isPublicFeedPost(item: {}, personPosts: {}, debug: bool) -> bool:
|
||||||
|
@ -2196,15 +2201,14 @@ def sendPost(signingPrivateKeyPem: str, projectVersion: str,
|
||||||
|
|
||||||
# get the actor inbox for the To handle
|
# get the actor inbox for the To handle
|
||||||
originDomain = domain
|
originDomain = domain
|
||||||
(inboxUrl, pubKeyId, pubKey,
|
(inboxUrl, pubKeyId, pubKey, toPersonId, sharedInbox, avatarUrl,
|
||||||
toPersonId, sharedInbox,
|
displayName, _) = getPersonBox(signingPrivateKeyPem,
|
||||||
avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem,
|
originDomain,
|
||||||
originDomain,
|
baseDir, session, wfRequest,
|
||||||
baseDir, session, wfRequest,
|
personCache,
|
||||||
personCache,
|
projectVersion, httpPrefix,
|
||||||
projectVersion, httpPrefix,
|
nickname, domain, postToBox,
|
||||||
nickname, domain, postToBox,
|
72533)
|
||||||
72533)
|
|
||||||
|
|
||||||
if not inboxUrl:
|
if not inboxUrl:
|
||||||
return 3
|
return 3
|
||||||
|
@ -2343,16 +2347,15 @@ def sendPostViaServer(signingPrivateKeyPem: str, projectVersion: str,
|
||||||
|
|
||||||
# get the actor inbox for the To handle
|
# get the actor inbox for the To handle
|
||||||
originDomain = fromDomain
|
originDomain = fromDomain
|
||||||
(inboxUrl, pubKeyId, pubKey,
|
(inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl,
|
||||||
fromPersonId, sharedInbox,
|
displayName, _) = getPersonBox(signingPrivateKeyPem,
|
||||||
avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem,
|
originDomain,
|
||||||
originDomain,
|
baseDir, session, wfRequest,
|
||||||
baseDir, session, wfRequest,
|
personCache,
|
||||||
personCache,
|
projectVersion, httpPrefix,
|
||||||
projectVersion, httpPrefix,
|
fromNickname,
|
||||||
fromNickname,
|
fromDomainFull, postToBox,
|
||||||
fromDomainFull, postToBox,
|
82796)
|
||||||
82796)
|
|
||||||
if not inboxUrl:
|
if not inboxUrl:
|
||||||
if debug:
|
if debug:
|
||||||
print('DEBUG: post no ' + postToBox +
|
print('DEBUG: post no ' + postToBox +
|
||||||
|
@ -2553,13 +2556,13 @@ def sendSignedJson(postJsonObject: {}, session, baseDir: str,
|
||||||
# get the actor inbox/outbox for the To handle
|
# get the actor inbox/outbox for the To handle
|
||||||
originDomain = domain
|
originDomain = domain
|
||||||
(inboxUrl, pubKeyId, pubKey, toPersonId, sharedInboxUrl, avatarUrl,
|
(inboxUrl, pubKeyId, pubKey, toPersonId, sharedInboxUrl, avatarUrl,
|
||||||
displayName) = getPersonBox(signingPrivateKeyPem,
|
displayName, _) = getPersonBox(signingPrivateKeyPem,
|
||||||
originDomain,
|
originDomain,
|
||||||
baseDir, session, wfRequest,
|
baseDir, session, wfRequest,
|
||||||
personCache,
|
personCache,
|
||||||
projectVersion, httpPrefix,
|
projectVersion, httpPrefix,
|
||||||
nickname, domain, postToBox,
|
nickname, domain, postToBox,
|
||||||
sourceId)
|
sourceId)
|
||||||
|
|
||||||
print("inboxUrl: " + str(inboxUrl))
|
print("inboxUrl: " + str(inboxUrl))
|
||||||
print("toPersonId: " + str(toPersonId))
|
print("toPersonId: " + str(toPersonId))
|
||||||
|
@ -3928,15 +3931,14 @@ def getPublicPostsOfPerson(baseDir: str, nickname: str, domain: str,
|
||||||
|
|
||||||
if debug:
|
if debug:
|
||||||
print('Getting the outbox for ' + handle)
|
print('Getting the outbox for ' + handle)
|
||||||
(personUrl, pubKeyId, pubKey,
|
(personUrl, pubKeyId, pubKey, personId, shaedInbox, avatarUrl,
|
||||||
personId, shaedInbox,
|
displayName, _) = getPersonBox(signingPrivateKeyPem,
|
||||||
avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem,
|
originDomain,
|
||||||
originDomain,
|
baseDir, session, wfRequest,
|
||||||
baseDir, session, wfRequest,
|
personCache,
|
||||||
personCache,
|
projectVersion, httpPrefix,
|
||||||
projectVersion, httpPrefix,
|
nickname, domain, 'outbox',
|
||||||
nickname, domain, 'outbox',
|
62524)
|
||||||
62524)
|
|
||||||
if debug:
|
if debug:
|
||||||
print('Actor url: ' + str(personId))
|
print('Actor url: ' + str(personId))
|
||||||
if not personId:
|
if not personId:
|
||||||
|
@ -3982,15 +3984,14 @@ def getPublicPostDomains(session, baseDir: str, nickname: str, domain: str,
|
||||||
str(wfRequest))
|
str(wfRequest))
|
||||||
return domainList
|
return domainList
|
||||||
|
|
||||||
(personUrl, pubKeyId, pubKey,
|
(personUrl, pubKeyId, pubKey, personId, sharedInbox, avatarUrl,
|
||||||
personId, sharedInbox,
|
displayName, _) = getPersonBox(signingPrivateKeyPem,
|
||||||
avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem,
|
originDomain,
|
||||||
originDomain,
|
baseDir, session, wfRequest,
|
||||||
baseDir, session, wfRequest,
|
personCache,
|
||||||
personCache,
|
projectVersion, httpPrefix,
|
||||||
projectVersion, httpPrefix,
|
nickname, domain, 'outbox',
|
||||||
nickname, domain, 'outbox',
|
92522)
|
||||||
92522)
|
|
||||||
maxMentions = 99
|
maxMentions = 99
|
||||||
maxEmoji = 99
|
maxEmoji = 99
|
||||||
maxAttachments = 5
|
maxAttachments = 5
|
||||||
|
@ -4079,15 +4080,14 @@ def getPublicPostInfo(session, baseDir: str, nickname: str, domain: str,
|
||||||
str(wfRequest))
|
str(wfRequest))
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
(personUrl, pubKeyId, pubKey,
|
(personUrl, pubKeyId, pubKey, personId, sharedInbox, avatarUrl,
|
||||||
personId, sharedInbox,
|
displayName, _) = getPersonBox(signingPrivateKeyPem,
|
||||||
avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem,
|
originDomain,
|
||||||
originDomain,
|
baseDir, session, wfRequest,
|
||||||
baseDir, session, wfRequest,
|
personCache,
|
||||||
personCache,
|
projectVersion, httpPrefix,
|
||||||
projectVersion, httpPrefix,
|
nickname, domain, 'outbox',
|
||||||
nickname, domain, 'outbox',
|
13863)
|
||||||
13863)
|
|
||||||
maxMentions = 99
|
maxMentions = 99
|
||||||
maxEmoji = 99
|
maxEmoji = 99
|
||||||
maxAttachments = 5
|
maxAttachments = 5
|
||||||
|
@ -4618,14 +4618,13 @@ def sendBlockViaServer(baseDir: str, session,
|
||||||
|
|
||||||
# get the actor inbox for the To handle
|
# get the actor inbox for the To handle
|
||||||
originDomain = fromDomain
|
originDomain = fromDomain
|
||||||
(inboxUrl, pubKeyId, pubKey,
|
(inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl,
|
||||||
fromPersonId, sharedInbox, avatarUrl,
|
displayName, _) = getPersonBox(signingPrivateKeyPem,
|
||||||
displayName) = getPersonBox(signingPrivateKeyPem,
|
originDomain,
|
||||||
originDomain,
|
baseDir, session, wfRequest,
|
||||||
baseDir, session, wfRequest,
|
personCache,
|
||||||
personCache,
|
projectVersion, httpPrefix, fromNickname,
|
||||||
projectVersion, httpPrefix, fromNickname,
|
fromDomain, postToBox, 72652)
|
||||||
fromDomain, postToBox, 72652)
|
|
||||||
|
|
||||||
if not inboxUrl:
|
if not inboxUrl:
|
||||||
if debug:
|
if debug:
|
||||||
|
@ -4699,14 +4698,13 @@ def sendMuteViaServer(baseDir: str, session,
|
||||||
|
|
||||||
# get the actor inbox for the To handle
|
# get the actor inbox for the To handle
|
||||||
originDomain = fromDomain
|
originDomain = fromDomain
|
||||||
(inboxUrl, pubKeyId, pubKey,
|
(inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl,
|
||||||
fromPersonId, sharedInbox, avatarUrl,
|
displayName, _) = getPersonBox(signingPrivateKeyPem,
|
||||||
displayName) = getPersonBox(signingPrivateKeyPem,
|
originDomain,
|
||||||
originDomain,
|
baseDir, session, wfRequest,
|
||||||
baseDir, session, wfRequest,
|
personCache,
|
||||||
personCache,
|
projectVersion, httpPrefix, fromNickname,
|
||||||
projectVersion, httpPrefix, fromNickname,
|
fromDomain, postToBox, 72652)
|
||||||
fromDomain, postToBox, 72652)
|
|
||||||
|
|
||||||
if not inboxUrl:
|
if not inboxUrl:
|
||||||
if debug:
|
if debug:
|
||||||
|
@ -4785,14 +4783,13 @@ def sendUndoMuteViaServer(baseDir: str, session,
|
||||||
|
|
||||||
# get the actor inbox for the To handle
|
# get the actor inbox for the To handle
|
||||||
originDomain = fromDomain
|
originDomain = fromDomain
|
||||||
(inboxUrl, pubKeyId, pubKey,
|
(inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl,
|
||||||
fromPersonId, sharedInbox, avatarUrl,
|
displayName, _) = getPersonBox(signingPrivateKeyPem,
|
||||||
displayName) = getPersonBox(signingPrivateKeyPem,
|
originDomain,
|
||||||
originDomain,
|
baseDir, session, wfRequest,
|
||||||
baseDir, session, wfRequest,
|
personCache,
|
||||||
personCache,
|
projectVersion, httpPrefix, fromNickname,
|
||||||
projectVersion, httpPrefix, fromNickname,
|
fromDomain, postToBox, 72652)
|
||||||
fromDomain, postToBox, 72652)
|
|
||||||
|
|
||||||
if not inboxUrl:
|
if not inboxUrl:
|
||||||
if debug:
|
if debug:
|
||||||
|
@ -4875,13 +4872,12 @@ def sendUndoBlockViaServer(baseDir: str, session,
|
||||||
|
|
||||||
# get the actor inbox for the To handle
|
# get the actor inbox for the To handle
|
||||||
originDomain = fromDomain
|
originDomain = fromDomain
|
||||||
(inboxUrl, pubKeyId, pubKey,
|
(inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl,
|
||||||
fromPersonId, sharedInbox, avatarUrl,
|
displayName, _) = getPersonBox(signingPrivateKeyPem,
|
||||||
displayName) = getPersonBox(signingPrivateKeyPem,
|
originDomain,
|
||||||
originDomain,
|
baseDir, session, wfRequest, personCache,
|
||||||
baseDir, session, wfRequest, personCache,
|
projectVersion, httpPrefix, fromNickname,
|
||||||
projectVersion, httpPrefix, fromNickname,
|
fromDomain, postToBox, 53892)
|
||||||
fromDomain, postToBox, 53892)
|
|
||||||
|
|
||||||
if not inboxUrl:
|
if not inboxUrl:
|
||||||
if debug:
|
if debug:
|
||||||
|
|
68
shares.py
68
shares.py
|
@ -618,15 +618,14 @@ def sendShareViaServer(baseDir, session,
|
||||||
|
|
||||||
# get the actor inbox for the To handle
|
# get the actor inbox for the To handle
|
||||||
originDomain = fromDomain
|
originDomain = fromDomain
|
||||||
(inboxUrl, pubKeyId, pubKey,
|
(inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl,
|
||||||
fromPersonId, sharedInbox,
|
displayName, _) = getPersonBox(signingPrivateKeyPem,
|
||||||
avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem,
|
originDomain,
|
||||||
originDomain,
|
baseDir, session, wfRequest,
|
||||||
baseDir, session, wfRequest,
|
personCache, projectVersion,
|
||||||
personCache, projectVersion,
|
httpPrefix, fromNickname,
|
||||||
httpPrefix, fromNickname,
|
fromDomain, postToBox,
|
||||||
fromDomain, postToBox,
|
83653)
|
||||||
83653)
|
|
||||||
|
|
||||||
if not inboxUrl:
|
if not inboxUrl:
|
||||||
if debug:
|
if debug:
|
||||||
|
@ -723,15 +722,14 @@ def sendUndoShareViaServer(baseDir: str, session,
|
||||||
|
|
||||||
# get the actor inbox for the To handle
|
# get the actor inbox for the To handle
|
||||||
originDomain = fromDomain
|
originDomain = fromDomain
|
||||||
(inboxUrl, pubKeyId, pubKey,
|
(inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl,
|
||||||
fromPersonId, sharedInbox,
|
displayName, _) = getPersonBox(signingPrivateKeyPem,
|
||||||
avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem,
|
originDomain,
|
||||||
originDomain,
|
baseDir, session, wfRequest,
|
||||||
baseDir, session, wfRequest,
|
personCache, projectVersion,
|
||||||
personCache, projectVersion,
|
httpPrefix, fromNickname,
|
||||||
httpPrefix, fromNickname,
|
fromDomain, postToBox,
|
||||||
fromDomain, postToBox,
|
12663)
|
||||||
12663)
|
|
||||||
|
|
||||||
if not inboxUrl:
|
if not inboxUrl:
|
||||||
if debug:
|
if debug:
|
||||||
|
@ -840,15 +838,14 @@ def sendWantedViaServer(baseDir, session,
|
||||||
|
|
||||||
# get the actor inbox for the To handle
|
# get the actor inbox for the To handle
|
||||||
originDomain = fromDomain
|
originDomain = fromDomain
|
||||||
(inboxUrl, pubKeyId, pubKey,
|
(inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl,
|
||||||
fromPersonId, sharedInbox,
|
displayName, _) = getPersonBox(signingPrivateKeyPem,
|
||||||
avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem,
|
originDomain,
|
||||||
originDomain,
|
baseDir, session, wfRequest,
|
||||||
baseDir, session, wfRequest,
|
personCache, projectVersion,
|
||||||
personCache, projectVersion,
|
httpPrefix, fromNickname,
|
||||||
httpPrefix, fromNickname,
|
fromDomain, postToBox,
|
||||||
fromDomain, postToBox,
|
23653)
|
||||||
23653)
|
|
||||||
|
|
||||||
if not inboxUrl:
|
if not inboxUrl:
|
||||||
if debug:
|
if debug:
|
||||||
|
@ -945,15 +942,14 @@ def sendUndoWantedViaServer(baseDir: str, session,
|
||||||
|
|
||||||
# get the actor inbox for the To handle
|
# get the actor inbox for the To handle
|
||||||
originDomain = fromDomain
|
originDomain = fromDomain
|
||||||
(inboxUrl, pubKeyId, pubKey,
|
(inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl,
|
||||||
fromPersonId, sharedInbox,
|
displayName, _) = getPersonBox(signingPrivateKeyPem,
|
||||||
avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem,
|
originDomain,
|
||||||
originDomain,
|
baseDir, session, wfRequest,
|
||||||
baseDir, session, wfRequest,
|
personCache, projectVersion,
|
||||||
personCache, projectVersion,
|
httpPrefix, fromNickname,
|
||||||
httpPrefix, fromNickname,
|
fromDomain, postToBox,
|
||||||
fromDomain, postToBox,
|
12693)
|
||||||
12693)
|
|
||||||
|
|
||||||
if not inboxUrl:
|
if not inboxUrl:
|
||||||
if debug:
|
if debug:
|
||||||
|
|
15
skills.py
15
skills.py
|
@ -225,14 +225,13 @@ def sendSkillViaServer(baseDir: str, session, nickname: str, password: str,
|
||||||
|
|
||||||
# get the actor inbox for the To handle
|
# get the actor inbox for the To handle
|
||||||
originDomain = domain
|
originDomain = domain
|
||||||
(inboxUrl, pubKeyId, pubKey,
|
(inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl,
|
||||||
fromPersonId, sharedInbox,
|
displayName, _) = getPersonBox(signingPrivateKeyPem,
|
||||||
avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem,
|
originDomain,
|
||||||
originDomain,
|
baseDir, session, wfRequest,
|
||||||
baseDir, session, wfRequest,
|
personCache, projectVersion,
|
||||||
personCache, projectVersion,
|
httpPrefix, nickname, domain,
|
||||||
httpPrefix, nickname, domain,
|
postToBox, 76121)
|
||||||
postToBox, 76121)
|
|
||||||
|
|
||||||
if not inboxUrl:
|
if not inboxUrl:
|
||||||
if debug:
|
if debug:
|
||||||
|
|
17
socnet.py
17
socnet.py
|
@ -64,15 +64,14 @@ def instancesGraph(baseDir: str, handles: str,
|
||||||
return dotGraphStr + '}\n'
|
return dotGraphStr + '}\n'
|
||||||
|
|
||||||
originDomain = None
|
originDomain = None
|
||||||
(personUrl, pubKeyId, pubKey,
|
(personUrl, pubKeyId, pubKey, personId, shaedInbox, avatarUrl,
|
||||||
personId, shaedInbox,
|
displayName, _) = getPersonBox(signingPrivateKeyPem,
|
||||||
avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem,
|
originDomain,
|
||||||
originDomain,
|
baseDir, session, wfRequest,
|
||||||
baseDir, session, wfRequest,
|
personCache,
|
||||||
personCache,
|
projectVersion, httpPrefix,
|
||||||
projectVersion, httpPrefix,
|
nickname, domain, 'outbox',
|
||||||
nickname, domain, 'outbox',
|
27261)
|
||||||
27261)
|
|
||||||
wordFrequency = {}
|
wordFrequency = {}
|
||||||
postDomains = \
|
postDomains = \
|
||||||
getPostDomains(session, personUrl, 64, maxMentions, maxEmoji,
|
getPostDomains(session, personUrl, 64, maxMentions, maxEmoji,
|
||||||
|
|
|
@ -1290,17 +1290,16 @@ def individualPostAsHtml(signingPrivateKeyPem: str,
|
||||||
displayName = None
|
displayName = None
|
||||||
if postActorWf:
|
if postActorWf:
|
||||||
originDomain = domain
|
originDomain = domain
|
||||||
(inboxUrl, pubKeyId, pubKey,
|
(inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl2,
|
||||||
fromPersonId, sharedInbox,
|
displayName, _) = getPersonBox(signingPrivateKeyPem,
|
||||||
avatarUrl2, displayName) = getPersonBox(signingPrivateKeyPem,
|
originDomain,
|
||||||
originDomain,
|
baseDir, session,
|
||||||
baseDir, session,
|
postActorWf,
|
||||||
postActorWf,
|
personCache,
|
||||||
personCache,
|
projectVersion,
|
||||||
projectVersion,
|
httpPrefix,
|
||||||
httpPrefix,
|
nickname, domain,
|
||||||
nickname, domain,
|
'outbox', 72367)
|
||||||
'outbox', 72367)
|
|
||||||
|
|
||||||
_logPostTiming(enableTimingLog, postStartTime, '6')
|
_logPostTiming(enableTimingLog, postStartTime, '6')
|
||||||
|
|
||||||
|
|
|
@ -2190,15 +2190,14 @@ def _individualFollowAsHtml(signingPrivateKeyPem: str,
|
||||||
signingPrivateKeyPem)
|
signingPrivateKeyPem)
|
||||||
|
|
||||||
originDomain = domain
|
originDomain = domain
|
||||||
(inboxUrl, pubKeyId, pubKey,
|
(inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl2,
|
||||||
fromPersonId, sharedInbox,
|
displayName, isGroup) = getPersonBox(signingPrivateKeyPem,
|
||||||
avatarUrl2, displayName) = getPersonBox(signingPrivateKeyPem,
|
originDomain,
|
||||||
originDomain,
|
baseDir, session,
|
||||||
baseDir, session,
|
followUrlWf,
|
||||||
followUrlWf,
|
personCache, projectVersion,
|
||||||
personCache, projectVersion,
|
httpPrefix, followUrlNickname,
|
||||||
httpPrefix, followUrlNickname,
|
domain, 'outbox', 43036)
|
||||||
domain, 'outbox', 43036)
|
|
||||||
if avatarUrl2:
|
if avatarUrl2:
|
||||||
avatarUrl = avatarUrl2
|
avatarUrl = avatarUrl2
|
||||||
if displayName:
|
if displayName:
|
||||||
|
@ -2221,11 +2220,14 @@ def _individualFollowAsHtml(signingPrivateKeyPem: str,
|
||||||
';1;' + avatarUrl + '"><button class="buttonunfollow">' + \
|
';1;' + avatarUrl + '"><button class="buttonunfollow">' + \
|
||||||
translate['Block'] + '</button></a>\n'
|
translate['Block'] + '</button></a>\n'
|
||||||
elif b == 'unfollow':
|
elif b == 'unfollow':
|
||||||
|
unfollowStr = 'Unfollow'
|
||||||
|
if isGroup:
|
||||||
|
unfollowStr = 'Leave'
|
||||||
buttonsStr += \
|
buttonsStr += \
|
||||||
'<a href="/users/' + actorNickname + \
|
'<a href="/users/' + actorNickname + \
|
||||||
'?options=' + followUrl + \
|
'?options=' + followUrl + \
|
||||||
';1;' + avatarUrl + '"><button class="buttonunfollow">' + \
|
';1;' + avatarUrl + '"><button class="buttonunfollow">' + \
|
||||||
translate['Unfollow'] + '</button></a>\n'
|
translate[unfollowStr] + '</button></a>\n'
|
||||||
|
|
||||||
resultStr = '<div class="container">\n'
|
resultStr = '<div class="container">\n'
|
||||||
resultStr += \
|
resultStr += \
|
||||||
|
|
Loading…
Reference in New Issue