Multi-line

master
Bob Mottram 2019-08-08 09:38:40 +01:00
parent 33909e83bf
commit bc8f671eb1
2 changed files with 6 additions and 5 deletions

View File

@ -358,8 +358,8 @@ def savePostToBox(baseDir: str,httpPrefix: str,postId: str, \
if not postId: if not postId:
statusNumber,published = getStatusNumber() statusNumber,published = getStatusNumber()
postId=httpPrefix+'://'+originalDomain+'/users/'+nickname+ \ postId=httpPrefix+'://'+originalDomain+'/users/'+ \
'/statuses/'+statusNumber nickname+'/statuses/'+statusNumber
postJsonObject['id']=postId+'/activity' postJsonObject['id']=postId+'/activity'
if postJsonObject.get('object'): if postJsonObject.get('object'):
if isinstance(postJsonObject['object'], dict): if isinstance(postJsonObject['object'], dict):

View File

@ -349,7 +349,7 @@ def htmlProfileFollowing(baseDir: str,httpPrefix: str, \
for item in followingJson['orderedItems']: for item in followingJson['orderedItems']:
profileStr+= \ profileStr+= \
individualFollowAsHtml(session,wfRequest,personCache, \ individualFollowAsHtml(session,wfRequest,personCache, \
domain,item,authorized,buttons) domain,item,authorized,nickname,buttons)
return profileStr return profileStr
def htmlProfileRoles(nickname: str,domain: str,rolesJson: {}) -> str: def htmlProfileRoles(nickname: str,domain: str,rolesJson: {}) -> str:
@ -543,6 +543,7 @@ def individualFollowAsHtml(session,wfRequest: {}, \
personCache: {},domain: str, \ personCache: {},domain: str, \
followUrl: str, \ followUrl: str, \
authorized: bool, \ authorized: bool, \
actorNickname: str, \
buttons=[]) -> str: buttons=[]) -> str:
nickname=getNicknameFromActor(followUrl) nickname=getNicknameFromActor(followUrl)
domain,port=getDomainFromActor(followUrl) domain,port=getDomainFromActor(followUrl)
@ -560,9 +561,9 @@ def individualFollowAsHtml(session,wfRequest: {}, \
if authorized: if authorized:
for b in buttons: for b in buttons:
if b=='block': if b=='block':
buttonsStr+='<a href="/inbox"><button class="buttonunfollow">Block</button></a>' buttonsStr+='<a href="/users/'+actorNickname+'?block='+followUrl+';'+avatarUrl+'"><button class="buttonunfollow">Block</button></a>'
if b=='unfollow': if b=='unfollow':
buttonsStr+='<a href="/inbox"><button class="buttonunfollow">Unfollow</button></a>' buttonsStr+='<a href="/users/'+actorNickname+'?unfollow='+followUrl+';'+avatarUrl+'"><button class="buttonunfollow">Unfollow</button></a>'
return \ return \
'<div class="container">\n' \ '<div class="container">\n' \