Changeset bc8275e


Ignore:
Timestamp:
Jun 2, 2009, 6:36:17 PM (16 years ago)
Author:
Alex Dehnert <adehnert@mit.edu>
Branches:
master, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
fc92548d
Parents:
8daf504
Message:
Fix replycmd to use right class/instance

Replies to personals, login messages, etc.
should not use the message's class. Fixes
bug introduced by 62236380ee077b92.
File:
1 edited

Legend:

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

    ree183be rbc8275e  
    8181# Portion of the reply command that preserves the context
    8282sub context_reply_cmd {
    83     my $m = shift;
     83    my $mclass = shift;
     84    my $minstance = shift;
    8485    my $class = "";
    85     if (lc($m->class) ne "message") {
    86         $class = "-c " . BarnOwl::quote($m->class);
     86    if (lc($mclass) ne "message") {
     87        $class = "-c " . BarnOwl::quote($mclass);
    8788    }
    8889    my $instance = "";
    89     if (lc($m->instance) ne "personal") {
    90         $instance = "-i " . BarnOwl::quote($m->instance);
     90    if (lc($minstance) ne "personal") {
     91        $instance = "-i " . BarnOwl::quote($minstance);
    9192    }
    9293    if (($class eq "") or  ($instance eq "")) {
     
    99100sub personal_context {
    100101    my ($m) = @_;
    101     return $m->context_reply_cmd();
     102    return context_reply_cmd($m->class, $m->instance);
    102103}
    103104
     
    184185    }
    185186
    186     my $context_part = $self->context_reply_cmd();
     187    my $context_part = context_reply_cmd($class, $instance);
    187188    $cmd .= " " . $context_part unless ($context_part eq '');
    188189    if ($to ne '') {
Note: See TracChangeset for help on using the changeset viewer.