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 15:05:33 +01:00
parent d7b5fb19ab
commit b74b398aab
3 changed files with 8 additions and 4 deletions

View File

@ -383,6 +383,9 @@ class KomradeX(Caller):
'/inbox/' '/inbox/'
) )
def delete_msg(self,post_id):
return self.delete_msgs([post_id])
def delete_msgs(self,post_ids): def delete_msgs(self,post_ids):
inbox_ids = self.get_inbox_ids().get('inbox',[]) inbox_ids = self.get_inbox_ids().get('inbox',[])
for post_id in post_ids: for post_id in post_ids:

View File

@ -551,7 +551,7 @@ from_komrade = {from_komrade}
'msg':{ 'msg':{
'txt':f''''Komrade @{meet_name} would like to make your acquaintance. Their public key is {meet_uri}. Their QRcode is:\n{self.qr_str(meet_pubkey)}.''', 'txt':f'''Komrade @{meet_name} would like to make your acquaintance. Their public key is {meet_uri.decode()}.''',
'type':'prompt', 'type':'prompt',
'prompt_id':'addcontact', 'prompt_id':'addcontact',
'meet_name':meet_from_name, 'meet_name':meet_from_name,

View File

@ -194,10 +194,11 @@ class CLI(Logger):
do_senduser = input(f'''\n\nSend this user your public key as well? [y/N]\n{self.komrade}: ''') do_senduser = input(f'''\n\nSend this user your public key as well? [y/N]\n{self.komrade}: ''')
if do_adduser.strip().lower()=='y': if do_adduser.strip().lower()=='y':
self.komrade.save_uri_as_qrcode( fnfn = self.komrade.save_uri_as_qrcode(
meet_uri, meet_uri,
meet_name meet_name
) )
print(f'@Operator: The public key of @{meet_name} has been saved as a QRcode to {fnfn}. Text version: {self.komrade.qr_str(meet_uri)}')
if do_senduser: if do_senduser:
print('working on it ...') print('working on it ...')
@ -232,8 +233,8 @@ class CLI(Logger):
# print('DATA',msg.msg_d) # print('DATA',msg.msg_d)
if msg.data.get('prompt_id')=='addcontact': if msg.data.get('prompt_id')=='addcontact':
self.prompt_adduser(msg) self.prompt_adduser(msg)
else:
do_pause() self.propmt_msg()
clear_screen() clear_screen()
self.help() self.help()