[djabberd] sky,
r331: get rid of the DirectedPrescene hook and...
Artur Bergman
sky at crucially.net
Wed May 31 05:18:17 UTC 2006
Nah..
It should be tracked in the entry in the room I think, the entry can
come from a ServerIn too..
I am now reading the spec for how dialback should work with regards
to subdomains, because I tried to use two_parties but of course they
fail completely for the lookup, so I patched the test harness to
always link conference just to try where it would fail, and now the
dialback verify fails..
Artur
On May 30, 2006, at 9:59 PM, Brad Fitzpatrick wrote:
> Yes, you should track whether they're gc1.0 or MUC. Perhaps another
> per-connection field in Connection::ClientIn?
>
>
> On Wed, 31 May 2006 commits at code.sixapart.com wrote:
>
>> get rid of the DirectedPrescene hook and just look on
>> switch_incoming_client instead, remove the check for the x muc
>> element since we need it to be compatible with gc1.0, maybe we
>> should keep track of if this is a gc1.0 client or muc client,
>> unsure if we need to care
>>
>> U trunk/lib/DJabberd/HookDocs.pm
>> U trunk/lib/DJabberd/Plugin/MUC.pm
>> U trunk/lib/DJabberd/Presence.pm
>>
>>
>> Modified: trunk/lib/DJabberd/HookDocs.pm
>> ===================================================================
>> --- trunk/lib/DJabberd/HookDocs.pm 2006-05-31 04:34:55 UTC (rev 330)
>> +++ trunk/lib/DJabberd/HookDocs.pm 2006-05-31 04:42:45 UTC (rev 331)
>> @@ -103,12 +103,5 @@
>> des => "Called to request each hook chain item calls the
>> given CODE with parameters (JID,DJabberd::Presence) for each full
>> JID and last presence for that full JID that is based on the
>> provided short JID (the first parameter). Each hook chain item is
>> just expected to call the CODE subref 0 or more times, then
>> decline.",
>> };
>>
>> -$hook{'DirectedPresence'} = {
>> - args => ['Prescence'],
>> - callback => {
>> - decline => [],
>> - },
>> - des => "This callback is called whenever there is directed
>> presence packets being sent",
>> -};
>>
>> 1;
>>
>> Modified: trunk/lib/DJabberd/Plugin/MUC.pm
>> ===================================================================
>> --- trunk/lib/DJabberd/Plugin/MUC.pm 2006-05-31 04:34:55 UTC (rev
>> 330)
>> +++ trunk/lib/DJabberd/Plugin/MUC.pm 2006-05-31 04:42:45 UTC (rev
>> 331)
>> @@ -34,9 +34,9 @@
>> my ($vh, $cb, $iq) = @_;
>>
>>
>> - # XXX: shouldn't check for muc in x to support GC
>> - if(($iq->to_jid->domain ne $self->{domain})
>> - || ($iq->first_child->element ne '{http://jabber.org/
>> protocol/muc}x')) {
>> + if(!$iq->isa("DJabberd::Presence")
>> + || !$iq->is_directed
>> + || $iq->to_jid->domain ne $self->{domain}) {
>> $cb->decline;
>> return;
>> }
>> @@ -50,10 +50,10 @@
>> }
>>
>> $self->join_room($iq->to_jid->node, $iq->to_jid-
>> >resource, $iq->from_jid);
>> + $cb->stop_chain;
>> };
>> - $vhost->register_hook("DirectedPresence",$dp);
>> + $vhost->register_hook("switch_incoming_client", $dp);
>>
>> -
>> my $deliver = sub {
>> my ($vhost, $cb, $stanza) = @_;
>>
>>
>> Modified: trunk/lib/DJabberd/Presence.pm
>> ===================================================================
>> --- trunk/lib/DJabberd/Presence.pm 2006-05-31 04:34:55 UTC (rev 330)
>> +++ trunk/lib/DJabberd/Presence.pm 2006-05-31 04:42:45 UTC (rev 331)
>> @@ -351,10 +351,6 @@
>> if ($self->is_directed) {
>> $conn->{directed_presence}->{$self->to_jid}++;
>> $self->deliver;
>> - # TODO this hook is going away
>> - $conn->vhost->run_hook_chain(phase => "DirectedPresence",
>> - args => [ $self ],
>> - );
>> return;
>> }
>>
>>
>>
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.danga.com/pipermail/djabberd/attachments/20060530/1c28d523/attachment.htm
More information about the Djabberd
mailing list