-
Artur Hefczyc wrote:
I do not see any patch attached. Did you forget to attach it? To be honest I do not understand it's purpose but maybe once it is attached I can deduct from the code.
Don't worry, nobody has these kind of powers :) I forgot to attach the patch, sorry.
-
-
applied the patch;
-
given it's more in line with specification (v. XEP-0203: Delayed Delivery) I've enabled it's inclusion by default (still can configure list of clients or turn it off with @sess-man/plugins-conf/presence/offline-roster-last-seen=off@)
-
while at it and based on our previous discussion I've removed unused
RosterElementIfc
interface; -
cleaned up empty javadocs.
-
-
Don't call me a pain :) but I think this can be expanded to use ExtendedPresenceProcessorIfc. What do you think?
My own need is to add a custom child to every presence, including unavailable presence coming from the roster. Do you think it's better to modify RosterAbstract.getCustomChild to return an array/list of children (I could extend RosterAbstract then) or use an ExtendedPresenceProcessorIfc? I can write a patch, but I'd like to hear your opinion first. Thanks.
-
I was forced to disable offline-roster-last-seen as it was messing up (see #3463) and causing additional processing due to fact it generates offline presences for every one in users roster, even that some users are online (but our server will know it that after presence probe). So this features causes for online users from roster to generate presence offline followed by presence online packets.
-
Andrzej Wójcik wrote:
I was forced to disable offline-roster-last-seen as it was messing up (see #3463) and causing additional processing due to fact it generates offline presences for every one in users roster, even that some users are online (but our server will know it that after presence probe). So this features causes for online users from roster to generate presence offline followed by presence online packets.
I can't reach #3463 (forbidden). What was that about?
-
Daniele Ricci wrote:
My own need is to add a custom child to every presence, including unavailable presence coming from the roster. Do you think it's better to modify RosterAbstract.getCustomChild to return an array/list of children (I could extend RosterAbstract then) or use an ExtendedPresenceProcessorIfc? I can write a patch, but I'd like to hear your opinion first. Thanks.
I've opted to modify RosterAbstract so now
tigase.xmpp.impl.roster.RosterAbstract.getCustomChildren(XMPPResourceConnection, JID)
is used with this particular feature an you can provide your Roster implementation with--roster-implementation
system property.I've chosen this approach because this feature is still experimental and as shown above - it breaks specification somewhat (sends two
presence
stanza when the contact is online.I would say it's better to utilize feature implemented in commit:aaa344b7 and levarage mentioned
ExtendedPresenceProcessorIfc
to provide your custom elements in outgoingpresence
packets - it will be more in line with the specification of Presence Probe and handling unavailable presence:If appropriate in accordance with local security policies this presence notification MAY include the full XML of the last unavailable presence stanza that the server received from the contact.
-
Wojciech Kapcia wrote:
I've opted to modify RosterAbstract so now
tigase.xmpp.impl.roster.RosterAbstract.getCustomChildren(XMPPResourceConnection, JID)
is used with this particular feature an you can provide your Roster implementation with--roster-implementation
system property.Very well, thanks.
I would say it's better to utilize feature implemented in commit:aaa344b7 and levarage mentioned
ExtendedPresenceProcessorIfc
to provide your custom elements in outgoingpresence
packets - it will be more in line with the specification of Presence Probe and handling unavailable presenceI agree, I was probably too rush on writing code that way :) I will do some experiments with this new approach. Thank you!
Type |
Patch
|
Priority |
Minor
|
Assignee | |
RedmineID |
2530
|
Version |
tigase-server-7.1.0
|
Spent time |
0
|
This patch allows the RosterFlat implementation to inject a delay element inside presence stanzas with the last seen timestamp.
This breaks APIs I'm afraid, unless we want to keep the old getCustomStatus method and behaviour to work together with the new getCustomChild.
For this reason, this is probably an unwanted patch, but I'm submitting it anyway because I'd like to have your feedback and eventually modify it to be included in the source tree.
0001-Allow-injection-of-custom-child-element.patch