mirror of https://gitlab.com/bashrc2/epicyon
Getting petname
parent
7bff40eb52
commit
4f575e8316
|
@ -75,6 +75,12 @@ def getPetName(baseDir: str, nickname: str, domain: str,
|
||||||
for pet in petnamesList:
|
for pet in petnamesList:
|
||||||
if pet.endswith(' ' + handle):
|
if pet.endswith(' ' + handle):
|
||||||
return pet.replace(' ' + handle, '').strip()
|
return pet.replace(' ' + handle, '').strip()
|
||||||
|
elif ' ' + handle.lower() + '\n' in petnamesStr.lower():
|
||||||
|
petnamesList = petnamesStr.split('\n')
|
||||||
|
handle = handle.lower()
|
||||||
|
for pet in petnamesList:
|
||||||
|
if pet.endswith(' ' + handle):
|
||||||
|
return pet.replace(' ' + handle, '').strip()
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -235,7 +235,7 @@ def htmlPersonOptions(defaultTimeline: str,
|
||||||
if authorized:
|
if authorized:
|
||||||
if originPathStr == '/users/' + nickname:
|
if originPathStr == '/users/' + nickname:
|
||||||
if optionsNickname:
|
if optionsNickname:
|
||||||
handle = optionsNickname + '@' + optionsDomainFull
|
# handle = optionsNickname + '@' + optionsDomainFull
|
||||||
petname = getPetName(baseDir, nickname, domain, handle)
|
petname = getPetName(baseDir, nickname, domain, handle)
|
||||||
optionsStr += \
|
optionsStr += \
|
||||||
' ' + translate['Petname'] + ': \n' + \
|
' ' + translate['Petname'] + ': \n' + \
|
||||||
|
|
Loading…
Reference in New Issue