otrv4 / pidgin-otrng

Fork of https://bugs.otr.im/plugins/pidgin-otr. This is a mirror of https://bugs.otr.im/otrv4/pidgin-otrng
GNU General Public License v2.0
16 stars 5 forks source link

Rethink prekey client architecture #82

Closed olabini closed 5 years ago

olabini commented 5 years ago

We need to rethink completely how the prekey communication happens - the current model is not workable at all - especially the use of contexts on the callback object. I'll need to map all this functionality and figure out how to change it to something that works.

olabini commented 5 years ago

OK, after thinking through this, my proposal is that we move towards a structure that looks like this:

Inside the plugin, I propose that we separate out the prekey plugin functionality into two different sub-plugins. One for managing everything related to the account (checking storage, publishing), and another for getting ensembles for peers. I think this will clean up a lot of stuff.

Thoughts, comments?

claucece commented 5 years ago

I specially like this:

Inside of prekey_manager_s we have a list of mappings from domains (or something) to the server identity for that domain. This list will be empty initially

As I don't think we have a mapping right now.

Sounds good.

olabini commented 5 years ago

Yeah. In fact, we can't accommodate more than one prekey server per account at all. That's sometime we need to test later as well.

olabini commented 5 years ago

One suggestion here is to cache the server identities in the plugin discovery code, to make things easier.

olabini commented 5 years ago

This is a big refactor, and is connected to the prekey client file refactoring for libotr-ng otrv4/libotr-ng#178

olabini commented 5 years ago

This is now done!!!!