hi, i am writing a component and all jabber users are publishing their presence to this component. my component does the following for every presence packet it receives: 1) check if it is the first presence packet of the publisher (=> publisher goes online). right now i am sending the roster of the publisher with the first presence packet. store roster. 2) if it is not the first presence packet it is a presence update. if type equals unavailable remove presence packet and roster otherwise merge the update with the old presence packet. store presence packet.(i am sending lots of additional presence information within the <x> element, e.g. location, address, client info). 3) get the JIDs of all subcribers (using the roster of the publisher) that are online (using the JIDs of the stored presence packets) 4) for every online subscriber JID take the presence packet of the publisher and the subscriber and execute some rules on it (using drools (drools.org)) and create an individual presence packet for the subcriber 5) send the created presence packets to the subscribers
the reason for the above is that i want to be able to convey differnt kinds of presence to the subscribers. for example for some people -- say, HR -- I want to convey "I'm at work". For people who are members of any of the projects that I am on, I might also want to convey "at my desk, working". But given that I am working under a tight deadline for project X, I want to also convey "for matters relating to project X, I can be interrupted, but for matters relating to any other project, I do not want to be disturbed". Unless, of course, it is my boss who can interrupt me for any reason. the presence server is creating the from attribute. because of this the subscribers will receive the packet including the JID of the component. is there a possibility to send it with the JID of the original publisher? is it possible for the component to receive the rosters directly from the server instead of step 1)? any comments welcome, especially about my "algorithm"... cheers mathias _______________________________________________ jdev mailing list [EMAIL PROTECTED] http://mailman.jabber.org/listinfo/jdev
