|
|
|
@ -652,21 +652,6 @@ class TheOperator(Operator):
|
|
|
|
|
def get_posts(self,reencrypt_to_uri,reencrypt_to_name=None):
|
|
|
|
|
world=Komrade(WORLD_NAME)
|
|
|
|
|
|
|
|
|
|
res = {'msgs':world.messages()}
|
|
|
|
|
self.log('res!!!',res)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return res
|
|
|
|
|
|
|
|
|
|
# (1) get inbox
|
|
|
|
|
inbox_obj=self.get_inbox_crypt(uri=world.uri)
|
|
|
|
|
self.log('<-- inbox crypt',inbox_obj)
|
|
|
|
@ -682,22 +667,16 @@ class TheOperator(Operator):
|
|
|
|
|
'res_msgs':res_msgs
|
|
|
|
|
}
|
|
|
|
|
id2msg=res_msgs.get('posts')
|
|
|
|
|
self.log('id2msg for world',id2msg)
|
|
|
|
|
self.log('id2msg for world',len(id2msg))
|
|
|
|
|
|
|
|
|
|
# (2) read msgs
|
|
|
|
|
id2post={}
|
|
|
|
|
for post_id,post_encr in id2msg.items():
|
|
|
|
|
self.log('id2msg post_id =',post_id)
|
|
|
|
|
self.log('id2msg post_encr =',post_encr)
|
|
|
|
|
|
|
|
|
|
post = SMessage(
|
|
|
|
|
world.privkey.data,
|
|
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
res_read_msg = world.read_msg(
|
|
|
|
|
post_id,
|
|
|
|
|
post_encr=post
|
|
|
|
|
post_encr=post_encr
|
|
|
|
|
)
|
|
|
|
|
self.log(post_id,res_read_msg,'res_read_msg')
|
|
|
|
|
|
|
|
|
|