2
0
mirror of https://github.com/ComradCollective/Comrad synced 2024-11-16 00:12:48 +00:00
This commit is contained in:
quadrismegistus 2020-09-15 14:46:36 +01:00
parent 319f2371e8
commit 407feb9eca
2 changed files with 6 additions and 6 deletions

View File

@ -428,7 +428,7 @@ class KomradeX(Caller):
malformed = True malformed = True
if not malformed: if not malformed:
print('good msg:',msg) # print('good msg:',msg)
msgs.append(msg) msgs.append(msg)
else: else:
post_ids_malformed.append(post_id) post_ids_malformed.append(post_id)
@ -481,11 +481,11 @@ class KomradeX(Caller):
def read_msg(self,post_id): def read_msg(self,post_id):
# get post # get post
post_encr = self.crypt_keys.get(post_id,prefix='/post/') post_encr = self.crypt_keys.get(post_id,prefix='/post/')
print(post_id,'????') # print(post_id,'????')
if not post_encr: if not post_encr:
self.download_msgs([post_id]) self.download_msgs([post_id])
post_encr = self.crypt_keys.get(post_id,prefix='/post/') post_encr = self.crypt_keys.get(post_id,prefix='/post/')
print(post_id,'????') # print(post_id,'????')
return { return {
'success':False, 'success':False,
@ -551,7 +551,7 @@ class KomradeX(Caller):
route='download_msgs' route='download_msgs'
) )
print('got back from op!',res) # print('got back from op!',res)
if not 'data_encr' or not res['data_encr'] or type(res['data_encr'])!=dict: if not 'data_encr' or not res['data_encr'] or type(res['data_encr'])!=dict:
return {'success':False, 'status':'No valid data returned.'} return {'success':False, 'status':'No valid data returned.'}

View File

@ -208,7 +208,7 @@ class CLI(Logger):
print('@Operator:',res['status']) print('@Operator:',res['status'])
return return
print('ummmmm msgs?') # print('ummmmm msgs?')
msgs=res.get('msgs') msgs=res.get('msgs')
if not msgs: if not msgs:
print('@Operator: No messages.') print('@Operator: No messages.')
@ -217,7 +217,7 @@ class CLI(Logger):
for i,msg in enumerate(msgs): for i,msg in enumerate(msgs):
print(f'@Operator: Showing most recent messages first.\n\n\n Message {i+1} of {len(msgs)}') print(f'@Operator: Showing most recent messages first.\n\n\n Message {i+1} of {len(msgs)}')
print(msg) print(msg)
print('DATA',msg.data) # print('DATA',msg.data)
if msg.data.get('prompt_id')=='addcontact': if msg.data.get('prompt_id')=='addcontact':
self.prompt_adduser(msg) self.prompt_adduser(msg)
else: else: