Branch Coverage

blib/lib/Mojo/Webqq/Message/Handle.pm
Criterion Covered Total %
branch 0 294 0.0


line true false branch
28 0 0 if $self->is_stop
29 0 0 if ($msg->class eq 'recv') { }
0 0 elsif ($msg->class eq 'send') { }
30 0 0 if ($msg->type eq 'friend_message') { }
0 0 elsif ($msg->type eq 'sess_message') { }
0 0 elsif ($msg->type eq 'group_message') { }
0 0 elsif ($msg->type eq 'discuss_message') { }
0 0 elsif ($msg->type eq 'state_message') { }
31 0 0 if ($self->has_subscribers('receive_pic') or $self->has_subscribers('receive_friend_pic'))
35 0 0 if ($_->{'type'} eq 'offpic')
42 0 0 if ($self->has_subscribers('receive_pic') or $self->has_subscribers('receive_sess_pic'))
46 0 0 if ($_->{'type'} eq 'offpic')
53 0 0 if ($self->has_subscribers('receive_pic') or $self->has_subscribers('receive_group_pic'))
55 0 0 if ($_->{'type'} eq 'cface')
56 0 0 unless exists $_->{'server'}
57 0 0 unless exists $_->{'file_id'}
58 0 0 unless exists $_->{'name'}
60 0 0 unless defined $port
70 0 0 if (defined $friend)
82 0 0 if ($msg->source ne 'local')
84 0 0 if ref $msg->cb eq 'CODE'
90 0 0 if ($msg->ttl <= 0)
93 0 0 if (ref $msg->cb eq 'CODE')
109 0 0 if (defined $Mojo::Webqq::Message::LAST_DISPATCH_TIME)
110 0 0 $now < $Mojo::Webqq::Message::LAST_DISPATCH_TIME + $Mojo::Webqq::Message::SEND_INTERVAL ? :
116 0 0 $msg->type eq 'discuss_message' ? :
0 0 $msg->type eq 'sess_message' ? :
0 0 $msg->type eq 'group_message' ? :
0 0 $msg->type eq 'friend_message' ? :
137 0 0 if ($msg->type eq 'friend_message') { }
0 0 elsif ($msg->type eq 'group_message') { }
0 0 elsif ($msg->type eq 'discuss_message') { }
0 0 elsif ($msg->type eq 'sess_message') { }
138 0 0 if $msg->class eq 'recv'
139 0 0 if $msg->class eq 'send'
148 0 0 if $msg->class eq 'recv'
149 0 0 if $msg->class eq 'send'
154 0 0 if (@_ == 1)
156 0 0 if ref $msg ne 'Mojo::Webqq::Message'
157 0 0 if $msg->type ne 'friend_message'
160 0 0 if $msg->content ne $content
165 0 0 if (not defined $content or $content eq '')
169 0 0 if (ref $friend eq 'Mojo::Webqq::Friend' and defined $friend->id) { }
183 0 0 if ref $cb eq 'CODE'
185 0 0 if $msg->content ne $content
194 0 0 if (@_ == 1)
196 0 0 if ref $msg ne 'Mojo::Webqq::Message'
197 0 0 if $msg->type ne 'group_message'
200 0 0 if $msg->content ne $content
205 0 0 if (not defined $content or $content eq '')
209 0 0 if (ref $group eq 'Mojo::Webqq::Group' and defined $group->id) { }
224 0 0 if ref $cb eq 'CODE'
226 0 0 if $msg->content ne $content
235 0 0 if (@_ == 1)
237 0 0 if ref $msg ne 'Mojo::Webqq::Message'
238 0 0 if $msg->type ne 'discuss_message'
241 0 0 if $msg->content ne $content
246 0 0 if (not defined $content or $content eq '')
250 0 0 if (ref $discuss eq 'Mojo::Webqq::Discuss' and defined $discuss->id) { }
266 0 0 if ref $cb eq 'CODE'
268 0 0 if $msg->content ne $content
277 0 0 if (@_ == 1)
279 0 0 if ref $msg ne 'Mojo::Webqq::Message'
280 0 0 if $msg->type ne 'sess_message'
283 0 0 if $msg->content ne $content
288 0 0 if (not defined $content or $content eq '')
292 0 0 if (ref $member eq 'Mojo::Webqq::Group::Member' and defined $member->id and defined $member->id) { }
0 0 elsif (ref $member eq 'Mojo::Webqq::Discuss::Member' and defined $member->id and defined $member->id) { }
294 0 0 unless defined $group
314 0 0 if ref $cb eq 'CODE'
316 0 0 if $msg->content ne $content
321 0 0 unless defined $discuss
339 0 0 if ref $cb eq 'CODE'
341 0 0 if $msg->content ne $content
352 0 0 if $self->is_stop
353 0 0 unless defined $json
354 0 0 if ($json->{'retcode'} == 0) { }
0 0 elsif ($json->{'retcode'} == 116) { }
0 0 elsif ($json->{'retcode'} == 100 or $json->{'retcode'} == 103) { }
0 0 elsif ($json->{'retcode'} == 120 or $json->{'retcode'} == 121) { }
0 0 elsif ($json->{'retcode'} == 100000) { }
0 0 elsif (ref $self->ignore_poll_retcode eq 'ARRAY' and grep {$json->{'retcode'} == $_;} @{$self->ignore_poll_retcode;}) { }
358 0 0 if ($m->{'poll_type'} eq 'sess_message') { }
0 0 elsif ($m->{'poll_type'} eq 'message') { }
0 0 elsif ($m->{'poll_type'} eq 'group_message') { }
0 0 elsif ($m->{'poll_type'} eq 'discu_message') { }
0 0 elsif ($m->{'poll_type'} eq 'buddies_status_change') { }
0 0 elsif ($m->{'poll_type'} eq 'kick_message') { }
0 0 elsif ($m->{'poll_type'} eq 'group_web_message') { }
370 0 0 if ($msg->{'sender_id'} eq $self->user->id)
373 0 0 unless $self->allow_message_sync
377 0 0 if ($m->{'value'}{'service_type'} == 0) { }
0 0 elsif ($m->{'value'}{'service_type'} == 1) { }
400 0 0 if ($msg->{'sender_id'} eq $self->user->id)
403 0 0 unless $self->allow_message_sync
410 0 0 if " \000\n\000\000\000\000\cB\x{5b8b}\x{4f53}\r" eq $m->{'value'}{'content'}[1]
426 0 0 if ($msg->{'sender_id'} eq $self->user->id)
429 0 0 unless $self->allow_message_sync
446 0 0 if ($msg->{'sender_id'} eq $self->user->id)
449 0 0 unless $self->allow_message_sync
478 0 0 if ($m->{'value'}{'show_reason'} == 1) { }
490 0 0 if (exists $m->{'value'}{'xml'})
496 0 0 if ($e->attr('t') eq 'h') { }
0 0 elsif ($e->attr('t') eq 't') { }
500 0 0 if ($e->attr('s') eq "\345\205\261\344\272\253\346\226\207\344\273\266") { }
509 0 0 if (defined $info{'type'} and $info{'type'} eq 'share-file')
520 0 0 if ($msg->{'sender_id'} eq $self->user->id)
523 0 0 unless $self->allow_message_sync
583 0 0 if ($self->poll_failure_count > $self->poll_failure_count_max)
597 0 0 if ($msg->{'type'} eq 'friend_message' or $msg->{'type'} eq 'group_message' or $msg->{'type'} eq 'sess_message' or $msg->{'type'} eq 'discuss_message')
603 0 0 if (@{$msg->{'content'};} == 1 and ref $msg->{'content'}[0] eq 'ARRAY' and $msg->{'content'}[0][0] eq 'font') { }
614 0 0 if (ref $c eq 'ARRAY') { }
615 0 0 if ($c->[0] eq 'cface') { }
0 0 elsif ($c->[0] eq 'offpic') { }
0 0 elsif ($c->[0] eq 'face') { }
670 0 0 if ($msg->{'type'} eq 'friend_message') { }
0 0 elsif ($msg->{'type'} eq 'group_message') { }
0 0 elsif ($msg->{'type'} eq 'sess_message') { }
0 0 elsif ($msg->{'type'} eq 'discuss_message') { }
0 0 elsif ($msg->{'type'} eq 'state_message') { }
0 0 elsif ($msg->{'type'} eq 'system_message') { }
673 0 0 unless (defined $sender)
676 0 0 unless (defined $sender)
695 0 0 if (defined $group) { }
698 0 0 unless (defined $sender)
701 0 0 unless (defined $sender)
715 0 0 unless defined $group
718 0 0 unless (defined $sender)
735 0 0 if ($msg->{'via'} eq 'group') { }
0 0 elsif ($msg->{'via'} eq 'discuss') { }
740 0 0 if (defined $group) { }
743 0 0 unless (defined $sender)
746 0 0 unless (defined $sender)
760 0 0 unless defined $group
763 0 0 unless (defined $sender)
782 0 0 if (defined $discuss) { }
785 0 0 unless (defined $sender)
788 0 0 unless (defined $sender)
802 0 0 unless defined $discuss
805 0 0 unless (defined $sender)
827 0 0 if (defined $discuss) { }
830 0 0 unless (defined $sender)
833 0 0 unless (defined $sender)
842 0 0 unless defined $discuss
845 0 0 unless (defined $sender)
866 0 0 if ($self->ignore_unknown_id) { }
867 0 0 if $msg->sender->_flag != 1