forked from indymedia/epicyon
Tidying
parent
1a5ed483bb
commit
372edabd3d
|
@ -1609,6 +1609,21 @@ def rejectAnnounce(announceFilename: str):
|
||||||
rejectAnnounceFile.write('\n')
|
rejectAnnounceFile.write('\n')
|
||||||
rejectAnnounceFile.close()
|
rejectAnnounceFile.close()
|
||||||
|
|
||||||
|
def addEmojiToDisplayName(baseDir: str,httpPrefix: str, \
|
||||||
|
nickname: str,domain: str, \
|
||||||
|
displayName: str) -> str:
|
||||||
|
"""Adds emoji icons to display names on individual posts
|
||||||
|
"""
|
||||||
|
if ':' in displayName:
|
||||||
|
displayName=displayName.replace('<p>','').replace('</p>','')
|
||||||
|
emojiTags=[]
|
||||||
|
displayName= \
|
||||||
|
addHtmlTags(baseDir,httpPrefix, \
|
||||||
|
nickname,domain,displayName,emojiTags,{})
|
||||||
|
displayName=displayName.replace('<p>','').replace('</p>','')
|
||||||
|
displayName=htmlReplaceEmojiFromTags(displayName,emojiTags)
|
||||||
|
return displayName
|
||||||
|
|
||||||
def individualPostAsHtml(iconsDir: str,translate: {}, \
|
def individualPostAsHtml(iconsDir: str,translate: {}, \
|
||||||
pageNumber: int,baseDir: str, \
|
pageNumber: int,baseDir: str, \
|
||||||
session,wfRequest: {},personCache: {}, \
|
session,wfRequest: {},personCache: {}, \
|
||||||
|
@ -1743,14 +1758,10 @@ def individualPostAsHtml(iconsDir: str,translate: {}, \
|
||||||
|
|
||||||
displayName=getDisplayName(postJsonObject['actor'],personCache)
|
displayName=getDisplayName(postJsonObject['actor'],personCache)
|
||||||
if displayName:
|
if displayName:
|
||||||
if ':' in displayName:
|
|
||||||
displayName=displayName.replace('<p>','').replace('</p>','')
|
|
||||||
emojiTags=[]
|
|
||||||
displayName= \
|
displayName= \
|
||||||
addHtmlTags(baseDir,httpPrefix, \
|
addEmojiToDisplayName(baseDir,httpPrefix, \
|
||||||
nickname,domain,displayName,emojiTags,{})
|
nickname,domain, \
|
||||||
displayName=displayName.replace('<p>','').replace('</p>','')
|
displayName)
|
||||||
displayName=htmlReplaceEmojiFromTags(displayName,emojiTags)
|
|
||||||
titleStr+='<a href="'+messageId+'">'+displayName+'</a>'
|
titleStr+='<a href="'+messageId+'">'+displayName+'</a>'
|
||||||
else:
|
else:
|
||||||
titleStr+='<a href="'+messageId+'">@'+actorNickname+'@'+actorDomain+'</a>'
|
titleStr+='<a href="'+messageId+'">@'+actorNickname+'@'+actorDomain+'</a>'
|
||||||
|
@ -1873,14 +1884,10 @@ def individualPostAsHtml(iconsDir: str,translate: {}, \
|
||||||
if avatarUrl2:
|
if avatarUrl2:
|
||||||
avatarUrl=avatarUrl2
|
avatarUrl=avatarUrl2
|
||||||
if displayName:
|
if displayName:
|
||||||
if ':' in displayName:
|
|
||||||
displayName=displayName.replace('<p>','').replace('</p>','')
|
|
||||||
emojiTags=[]
|
|
||||||
displayName= \
|
displayName= \
|
||||||
addHtmlTags(baseDir,httpPrefix, \
|
addEmojiToDisplayName(baseDir,httpPrefix, \
|
||||||
nickname,domain,displayName,emojiTags,{})
|
nickname,domain, \
|
||||||
displayName=displayName.replace('<p>','').replace('</p>','')
|
displayName)
|
||||||
displayName=htmlReplaceEmojiFromTags(displayName,emojiTags)
|
|
||||||
titleStr=displayName+' '+titleStr
|
titleStr=displayName+' '+titleStr
|
||||||
|
|
||||||
avatarImageInPost= \
|
avatarImageInPost= \
|
||||||
|
|
Loading…
Reference in New Issue