Fix a bug when moving a chatroom to a new group
authorMikael Berthe <mikael@lilotux.net>
Sat, 12 Nov 2005 15:02:25 +0100
changeset 509 cd52ddef5ce1
parent 508 5a2132ba2220
child 510 6c3cd3aa4a91
Fix a bug when moving a chatroom to a new group Room "subscription" and "nickname" fields were lost.
mcabber/src/roster.c
--- a/mcabber/src/roster.c	Sat Nov 12 14:48:35 2005 +0100
+++ b/mcabber/src/roster.c	Sat Nov 12 15:02:25 2005 +0100
@@ -697,9 +697,13 @@
   sl_clone = roster_add_user(roster_usr->jid, roster_usr->name,
           newgroupname, roster_usr->type);
   roster_clone = (roster*)sl_clone->data;
+  roster_clone->subscription = roster_usr->subscription;
   roster_clone->flags = roster_usr->flags;
+
   roster_clone->resource = roster_usr->resource;
   roster_usr->resource = NULL;
+  roster_clone->nickname = roster_usr->nickname;
+  roster_usr->nickname = NULL;
 
   // Free old buddy
   if (roster_usr->jid)        g_free((gchar*)roster_usr->jid);