From 842f5c5f998f3c1a1c5464470c64d691218e14a5 Mon Sep 17 00:00:00 2001 From: James Booth Date: Thu, 31 Jan 2013 01:13:53 +0000 Subject: [PATCH] Added presence.last and presence.login properties to /account rename --- src/accounts.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/accounts.c b/src/accounts.c index d7149b77..ea61af8f 100644 --- a/src/accounts.c +++ b/src/accounts.c @@ -272,6 +272,18 @@ accounts_rename(const char * const account_name, const char * const new_name) free(resource); } + char *presence_last = g_key_file_get_string(accounts, account_name, "presence.last", NULL); + if (presence_last != NULL) { + g_key_file_set_string(accounts, new_name, "presence.last", presence_last); + free(presence_last); + } + + char *presence_login = g_key_file_get_string(accounts, account_name, "presence.login", NULL); + if (presence_login != NULL) { + g_key_file_set_string(accounts, new_name, "presence.login", presence_login); + free(presence_login); + } + g_key_file_remove_group(accounts, account_name, NULL); _save_accounts();