mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-28 20:46:22 +00:00
Fixed issue with /otr myfp when no key loaded
This commit is contained in:
@@ -34,6 +34,12 @@ _mock_otr_get_their_fingerprint(const char * const recipient)
|
||||
return (char *)mock();
|
||||
}
|
||||
|
||||
static gboolean
|
||||
_mock_otr_key_loaded(void)
|
||||
{
|
||||
return (gboolean)mock();
|
||||
}
|
||||
|
||||
void
|
||||
otr_keygen_expect(ProfAccount *account)
|
||||
{
|
||||
@@ -62,3 +68,10 @@ otr_get_their_fingerprint_expect_and_return(char *recipient, char *fingerprint)
|
||||
expect_string(_mock_otr_get_their_fingerprint, recipient, recipient);
|
||||
will_return(_mock_otr_get_their_fingerprint, fingerprint);
|
||||
}
|
||||
|
||||
void
|
||||
otr_key_loaded_returns(gboolean loaded)
|
||||
{
|
||||
otr_key_loaded = _mock_otr_key_loaded;
|
||||
will_return(_mock_otr_key_loaded, loaded);
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "config/account.h"
|
||||
|
||||
void otr_keygen_expect(ProfAccount *account);
|
||||
void otr_key_loaded_returns(gboolean loaded);
|
||||
|
||||
void otr_libotr_version_returns(char *version);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user