aboutsummaryrefslogtreecommitdiffstats
path: root/facebook/facebook-api.c
diff options
context:
space:
mode:
Diffstat (limited to 'facebook/facebook-api.c')
-rw-r--r--facebook/facebook-api.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/facebook/facebook-api.c b/facebook/facebook-api.c
index 7d91b05..d5faef7 100644
--- a/facebook/facebook-api.c
+++ b/facebook/facebook-api.c
@@ -2870,6 +2870,8 @@ FbApiThread *
fb_api_thread_dup(const FbApiThread *thrd, gboolean deep)
{
FbApiThread *ret;
+ FbApiUser *user;
+ GSList *l;
if (thrd == NULL) {
return g_new0(FbApiThread, 1);
@@ -2878,10 +2880,13 @@ fb_api_thread_dup(const FbApiThread *thrd, gboolean deep)
ret = g_memdup(thrd, sizeof *thrd);
if (deep) {
+ for (ret->users = NULL, l = thrd->users; l != NULL; l = l->next) {
+ user = fb_api_user_dup(l->data, TRUE);
+ ret->users = g_slist_prepend(ret->users, user);
+ }
+
ret->topic = g_strdup(thrd->topic);
- ret->users = g_slist_copy_deep(thrd->users,
- (GCopyFunc) fb_api_user_dup,
- GINT_TO_POINTER(deep));
+ ret->users = g_slist_reverse(ret->users);
}
return ret;