mirror of https://gitlab.com/bashrc2/epicyon
Use function to generate actor url
parent
88c4b14ca3
commit
343c9771bb
|
@ -3497,7 +3497,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
shareActor = shareActor.split('&')[0]
|
||||
adminNickname = getConfigParam(baseDir, 'admin')
|
||||
adminActor = \
|
||||
httpPrefix + '://' + domainFull + '/users' + adminNickname
|
||||
localActorUrl(httpPrefix, domainFull, adminNickname)
|
||||
actor = originPathStr
|
||||
actorNickname = getNicknameFromActor(actor)
|
||||
if actor == shareActor or actor == adminActor or \
|
||||
|
@ -3564,7 +3564,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
shareActor = shareActor.split('&')[0]
|
||||
adminNickname = getConfigParam(baseDir, 'admin')
|
||||
adminActor = \
|
||||
httpPrefix + '://' + domainFull + '/users' + adminNickname
|
||||
localActorUrl(httpPrefix, domainFull, adminNickname)
|
||||
actor = originPathStr
|
||||
actorNickname = getNicknameFromActor(actor)
|
||||
if actor == shareActor or actor == adminActor or \
|
||||
|
|
2
inbox.py
2
inbox.py
|
@ -172,7 +172,7 @@ def _updateCachedHashtagSwarm(baseDir: str, nickname: str, domain: str,
|
|||
else:
|
||||
print('WARN: no modified date for ' + str(lastModified))
|
||||
if saveSwarm:
|
||||
actor = httpPrefix + '://' + domainFull + '/users/' + nickname
|
||||
actor = localActorUrl(httpPrefix, domainFull, nickname)
|
||||
newSwarmStr = htmlHashTagSwarm(baseDir, actor, translate)
|
||||
if newSwarmStr:
|
||||
try:
|
||||
|
|
3
theme.py
3
theme.py
|
@ -15,6 +15,7 @@ from utils import getImageExtensions
|
|||
from utils import copytree
|
||||
from utils import acctDir
|
||||
from utils import dangerousSVG
|
||||
from utils import localActorUrl
|
||||
from shutil import copyfile
|
||||
from shutil import make_archive
|
||||
from shutil import unpack_archive
|
||||
|
@ -736,7 +737,7 @@ def setNewsAvatar(baseDir: str, name: str,
|
|||
if not os.path.isfile(newFilename):
|
||||
return
|
||||
avatarFilename = \
|
||||
httpPrefix + '://' + domainFull + '/users/' + nickname + '.png'
|
||||
localActorUrl(httpPrefix, domainFull, nickname) + '.png'
|
||||
avatarFilename = avatarFilename.replace('/', '-')
|
||||
filename = baseDir + '/cache/avatars/' + avatarFilename
|
||||
|
||||
|
|
Loading…
Reference in New Issue