about summary refs log tree commit diff stats
path: root/src/config/preferences.c
diff options
context:
space:
mode:
authorPaul Fariello <paul@fariello.eu>2019-04-15 22:09:47 +0200
committerPaul Fariello <paul@fariello.eu>2019-04-17 14:03:14 +0200
commit5f015e32b263de6ebcaf9a3c6c2ffcad238410a0 (patch)
treea1aed9f92fe491d6e0af30b1c35b46c748ac8796 /src/config/preferences.c
parent9574127177a8e975add3cef523e85f6e75fe4585 (diff)
downloadprofani-tty-5f015e32b263de6ebcaf9a3c6c2ffcad238410a0.tar.gz
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
Diffstat (limited to 'src/config/preferences.c')
-rw-r--r--src/config/preferences.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/config/preferences.c b/src/config/preferences.c
index 65e7a64d..19d54304 100644
--- a/src/config/preferences.c
+++ b/src/config/preferences.c
@@ -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;
     }