updated dockerfile, fixed bug in showing name in mail

This commit is contained in:
Kevin Froman 2018-08-28 22:02:32 -05:00
parent c0c0f838b6
commit f4cc1a6f8f
No known key found for this signature in database
GPG key ID: 0D414D0FE405B63B
5 changed files with 22 additions and 12 deletions

View file

@ -31,7 +31,7 @@ class OnionrCLIUI:
self.myCore = apiInst.get_core()
return
def start(self):
name = input("Enter your name")
name = input("Enter your name: ")
self.myCore.insertBlock("userInfo-" + str(uuid.uuid1()), sign=True, header='userInfo', meta={'name': name})
return

View file

@ -82,9 +82,14 @@ class OnionrMail:
blockCount += 1
pmBlockMap[blockCount] = blockHash
block = Block(blockHash, core=self.myCore)
senderKey = block.getMetadata('signer')
senderDisplay = onionrusers.OnionrUser(self.myCore, senderKey)
block = pmBlocks[blockHash]
senderKey = block.signer
try:
senderKey = senderKey.decode()
except AttributeError:
pass
print("DEBUG:", senderKey)
senderDisplay = onionrusers.OnionrUser(self.myCore, senderKey).getName()
if senderDisplay == 'anonymous':
senderDisplay = senderKey