Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def do_inbox(self, line):
my_address = config.my_data.find("data", "all")[0]["address"]
messages = config.cache.find("messages", "all")
if not messages:
messages = []
names = []
out = []
messages.reverse()
for x in messages:
if x['from'] not in names:
names.append(x['from'])
timeago_ = timeago.timeago(int(time.time() - x['time']))
print x['from']+" "+x['message'] + " " + str(timeago_['value']) +" "+str(timeago_['type'])+" ago"