mirror of https://gitlab.com/bashrc2/epicyon
Update actor context when saved
parent
ed24c2140a
commit
c682c759ba
|
@ -43,6 +43,7 @@ from matrix import getMatrixAddress
|
||||||
from matrix import setMatrixAddress
|
from matrix import setMatrixAddress
|
||||||
from donate import getDonationUrl
|
from donate import getDonationUrl
|
||||||
from donate import setDonationUrl
|
from donate import setDonationUrl
|
||||||
|
from person import getDefaultPersonContext
|
||||||
from person import savePersonQrcode
|
from person import savePersonQrcode
|
||||||
from person import randomizeActorImages
|
from person import randomizeActorImages
|
||||||
from person import personUpgradeActor
|
from person import personUpgradeActor
|
||||||
|
@ -6616,6 +6617,12 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
os.remove(gitProjectsFilename)
|
os.remove(gitProjectsFilename)
|
||||||
# save actor json file within accounts
|
# save actor json file within accounts
|
||||||
if actorChanged:
|
if actorChanged:
|
||||||
|
# update the context for the actor
|
||||||
|
actorJson['@context'] = [
|
||||||
|
'https://www.w3.org/ns/activitystreams',
|
||||||
|
'https://w3id.org/security/v1',
|
||||||
|
getDefaultPersonContext()
|
||||||
|
]
|
||||||
randomizeActorImages(actorJson)
|
randomizeActorImages(actorJson)
|
||||||
saveJson(actorJson, actorFilename)
|
saveJson(actorJson, actorFilename)
|
||||||
webfingerUpdate(self.server.baseDir,
|
webfingerUpdate(self.server.baseDir,
|
||||||
|
|
|
@ -164,6 +164,8 @@ def randomizeActorImages(personJson: {}) -> None:
|
||||||
|
|
||||||
|
|
||||||
def getDefaultPersonContext() -> str:
|
def getDefaultPersonContext() -> str:
|
||||||
|
"""Gets the default actor context
|
||||||
|
"""
|
||||||
return {
|
return {
|
||||||
'Emoji': 'toot:Emoji',
|
'Emoji': 'toot:Emoji',
|
||||||
'Hashtag': 'as:Hashtag',
|
'Hashtag': 'as:Hashtag',
|
||||||
|
|
Loading…
Reference in New Issue