Add OMEMO policy

There is 3 policy:

- manual: OMEMO session are only started manually
- automatic: OMEMO session are only started if they have been started
  manually before
- always: OMEMO session are always started unless they have been ended
  manually before

Closes #1040 and fixes #1052
This commit is contained in:
Paul Fariello
2019-04-15 22:09:47 +02:00
parent 9574127177
commit 5f015e32b2
17 changed files with 253 additions and 23 deletions

View File

@@ -1686,6 +1686,7 @@ _get_group(preference_t pref)
case PREF_PLUGINS_SOURCEPATH:
return PREF_GROUP_PLUGINS;
case PREF_OMEMO_LOG:
case PREF_OMEMO_POLICY:
return PREF_GROUP_OMEMO;
default:
return NULL;
@@ -1903,6 +1904,8 @@ _get_key(preference_t pref)
return "statusbar.room";
case PREF_OMEMO_LOG:
return "log";
case PREF_OMEMO_POLICY:
return "policy";
default:
return NULL;
}
@@ -2023,6 +2026,8 @@ _get_default_string(preference_t pref)
return "room";
case PREF_OMEMO_LOG:
return "redact";
case PREF_OMEMO_POLICY:
return "automatic";
default:
return NULL;
}