forked from indymedia/epicyon
Extra debug
parent
cd30e547b8
commit
f9760476ab
3
posts.py
3
posts.py
|
@ -461,6 +461,7 @@ def createPostBase(baseDir: str,nickname: str, domain: str, port: int, \
|
||||||
nickname,domain,content, \
|
nickname,domain,content, \
|
||||||
mentionedRecipients, \
|
mentionedRecipients, \
|
||||||
hashtagsDict)
|
hashtagsDict)
|
||||||
|
print('Content tagging stage 1: '+content)
|
||||||
|
|
||||||
statusNumber,published = getStatusNumber()
|
statusNumber,published = getStatusNumber()
|
||||||
postTo='https://www.w3.org/ns/activitystreams#Public'
|
postTo='https://www.w3.org/ns/activitystreams#Public'
|
||||||
|
@ -501,7 +502,9 @@ def createPostBase(baseDir: str,nickname: str, domain: str, port: int, \
|
||||||
tags.append(tag)
|
tags.append(tag)
|
||||||
if isPublic:
|
if isPublic:
|
||||||
updateHashtagsIndex(baseDir,tag,newPostId)
|
updateHashtagsIndex(baseDir,tag,newPostId)
|
||||||
|
print('Content tags: '+str(tags))
|
||||||
content=replaceEmojiFromTags(content,tags,'content')
|
content=replaceEmojiFromTags(content,tags,'content')
|
||||||
|
print('Content tagging stage 2: '+content)
|
||||||
|
|
||||||
if not clientToServer:
|
if not clientToServer:
|
||||||
actorUrl=httpPrefix+'://'+domain+'/users/'+nickname
|
actorUrl=httpPrefix+'://'+domain+'/users/'+nickname
|
||||||
|
|
|
@ -1599,18 +1599,22 @@ def addEmojiToDisplayName(baseDir: str,httpPrefix: str, \
|
||||||
if ':' in displayName:
|
if ':' in displayName:
|
||||||
displayName=displayName.replace('<p>','').replace('</p>','')
|
displayName=displayName.replace('<p>','').replace('</p>','')
|
||||||
emojiTags={}
|
emojiTags={}
|
||||||
|
print('TAG: displayName before tags: '+displayName)
|
||||||
displayName= \
|
displayName= \
|
||||||
addHtmlTags(baseDir,httpPrefix, \
|
addHtmlTags(baseDir,httpPrefix, \
|
||||||
nickname,domain,displayName,[],emojiTags)
|
nickname,domain,displayName,[],emojiTags)
|
||||||
displayName=displayName.replace('<p>','').replace('</p>','')
|
displayName=displayName.replace('<p>','').replace('</p>','')
|
||||||
|
print('TAG: displayName after tags: '+displayName)
|
||||||
# convert the emoji dictionary to a list
|
# convert the emoji dictionary to a list
|
||||||
emojiTagsList=[]
|
emojiTagsList=[]
|
||||||
for tagName,tag in emojiTags.items():
|
for tagName,tag in emojiTags.items():
|
||||||
emojiTagsList.append(tag)
|
emojiTagsList.append(tag)
|
||||||
|
print('TAG: emoji tags list: '+str(emojiTagsList))
|
||||||
if not inProfileName:
|
if not inProfileName:
|
||||||
displayName=replaceEmojiFromTags(displayName,emojiTagsList,'post header')
|
displayName=replaceEmojiFromTags(displayName,emojiTagsList,'post header')
|
||||||
else:
|
else:
|
||||||
displayName=replaceEmojiFromTags(displayName,emojiTagsList,'profile')
|
displayName=replaceEmojiFromTags(displayName,emojiTagsList,'profile')
|
||||||
|
print('TAG: displayName after tag replacements: '+displayName)
|
||||||
return displayName
|
return displayName
|
||||||
|
|
||||||
def individualPostAsHtml(iconsDir: str,translate: {}, \
|
def individualPostAsHtml(iconsDir: str,translate: {}, \
|
||||||
|
|
Loading…
Reference in New Issue