diff --git a/announce.py b/announce.py index 58d90ec66..603fd8af1 100644 --- a/announce.py +++ b/announce.py @@ -264,13 +264,13 @@ def sendAnnounceViaServer(baseDir: str, session, originDomain = fromDomain (inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl, - displayName) = getPersonBox(signingPrivateKeyPem, - originDomain, - baseDir, session, wfRequest, - personCache, - projectVersion, httpPrefix, - fromNickname, fromDomain, - postToBox, 73528) + displayName, _) = getPersonBox(signingPrivateKeyPem, + originDomain, + baseDir, session, wfRequest, + personCache, + projectVersion, httpPrefix, + fromNickname, fromDomain, + postToBox, 73528) if not inboxUrl: if debug: @@ -349,13 +349,13 @@ def sendUndoAnnounceViaServer(baseDir: str, session, originDomain = domain (inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl, - displayName) = getPersonBox(signingPrivateKeyPem, - originDomain, - baseDir, session, wfRequest, - personCache, - projectVersion, httpPrefix, - nickname, domain, - postToBox, 73528) + displayName, _) = getPersonBox(signingPrivateKeyPem, + originDomain, + baseDir, session, wfRequest, + personCache, + projectVersion, httpPrefix, + nickname, domain, + postToBox, 73528) if not inboxUrl: if debug: diff --git a/availability.py b/availability.py index 25e338e16..ee6c2d5d6 100644 --- a/availability.py +++ b/availability.py @@ -123,14 +123,13 @@ def sendAvailabilityViaServer(baseDir: str, session, # get the actor inbox for the To handle originDomain = domain - (inboxUrl, pubKeyId, pubKey, - fromPersonId, sharedInbox, - avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem, - originDomain, - baseDir, session, wfRequest, - personCache, projectVersion, - httpPrefix, nickname, - domain, postToBox, 57262) + (inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl, + displayName, _) = getPersonBox(signingPrivateKeyPem, + originDomain, + baseDir, session, wfRequest, + personCache, projectVersion, + httpPrefix, nickname, + domain, postToBox, 57262) if not inboxUrl: if debug: diff --git a/bookmarks.py b/bookmarks.py index 245d98240..fb0c3f769 100644 --- a/bookmarks.py +++ b/bookmarks.py @@ -399,14 +399,14 @@ def sendBookmarkViaServer(baseDir: str, session, # get the actor inbox for the To handle originDomain = domain - (inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, - avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem, - originDomain, - baseDir, session, wfRequest, - personCache, - projectVersion, httpPrefix, - nickname, domain, - postToBox, 58391) + (inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl, + displayName, _) = getPersonBox(signingPrivateKeyPem, + originDomain, + baseDir, session, wfRequest, + personCache, + projectVersion, httpPrefix, + nickname, domain, + postToBox, 58391) if not inboxUrl: if debug: @@ -489,14 +489,14 @@ def sendUndoBookmarkViaServer(baseDir: str, session, # get the actor inbox for the To handle originDomain = domain - (inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, - avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem, - originDomain, - baseDir, session, wfRequest, - personCache, - projectVersion, httpPrefix, - nickname, domain, - postToBox, 52594) + (inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl, + displayName, _) = getPersonBox(signingPrivateKeyPem, + originDomain, + baseDir, session, wfRequest, + personCache, + projectVersion, httpPrefix, + nickname, domain, + postToBox, 52594) if not inboxUrl: if debug: diff --git a/delete.py b/delete.py index 93e1ffea1..df7ad694c 100644 --- a/delete.py +++ b/delete.py @@ -75,10 +75,10 @@ def sendDeleteViaServer(baseDir: str, session, originDomain = fromDomain (inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl, - displayName) = getPersonBox(signingPrivateKeyPem, originDomain, - baseDir, session, wfRequest, personCache, - projectVersion, httpPrefix, fromNickname, - fromDomain, postToBox, 53036) + displayName, _) = getPersonBox(signingPrivateKeyPem, originDomain, + baseDir, session, wfRequest, personCache, + projectVersion, httpPrefix, fromNickname, + fromDomain, postToBox, 53036) if not inboxUrl: if debug: diff --git a/follow.py b/follow.py index 778108c3d..b0aa8f3c5 100644 --- a/follow.py +++ b/follow.py @@ -1096,10 +1096,10 @@ def sendFollowRequestViaServer(baseDir: str, session, originDomain = fromDomain (inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl, - displayName) = getPersonBox(signingPrivateKeyPem, originDomain, - baseDir, session, wfRequest, personCache, - projectVersion, httpPrefix, fromNickname, - fromDomain, postToBox, 52025) + displayName, _) = getPersonBox(signingPrivateKeyPem, originDomain, + baseDir, session, wfRequest, personCache, + projectVersion, httpPrefix, fromNickname, + fromDomain, postToBox, 52025) if not inboxUrl: if debug: @@ -1188,16 +1188,15 @@ def sendUnfollowRequestViaServer(baseDir: str, session, # get the actor inbox for the To handle originDomain = fromDomain - (inboxUrl, pubKeyId, pubKey, - fromPersonId, sharedInbox, - avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem, - originDomain, - baseDir, session, - wfRequest, personCache, - projectVersion, httpPrefix, - fromNickname, - fromDomain, postToBox, - 76536) + (inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl, + displayName, _) = getPersonBox(signingPrivateKeyPem, + originDomain, + baseDir, session, + wfRequest, personCache, + projectVersion, httpPrefix, + fromNickname, + fromDomain, postToBox, + 76536) if not inboxUrl: if debug: diff --git a/like.py b/like.py index edc85be6a..466f1060c 100644 --- a/like.py +++ b/like.py @@ -202,14 +202,14 @@ def sendLikeViaServer(baseDir: str, session, # get the actor inbox for the To handle originDomain = fromDomain - (inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, - avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem, - originDomain, - baseDir, session, wfRequest, - personCache, - projectVersion, httpPrefix, - fromNickname, fromDomain, - postToBox, 72873) + (inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl, + displayName, _) = getPersonBox(signingPrivateKeyPem, + originDomain, + baseDir, session, wfRequest, + personCache, + projectVersion, httpPrefix, + fromNickname, fromDomain, + postToBox, 72873) if not inboxUrl: if debug: @@ -290,14 +290,14 @@ def sendUndoLikeViaServer(baseDir: str, session, # get the actor inbox for the To handle originDomain = fromDomain - (inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, - avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem, - originDomain, - baseDir, session, wfRequest, - personCache, projectVersion, - httpPrefix, fromNickname, - fromDomain, postToBox, - 72625) + (inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl, + displayName, _) = getPersonBox(signingPrivateKeyPem, + originDomain, + baseDir, session, wfRequest, + personCache, projectVersion, + httpPrefix, fromNickname, + fromDomain, postToBox, + 72625) if not inboxUrl: if debug: diff --git a/pgp.py b/pgp.py index b331692eb..193b50951 100644 --- a/pgp.py +++ b/pgp.py @@ -575,12 +575,11 @@ def pgpPublicKeyUpload(baseDir: str, session, # get the actor inbox for the To handle originDomain = domain - (inboxUrl, pubKeyId, pubKey, - fromPersonId, sharedInbox, avatarUrl, - displayName) = getPersonBox(signingPrivateKeyPem, originDomain, - baseDir, session, wfRequest, personCache, - __version__, httpPrefix, nickname, - domain, postToBox, 35725) + (inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl, + displayName, _) = getPersonBox(signingPrivateKeyPem, originDomain, + baseDir, session, wfRequest, personCache, + __version__, httpPrefix, nickname, + domain, postToBox, 35725) if not inboxUrl: if debug: diff --git a/posts.py b/posts.py index 3e4f49f44..5796f5ac8 100644 --- a/posts.py +++ b/posts.py @@ -329,7 +329,7 @@ def getPersonBox(signingPrivateKeyPem: str, originDomain: str, projectVersion: str, httpPrefix: str, nickname: str, domain: str, 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 profileStr = 'https://www.w3.org/ns/activitystreams' asHeader = { @@ -368,6 +368,11 @@ def getPersonBox(signingPrivateKeyPem: str, originDomain: str, if not personJson: 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 boxJson = None if not personJson.get(boxName): @@ -416,7 +421,7 @@ def getPersonBox(signingPrivateKeyPem: str, originDomain: str, storePersonInCache(baseDir, personUrl, personJson, personCache, True) return boxJson, pubKeyId, pubKey, personId, sharedInbox, \ - avatarUrl, displayName + avatarUrl, displayName, isGroup 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 originDomain = domain - (inboxUrl, pubKeyId, pubKey, - toPersonId, sharedInbox, - avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem, - originDomain, - baseDir, session, wfRequest, - personCache, - projectVersion, httpPrefix, - nickname, domain, postToBox, - 72533) + (inboxUrl, pubKeyId, pubKey, toPersonId, sharedInbox, avatarUrl, + displayName, _) = getPersonBox(signingPrivateKeyPem, + originDomain, + baseDir, session, wfRequest, + personCache, + projectVersion, httpPrefix, + nickname, domain, postToBox, + 72533) if not inboxUrl: return 3 @@ -2343,16 +2347,15 @@ def sendPostViaServer(signingPrivateKeyPem: str, projectVersion: str, # get the actor inbox for the To handle originDomain = fromDomain - (inboxUrl, pubKeyId, pubKey, - fromPersonId, sharedInbox, - avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem, - originDomain, - baseDir, session, wfRequest, - personCache, - projectVersion, httpPrefix, - fromNickname, - fromDomainFull, postToBox, - 82796) + (inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl, + displayName, _) = getPersonBox(signingPrivateKeyPem, + originDomain, + baseDir, session, wfRequest, + personCache, + projectVersion, httpPrefix, + fromNickname, + fromDomainFull, postToBox, + 82796) if not inboxUrl: if debug: print('DEBUG: post no ' + postToBox + @@ -2553,13 +2556,13 @@ def sendSignedJson(postJsonObject: {}, session, baseDir: str, # get the actor inbox/outbox for the To handle originDomain = domain (inboxUrl, pubKeyId, pubKey, toPersonId, sharedInboxUrl, avatarUrl, - displayName) = getPersonBox(signingPrivateKeyPem, - originDomain, - baseDir, session, wfRequest, - personCache, - projectVersion, httpPrefix, - nickname, domain, postToBox, - sourceId) + displayName, _) = getPersonBox(signingPrivateKeyPem, + originDomain, + baseDir, session, wfRequest, + personCache, + projectVersion, httpPrefix, + nickname, domain, postToBox, + sourceId) print("inboxUrl: " + str(inboxUrl)) print("toPersonId: " + str(toPersonId)) @@ -3928,15 +3931,14 @@ def getPublicPostsOfPerson(baseDir: str, nickname: str, domain: str, if debug: print('Getting the outbox for ' + handle) - (personUrl, pubKeyId, pubKey, - personId, shaedInbox, - avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem, - originDomain, - baseDir, session, wfRequest, - personCache, - projectVersion, httpPrefix, - nickname, domain, 'outbox', - 62524) + (personUrl, pubKeyId, pubKey, personId, shaedInbox, avatarUrl, + displayName, _) = getPersonBox(signingPrivateKeyPem, + originDomain, + baseDir, session, wfRequest, + personCache, + projectVersion, httpPrefix, + nickname, domain, 'outbox', + 62524) if debug: print('Actor url: ' + str(personId)) if not personId: @@ -3982,15 +3984,14 @@ def getPublicPostDomains(session, baseDir: str, nickname: str, domain: str, str(wfRequest)) return domainList - (personUrl, pubKeyId, pubKey, - personId, sharedInbox, - avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem, - originDomain, - baseDir, session, wfRequest, - personCache, - projectVersion, httpPrefix, - nickname, domain, 'outbox', - 92522) + (personUrl, pubKeyId, pubKey, personId, sharedInbox, avatarUrl, + displayName, _) = getPersonBox(signingPrivateKeyPem, + originDomain, + baseDir, session, wfRequest, + personCache, + projectVersion, httpPrefix, + nickname, domain, 'outbox', + 92522) maxMentions = 99 maxEmoji = 99 maxAttachments = 5 @@ -4079,15 +4080,14 @@ def getPublicPostInfo(session, baseDir: str, nickname: str, domain: str, str(wfRequest)) return {} - (personUrl, pubKeyId, pubKey, - personId, sharedInbox, - avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem, - originDomain, - baseDir, session, wfRequest, - personCache, - projectVersion, httpPrefix, - nickname, domain, 'outbox', - 13863) + (personUrl, pubKeyId, pubKey, personId, sharedInbox, avatarUrl, + displayName, _) = getPersonBox(signingPrivateKeyPem, + originDomain, + baseDir, session, wfRequest, + personCache, + projectVersion, httpPrefix, + nickname, domain, 'outbox', + 13863) maxMentions = 99 maxEmoji = 99 maxAttachments = 5 @@ -4618,14 +4618,13 @@ def sendBlockViaServer(baseDir: str, session, # get the actor inbox for the To handle originDomain = fromDomain - (inboxUrl, pubKeyId, pubKey, - fromPersonId, sharedInbox, avatarUrl, - displayName) = getPersonBox(signingPrivateKeyPem, - originDomain, - baseDir, session, wfRequest, - personCache, - projectVersion, httpPrefix, fromNickname, - fromDomain, postToBox, 72652) + (inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl, + displayName, _) = getPersonBox(signingPrivateKeyPem, + originDomain, + baseDir, session, wfRequest, + personCache, + projectVersion, httpPrefix, fromNickname, + fromDomain, postToBox, 72652) if not inboxUrl: if debug: @@ -4699,14 +4698,13 @@ def sendMuteViaServer(baseDir: str, session, # get the actor inbox for the To handle originDomain = fromDomain - (inboxUrl, pubKeyId, pubKey, - fromPersonId, sharedInbox, avatarUrl, - displayName) = getPersonBox(signingPrivateKeyPem, - originDomain, - baseDir, session, wfRequest, - personCache, - projectVersion, httpPrefix, fromNickname, - fromDomain, postToBox, 72652) + (inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl, + displayName, _) = getPersonBox(signingPrivateKeyPem, + originDomain, + baseDir, session, wfRequest, + personCache, + projectVersion, httpPrefix, fromNickname, + fromDomain, postToBox, 72652) if not inboxUrl: if debug: @@ -4785,14 +4783,13 @@ def sendUndoMuteViaServer(baseDir: str, session, # get the actor inbox for the To handle originDomain = fromDomain - (inboxUrl, pubKeyId, pubKey, - fromPersonId, sharedInbox, avatarUrl, - displayName) = getPersonBox(signingPrivateKeyPem, - originDomain, - baseDir, session, wfRequest, - personCache, - projectVersion, httpPrefix, fromNickname, - fromDomain, postToBox, 72652) + (inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl, + displayName, _) = getPersonBox(signingPrivateKeyPem, + originDomain, + baseDir, session, wfRequest, + personCache, + projectVersion, httpPrefix, fromNickname, + fromDomain, postToBox, 72652) if not inboxUrl: if debug: @@ -4875,13 +4872,12 @@ def sendUndoBlockViaServer(baseDir: str, session, # get the actor inbox for the To handle originDomain = fromDomain - (inboxUrl, pubKeyId, pubKey, - fromPersonId, sharedInbox, avatarUrl, - displayName) = getPersonBox(signingPrivateKeyPem, - originDomain, - baseDir, session, wfRequest, personCache, - projectVersion, httpPrefix, fromNickname, - fromDomain, postToBox, 53892) + (inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl, + displayName, _) = getPersonBox(signingPrivateKeyPem, + originDomain, + baseDir, session, wfRequest, personCache, + projectVersion, httpPrefix, fromNickname, + fromDomain, postToBox, 53892) if not inboxUrl: if debug: diff --git a/shares.py b/shares.py index 3f74074c4..9865472b9 100644 --- a/shares.py +++ b/shares.py @@ -618,15 +618,14 @@ def sendShareViaServer(baseDir, session, # get the actor inbox for the To handle originDomain = fromDomain - (inboxUrl, pubKeyId, pubKey, - fromPersonId, sharedInbox, - avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem, - originDomain, - baseDir, session, wfRequest, - personCache, projectVersion, - httpPrefix, fromNickname, - fromDomain, postToBox, - 83653) + (inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl, + displayName, _) = getPersonBox(signingPrivateKeyPem, + originDomain, + baseDir, session, wfRequest, + personCache, projectVersion, + httpPrefix, fromNickname, + fromDomain, postToBox, + 83653) if not inboxUrl: if debug: @@ -723,15 +722,14 @@ def sendUndoShareViaServer(baseDir: str, session, # get the actor inbox for the To handle originDomain = fromDomain - (inboxUrl, pubKeyId, pubKey, - fromPersonId, sharedInbox, - avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem, - originDomain, - baseDir, session, wfRequest, - personCache, projectVersion, - httpPrefix, fromNickname, - fromDomain, postToBox, - 12663) + (inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl, + displayName, _) = getPersonBox(signingPrivateKeyPem, + originDomain, + baseDir, session, wfRequest, + personCache, projectVersion, + httpPrefix, fromNickname, + fromDomain, postToBox, + 12663) if not inboxUrl: if debug: @@ -840,15 +838,14 @@ def sendWantedViaServer(baseDir, session, # get the actor inbox for the To handle originDomain = fromDomain - (inboxUrl, pubKeyId, pubKey, - fromPersonId, sharedInbox, - avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem, - originDomain, - baseDir, session, wfRequest, - personCache, projectVersion, - httpPrefix, fromNickname, - fromDomain, postToBox, - 23653) + (inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl, + displayName, _) = getPersonBox(signingPrivateKeyPem, + originDomain, + baseDir, session, wfRequest, + personCache, projectVersion, + httpPrefix, fromNickname, + fromDomain, postToBox, + 23653) if not inboxUrl: if debug: @@ -945,15 +942,14 @@ def sendUndoWantedViaServer(baseDir: str, session, # get the actor inbox for the To handle originDomain = fromDomain - (inboxUrl, pubKeyId, pubKey, - fromPersonId, sharedInbox, - avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem, - originDomain, - baseDir, session, wfRequest, - personCache, projectVersion, - httpPrefix, fromNickname, - fromDomain, postToBox, - 12693) + (inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl, + displayName, _) = getPersonBox(signingPrivateKeyPem, + originDomain, + baseDir, session, wfRequest, + personCache, projectVersion, + httpPrefix, fromNickname, + fromDomain, postToBox, + 12693) if not inboxUrl: if debug: diff --git a/skills.py b/skills.py index f59d97458..fd2061807 100644 --- a/skills.py +++ b/skills.py @@ -225,14 +225,13 @@ def sendSkillViaServer(baseDir: str, session, nickname: str, password: str, # get the actor inbox for the To handle originDomain = domain - (inboxUrl, pubKeyId, pubKey, - fromPersonId, sharedInbox, - avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem, - originDomain, - baseDir, session, wfRequest, - personCache, projectVersion, - httpPrefix, nickname, domain, - postToBox, 76121) + (inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl, + displayName, _) = getPersonBox(signingPrivateKeyPem, + originDomain, + baseDir, session, wfRequest, + personCache, projectVersion, + httpPrefix, nickname, domain, + postToBox, 76121) if not inboxUrl: if debug: diff --git a/socnet.py b/socnet.py index d8559ea64..fb3a5143e 100644 --- a/socnet.py +++ b/socnet.py @@ -64,15 +64,14 @@ def instancesGraph(baseDir: str, handles: str, return dotGraphStr + '}\n' originDomain = None - (personUrl, pubKeyId, pubKey, - personId, shaedInbox, - avatarUrl, displayName) = getPersonBox(signingPrivateKeyPem, - originDomain, - baseDir, session, wfRequest, - personCache, - projectVersion, httpPrefix, - nickname, domain, 'outbox', - 27261) + (personUrl, pubKeyId, pubKey, personId, shaedInbox, avatarUrl, + displayName, _) = getPersonBox(signingPrivateKeyPem, + originDomain, + baseDir, session, wfRequest, + personCache, + projectVersion, httpPrefix, + nickname, domain, 'outbox', + 27261) wordFrequency = {} postDomains = \ getPostDomains(session, personUrl, 64, maxMentions, maxEmoji, diff --git a/webapp_post.py b/webapp_post.py index 99f592f5f..398af22eb 100644 --- a/webapp_post.py +++ b/webapp_post.py @@ -1290,17 +1290,16 @@ def individualPostAsHtml(signingPrivateKeyPem: str, displayName = None if postActorWf: originDomain = domain - (inboxUrl, pubKeyId, pubKey, - fromPersonId, sharedInbox, - avatarUrl2, displayName) = getPersonBox(signingPrivateKeyPem, - originDomain, - baseDir, session, - postActorWf, - personCache, - projectVersion, - httpPrefix, - nickname, domain, - 'outbox', 72367) + (inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl2, + displayName, _) = getPersonBox(signingPrivateKeyPem, + originDomain, + baseDir, session, + postActorWf, + personCache, + projectVersion, + httpPrefix, + nickname, domain, + 'outbox', 72367) _logPostTiming(enableTimingLog, postStartTime, '6') diff --git a/webapp_profile.py b/webapp_profile.py index a22bcf6f9..394f278f0 100644 --- a/webapp_profile.py +++ b/webapp_profile.py @@ -2190,15 +2190,14 @@ def _individualFollowAsHtml(signingPrivateKeyPem: str, signingPrivateKeyPem) originDomain = domain - (inboxUrl, pubKeyId, pubKey, - fromPersonId, sharedInbox, - avatarUrl2, displayName) = getPersonBox(signingPrivateKeyPem, - originDomain, - baseDir, session, - followUrlWf, - personCache, projectVersion, - httpPrefix, followUrlNickname, - domain, 'outbox', 43036) + (inboxUrl, pubKeyId, pubKey, fromPersonId, sharedInbox, avatarUrl2, + displayName, isGroup) = getPersonBox(signingPrivateKeyPem, + originDomain, + baseDir, session, + followUrlWf, + personCache, projectVersion, + httpPrefix, followUrlNickname, + domain, 'outbox', 43036) if avatarUrl2: avatarUrl = avatarUrl2 if displayName: @@ -2221,11 +2220,14 @@ def _individualFollowAsHtml(signingPrivateKeyPem: str, ';1;' + avatarUrl + '">\n' elif b == 'unfollow': + unfollowStr = 'Unfollow' + if isGroup: + unfollowStr = 'Leave' buttonsStr += \ '\n' + translate[unfollowStr] + '\n' resultStr = '