mirror of
https://github.com/profanity-im/profanity.git
synced 2025-01-03 14:57:42 -05:00
Try to start sessions with every jid in roster
This commit is contained in:
parent
f9b2fdc7db
commit
df648ba959
@ -174,6 +174,10 @@ sv_ev_roster_received(void)
|
|||||||
|
|
||||||
const char *fulljid = connection_get_fulljid();
|
const char *fulljid = connection_get_fulljid();
|
||||||
plugins_on_connect(account_name, fulljid);
|
plugins_on_connect(account_name, fulljid);
|
||||||
|
|
||||||
|
#ifdef HAVE_OMEMO
|
||||||
|
omemo_start_sessions();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#include "xmpp/connection.h"
|
#include "xmpp/connection.h"
|
||||||
#include "xmpp/muc.h"
|
#include "xmpp/muc.h"
|
||||||
#include "xmpp/omemo.h"
|
#include "xmpp/omemo.h"
|
||||||
|
#include "xmpp/roster_list.h"
|
||||||
#include "xmpp/xmpp.h"
|
#include "xmpp/xmpp.h"
|
||||||
|
|
||||||
static gboolean loaded;
|
static gboolean loaded;
|
||||||
@ -304,6 +305,7 @@ omemo_generate_crypto_materials(ProfAccount *account)
|
|||||||
loaded = TRUE;
|
loaded = TRUE;
|
||||||
|
|
||||||
omemo_publish_crypto_materials();
|
omemo_publish_crypto_materials();
|
||||||
|
omemo_start_sessions();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -326,6 +328,20 @@ omemo_publish_crypto_materials(void)
|
|||||||
jid_destroy(jid);
|
jid_destroy(jid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
omemo_start_sessions(void)
|
||||||
|
{
|
||||||
|
GSList *contacts = roster_get_contacts(ROSTER_ORD_NAME);
|
||||||
|
if (contacts) {
|
||||||
|
GSList *curr = contacts;
|
||||||
|
for (curr = contacts; curr != NULL; curr = g_slist_next(curr)){
|
||||||
|
PContact contact = curr->data;
|
||||||
|
const char *jid = p_contact_barejid(contact);
|
||||||
|
omemo_start_session(jid);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
omemo_start_session(const char *const barejid)
|
omemo_start_session(const char *const barejid)
|
||||||
{
|
{
|
||||||
@ -1267,6 +1283,7 @@ _load_identity(void)
|
|||||||
loaded = TRUE;
|
loaded = TRUE;
|
||||||
|
|
||||||
omemo_identity_keyfile_save();
|
omemo_identity_keyfile_save();
|
||||||
|
omemo_start_sessions();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -45,6 +45,7 @@ gboolean omemo_is_trusted_identity(const char *const jid, const char *const fing
|
|||||||
char *omemo_fingerprint_autocomplete(const char *const search_str, gboolean previous);
|
char *omemo_fingerprint_autocomplete(const char *const search_str, gboolean previous);
|
||||||
void omemo_fingerprint_autocomplete_reset(void);
|
void omemo_fingerprint_autocomplete_reset(void);
|
||||||
|
|
||||||
|
void omemo_start_sessions(void);
|
||||||
void omemo_start_session(const char *const barejid);
|
void omemo_start_session(const char *const barejid);
|
||||||
void omemo_start_muc_sessions(const char *const roomjid);
|
void omemo_start_muc_sessions(const char *const roomjid);
|
||||||
void omemo_start_device_session(const char *const jid, uint32_t device_id, GList *prekeys, uint32_t signed_prekey_id, const unsigned char *const signed_prekey, size_t signed_prekey_len, const unsigned char *const signature, size_t signature_len, const unsigned char *const identity_key, size_t identity_key_len);
|
void omemo_start_device_session(const char *const jid, uint32_t device_id, GList *prekeys, uint32_t signed_prekey_id, const unsigned char *const signed_prekey, size_t signed_prekey_len, const unsigned char *const signature, size_t signature_len, const unsigned char *const identity_key, size_t identity_key_len);
|
||||||
|
Loading…
Reference in New Issue
Block a user