Hi Dave
I've attached the changes I've made to the jabber-module. The last
modification in the diff-file is for forcing both-way-subscription
(depending on the jabber server the subscription is only single-sided
without this code!).
The other modifications are to add the state invisible to the
wengophone-implementation. Note: Something here seems still not to be
correct. => While I'm invisible for other wengophones with my patch
applied if I change to invisible in jaber, I'm still visible as "online"
in gajim! So I'll have to look a bit deeper into the jabber-refs to look
what the correct code for this state is! (The complicated thing here: As
far as I know jabberd1.4 didn't know the state invisible, while ejabberd
(the server I'm using) and jabberd2 know it!).
Cheers, Pirmin
Index: libs/gaim/src/libgaim/protocols/jabber/buddy.c
===================================================================
--- libs/gaim/src/libgaim/protocols/jabber/buddy.c (Revision 8792)
+++ libs/gaim/src/libgaim/protocols/jabber/buddy.c (Arbeitskopie)
@@ -1373,6 +1373,8 @@
return _("Extended Away");
case JABBER_BUDDY_STATE_DND:
return _("Do Not Disturb");
+ case JABBER_BUDDY_STATE_INVISIBLE:
+ return _("Invisible");
}
return _("Unknown");
@@ -1437,6 +1439,8 @@
return NULL;
case JABBER_BUDDY_STATE_UNAVAILABLE:
return "offline";
+ case JABBER_BUDDY_STATE_INVISIBLE:
+ return NULL;
}
return NULL;
}
@@ -1459,6 +1463,8 @@
return "error";
case JABBER_BUDDY_STATE_UNAVAILABLE:
return "offline";
+ case JABBER_BUDDY_STATE_INVISIBLE:
+ return "invisible";
}
return NULL;
}
Index: libs/gaim/src/libgaim/protocols/jabber/buddy.h
===================================================================
--- libs/gaim/src/libgaim/protocols/jabber/buddy.h (Revision 8792)
+++ libs/gaim/src/libgaim/protocols/jabber/buddy.h (Arbeitskopie)
@@ -32,7 +32,8 @@
JABBER_BUDDY_STATE_CHAT,
JABBER_BUDDY_STATE_AWAY,
JABBER_BUDDY_STATE_XA,
- JABBER_BUDDY_STATE_DND
+ JABBER_BUDDY_STATE_DND,
+ JABBER_BUDDY_STATE_INVISIBLE
} JabberBuddyState;
typedef struct _JabberBuddy {
Index: libs/gaim/src/libgaim/protocols/jabber/jabber.c
===================================================================
--- libs/gaim/src/libgaim/protocols/jabber/jabber.c (Revision 8792)
+++ libs/gaim/src/libgaim/protocols/jabber/jabber.c (Arbeitskopie)
@@ -1254,6 +1286,12 @@
NULL);
types = g_list_append(types, type);
+ type = gaim_status_type_new_with_attrs(GAIM_STATUS_INVISIBLE,
+ jabber_buddy_state_get_status_id(JABBER_BUDDY_STATE_INVISIBLE),
+ NULL, TRUE, TRUE, FALSE,
+ "message", _("Message"), gaim_value_new(GAIM_TYPE_STRING),
+ NULL);
+ types = g_list_append(types, type);
/*
if(js->protocol_version == JABBER_PROTO_0_9)
m = g_list_append(m, _("Invisible"));
@@ -1769,7 +1807,9 @@
jabber_presence_subscription_set(js, who,
"subscribed");
-
+ jabber_presence_subscription_set(gc->proto_data, who,
+ "subscribe");
+
buddy = gaim_find_buddy(gc->account, who);
if (buddy)
_______________________________________________
Wengophone-devel mailing list
[email protected]
http://dev.openwengo.com/mailman/listinfo/wengophone-devel