You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.9 KiB
46 lines
1.9 KiB
Index: purple-facebook-0.9.6/pidgin/libpurple/protocols/facebook/facebook.c |
|
=================================================================== |
|
--- purple-facebook-0.9.6.orig/pidgin/libpurple/protocols/facebook/facebook.c |
|
+++ purple-facebook-0.9.6/pidgin/libpurple/protocols/facebook/facebook.c |
|
@@ -299,6 +299,10 @@ fb_cb_api_contacts(FbApi *api, GSList *u |
|
fb_data_image_add(fata, user->icon, fb_cb_icon, |
|
bdy, NULL); |
|
} |
|
+ |
|
+ if (purple_account_get_bool(acct, "inactive-as-away", FALSE)) { |
|
+ purple_protocol_got_user_status(acct, uid, purple_primitive_get_id_from_type(PURPLE_STATUS_AWAY), NULL); |
|
+ } |
|
} |
|
|
|
fb_data_image_queue(fata); |
|
@@ -351,6 +355,10 @@ fb_cb_api_contacts_delta(FbApi *api, GSL |
|
purple_blist_add_buddy(bdy, NULL, grp, NULL); |
|
|
|
purple_buddy_set_server_alias(bdy, user->name); |
|
+ |
|
+ if (purple_account_get_bool(acct, "inactive-as-away", FALSE)) { |
|
+ purple_protocol_got_user_status(acct, uid, purple_primitive_get_id_from_type(PURPLE_STATUS_AWAY), NULL); |
|
+ } |
|
} |
|
|
|
for (l = removed; l != NULL; l = l->next) { |
|
@@ -631,7 +639,7 @@ fb_cb_api_presences(FbApi *api, GSList * |
|
if (pres->active) { |
|
pstat = PURPLE_STATUS_AVAILABLE; |
|
} else { |
|
- pstat = PURPLE_STATUS_OFFLINE; |
|
+ pstat = purple_account_get_bool(acct, "inactive-as-away", FALSE) ? PURPLE_STATUS_AWAY : PURPLE_STATUS_OFFLINE; |
|
} |
|
|
|
FB_ID_TO_STR(pres->uid, uid); |
|
@@ -1740,6 +1748,10 @@ purple_init_plugin(PurplePlugin *plugin) |
|
"group-chat-open", TRUE); |
|
opts = g_list_prepend(opts, opt); |
|
|
|
+ opt = purple_account_option_bool_new(_("Show inactive buddies as away"), |
|
+ "inactive-as-away", FALSE); |
|
+ opts = g_list_prepend(opts, opt); |
|
+ |
|
opt = purple_account_option_bool_new(_("Login as a Workplace account"), |
|
"work", FALSE); |
|
opts = g_list_prepend(opts, opt);
|
|
|