Changeset caac19d for perl


Ignore:
Timestamp:
Jun 25, 2011, 10:01:27 AM (13 years ago)
Author:
Jason Gross <jgross@mit.edu>
Children:
fe7ece2
Parents:
67b959c
git-author:
Jason Gross <jgross@mit.edu> (05/23/11 19:23:05)
git-committer:
Jason Gross <jgross@mit.edu> (06/25/11 10:01:27)
Message:
Improved ability to delete messages from perl

BarnOwl::Message now has a delete_and_expunge command, and
BarnOwl::queue_message returns the queued message, so that deletion
actually works; there used to be no way to get the id of a queued
message, and so ->delete() didn't actually do anything...
Location:
perl/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • perl/lib/BarnOwl.pm

    rbcde7926 rcaac19d  
    105105Enqueue a message in the BarnOwl message list, logging it and
    106106processing it appropriately. C<MESSAGE> should be an instance of
    107 BarnOwl::Message or a subclass.
     107BarnOwl::Message or a subclass.  Returns the queued message.  This
     108is useful for, e.g., deleting a message from the message list.
    108109
    109110=head2 admin_message HEADER BODY
  • perl/lib/BarnOwl/Message.pm

    rd1ae4a4 rcaac19d  
    8181sub short_personal_context { return ""; }
    8282
     83sub delete_and_expunge {
     84    my ($m) = @_;
     85    &BarnOwl::command("delete-and-expunge --quiet --id " . $m->id);
     86}
     87
    8388sub delete {
    8489    my ($m) = @_;
Note: See TracChangeset for help on using the changeset viewer.