about summary refs log tree commit diff stats
path: root/src/config
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2020-04-12 00:37:20 +0200
committerMichael Vetter <jubalh@iodoru.org>2020-04-12 00:42:02 +0200
commit51518497e5bb11aa795ef2267512786eb16467df (patch)
tree63e5c886fca95107969ccaee06179ab43998d418 /src/config
parent98200ebd43e90d8662fee5e014bbe3dc1709a6d7 (diff)
downloadprofani-tty-51518497e5bb11aa795ef2267512786eb16467df.tar.gz
Add hidden MAM setting and trigger MAM retrievel when opening new window
Only when we start the conversation.
Not yet when we get messaged and a new window is opened.
Need to have sorting of messages in the window buffer then, I guess.
Also MAM IQ should only be send one time in such a case.

If MAM is enabled history from sql backend will not be shown.

`mam` in profrc enables experimental MAM.
Can change soon again. Don't rely on stuff in this stage ;)
Diffstat (limited to 'src/config')
-rw-r--r--src/config/preferences.c3
-rw-r--r--src/config/preferences.h1
2 files changed, 4 insertions, 0 deletions
diff --git a/src/config/preferences.c b/src/config/preferences.c
index ba3b08e9..0ec5a0c0 100644
--- a/src/config/preferences.c
+++ b/src/config/preferences.c
@@ -1799,6 +1799,7 @@ _get_group(preference_t pref)
         case PREF_REVEAL_OS:
         case PREF_TLS_CERTPATH:
         case PREF_CORRECTION_ALLOW:
+        case PREF_MAM:
             return PREF_GROUP_CONNECTION;
         case PREF_OTR_LOG:
         case PREF_OTR_POLICY:
@@ -2070,6 +2071,8 @@ _get_key(preference_t pref)
             return "avatar.cmd";
         case PREF_SLASH_GUARD:
             return "slashguard";
+        case PREF_MAM:
+            return "mam";
         default:
             return NULL;
     }
diff --git a/src/config/preferences.h b/src/config/preferences.h
index ffc93a52..f3c32ebd 100644
--- a/src/config/preferences.h
+++ b/src/config/preferences.h
@@ -170,6 +170,7 @@ typedef enum {
     PREF_HISTORY_COLOR_MUC,
     PREF_AVATAR_CMD,
     PREF_SLASH_GUARD,
+    PREF_MAM,
 } preference_t;
 
 typedef struct prof_alias_t {