Browse Source

Add Identity.key_mistrusted()

sync Release_2.0.5
heck 2 years ago
parent
commit
99978b8152
3 changed files with 17 additions and 1 deletions
  1. +6
    -1
      src/identity.cc
  2. +1
    -0
      src/identity.hh
  3. +10
    -0
      src/pEpmodule.cc

+ 6
- 1
src/identity.cc View File

@ -14,7 +14,6 @@
namespace pEp {
namespace PythonAdapter {
using namespace std;
Identity::Identity(string address, string username, string user_id,
string fpr, int comm_type, string lang, identity_flags_t flags)
@ -156,6 +155,12 @@ namespace pEp {
_throw_status(status);
}
void Identity::key_mistrusted()
{
PEP_STATUS status = ::key_mistrusted(adapter.session(), *this);
_throw_status(status);
}
bool Identity::is_pEp_user()
{
bool result;


+ 1
- 0
src/identity.hh View File

@ -66,6 +66,7 @@ namespace pEp {
virtual void update();
void key_reset(string fpr="");
void key_mistrusted();
bool is_pEp_user();


+ 10
- 0
src/pEpmodule.cc View File

@ -210,6 +210,16 @@ BOOST_PYTHON_MODULE(pEp)
"identity. If it does not, remove the key from the keyring; the key's status is\n"
"completely fresh on next contact from the partner.")
.def("key_mistrusted", &pEp::PythonAdapter::Identity::key_mistrusted,
boost::python::arg("fpr")=object(""),
"If you want updated trust on the identity, you ll have"
"to call update_identity or myself respectively after this."
"N.B. If you are calling this on a key that is the identity or user default,"
"it will be removed as the default key for ANY identity and user for which"
"it is the default. Please keep in mind that the undo in undo_last_mistrust"
"will only undo the current identity's / it's user's default, not any"
"other identities which may be impacted (this will not affect most use cases)")
.def("enable_for_sync", &pEp::PythonAdapter::Identity::enable_for_sync,
"Enable own identity for p≡p sync.\n\n"
"Only use this on own identities, which are used as accounts.\n")


Loading…
Cancel
Save