Show Leave rather than Unfollow for groups

main
Bob Mottram 2021-09-22 10:29:48 +01:00
parent d02adbc8cd
commit bf1255647e
13 changed files with 226 additions and 238 deletions

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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:

32
like.py
View File

@ -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:

11
pgp.py
View File

@ -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:

168
posts.py
View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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,

View File

@ -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')

View File

@ -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 + '"><button class="buttonunfollow">' + \
translate['Block'] + '</button></a>\n'
elif b == 'unfollow':
unfollowStr = 'Unfollow'
if isGroup:
unfollowStr = 'Leave'
buttonsStr += \
'<a href="/users/' + actorNickname + \
'?options=' + followUrl + \
';1;' + avatarUrl + '"><button class="buttonunfollow">' + \
translate['Unfollow'] + '</button></a>\n'
translate[unfollowStr] + '</button></a>\n'
resultStr = '<div class="container">\n'
resultStr += \