diff --git a/app/main.py b/app/main.py index 477a314..f5466af 100644 --- a/app/main.py +++ b/app/main.py @@ -295,6 +295,7 @@ class MainApp(MDApp): dat = await self.api.register(un) if 'success' in dat: self.username=un + self.store.get('user',username=un) self.root.ids.login_screen.login_status.text=dat['success'] self.root.ids.login_screen.login_status.theme_text_color='Custom' self.root.ids.login_screen.login_status.text_color=rgb(*COLOR_ACCENT) @@ -341,6 +342,14 @@ class MainApp(MDApp): if content: jsond['content']=str(content) if file_id: jsond['file_id']=str(file_id) if file_ext: jsond['file_ext']=str(file_ext) + self.log(f'''app.json( + content={content}, + file_id={file_id}, + file_ext={file_ext}, + anonymous={anonymous}, + channels={channels}, + [username={self.username}]''' + ) if not anonymous and self.username: jsond['author']=self.username jsond['to_channels']=channels diff --git a/p2p/api.py b/p2p/api.py index 833e0f1..8c92743 100644 --- a/p2p/api.py +++ b/p2p/api.py @@ -366,7 +366,7 @@ class Api(object): def proc(key,value): self.log(f'encodeing data for {key} -> {type(value)} ...') - if encode_data and encrypt_for_pubkey is not None: + if encode_data and encrypt_for_pubkey is not None and type(value)==bytes: x = self.encode_data( val = value, do_encrypt=True,