Honk style users path

merge-requests/30/head
Bob Mottram 2021-02-09 16:21:59 +00:00
parent 890c8856a8
commit 345ded45c7
2 changed files with 3 additions and 3 deletions

View File

@ -756,7 +756,7 @@ def _personReceiveUpdate(baseDir: str,
' ' + str(personJson))
domainFull = getFullDomain(domain, port)
updateDomainFull = getFullDomain(updateDomain, updatePort)
usersPaths = ('users', 'profile', 'channel', 'accounts')
usersPaths = ('users', 'profile', 'channel', 'accounts', 'u')
usersStrFound = False
for usersStr in usersPaths:
actor = updateDomainFull + '/' + usersStr + '/' + updateNickname

View File

@ -67,7 +67,7 @@ def getLockedAccount(actorJson: {}) -> bool:
def hasUsersPath(pathStr: str) -> bool:
"""Whether there is a /users/ path (or equivalent) in the given string
"""
usersList = ('users', 'accounts', 'channel', 'profile')
usersList = ('users', 'accounts', 'channel', 'profile', 'u')
for usersStr in usersList:
if '/' + usersStr + '/' in pathStr:
return True
@ -1224,7 +1224,7 @@ def _isReservedName(nickname: str) -> bool:
'activity', 'undo', 'pinned',
'reply', 'replies', 'question', 'like',
'likes', 'users', 'statuses', 'tags',
'accounts', 'channels', 'profile',
'accounts', 'channels', 'profile', 'u',
'updates', 'repeat', 'announce',
'shares', 'fonts', 'icons', 'avatars')
if nickname in reservedNames: