Changeset edd0be7


Ignore:
Timestamp:
Feb 10, 2011, 9:10:56 PM (10 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.8, release-1.9
Children:
7488f27
Parents:
3f82515
git-author:
David Benjamin <davidben@mit.edu> (02/05/11 21:31:27)
git-committer:
David Benjamin <davidben@mit.edu> (02/10/11 21:10:56)
Message:
Only handle CCs in messages sent directly to you.

A zephyr with a CC line received on @SOME-REALM would still handle the
CC logic in replycmd. This oddity could possibly be retrofited to allow
@SOME-REALM to participate in CC'd messages, but that would require us
to handle CC lines on messages received on *. In the meantime, let's not
leave a half-baked not-feature.

Also refactor the block slightly. The original formulation is confusing;
it means to condition on the recipient of the message we reply to, but
actually checks $to, the recipient we use in the reply. It just happens
that in one case, the two are equal. The original code would assume that
case and then change its mind if it was wrong.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perl/lib/BarnOwl/Message/Zephyr.pm

    r8d553bf redd0be7  
    171171        $class = $self->class;
    172172        $instance = $self->instance;
    173         $to = $self->recipient;
    174         $cc = $self->zephyr_cc();
    175         if($to eq '*' || $to eq '') {
     173        if ($self->recipient eq '*' || $self->recipient eq '') {
    176174            $to = '';
    177         } elsif($to !~ /^@/) {
     175        } elsif ($self->recipient =~ /^@/) {
     176            $to = $self->recipient;
     177        } else {
    178178            $to = $self->sender;
     179            $cc = $self->zephyr_cc();
    179180        }
    180181    }
Note: See TracChangeset for help on using the changeset viewer.