diff options
-rw-r--r-- | src/config/accounts.c | 16 | ||||
-rw-r--r-- | src/config/accounts.h | 1 |
2 files changed, 17 insertions, 0 deletions
diff --git a/src/config/accounts.c b/src/config/accounts.c index b53f4fb0..876ff870 100644 --- a/src/config/accounts.c +++ b/src/config/accounts.c @@ -212,6 +212,22 @@ accounts_get_account(const char * const name) account->priority_xa = g_key_file_get_integer(accounts, name, "priority.xa", NULL); account->priority_dnd = g_key_file_get_integer(accounts, name, "priority.dnd", NULL); + // get room history + account->room_history = NULL; + gsize history_size = 0; + gchar **room_history_values = g_key_file_get_string_list(accounts, name, + "rooms.history", &history_size, NULL); + + if (room_history_values != NULL) { + int i = 0; + for (i = 0; i < history_size; i++) { + account->room_history = g_slist_append(account->room_history, + strdup(room_history_values[i])); + } + + g_strfreev(room_history_values); + } + return account; } } diff --git a/src/config/accounts.h b/src/config/accounts.h index d1509d6f..d74e8fe5 100644 --- a/src/config/accounts.h +++ b/src/config/accounts.h @@ -38,6 +38,7 @@ typedef struct prof_account_t { gint priority_xa; gint priority_dnd; gboolean enabled; + GSList *room_history; } ProfAccount; void accounts_load(void); |