Changeset a130fc5


Ignore:
Timestamp:
Jul 9, 2011, 4:11:45 PM (13 years ago)
Author:
Jason Gross <jgross@mit.edu>
Branches:
master, release-1.10, release-1.8, release-1.9
Children:
176d2c75, 4168fb8, 220db88, 820e852, 4bf2a11, 976e58a
Parents:
efeec7f
git-author:
Jason Gross <jgross@mit.edu> (05/23/11 19:23:05)
git-committer:
Jason Gross <jgross@mit.edu> (07/09/11 16:11:45)
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...
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • perl/lib/BarnOwl.pm

    r785ee77 ra130fc5  
    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 ra130fc5  
    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) = @_;
  • perlglue.xs

    rce68f23 ra130fc5  
    143143                g_free(rv);
    144144
    145 void
     145SV *
    146146queue_message(msg)
    147147        SV *msg
     
    157157
    158158                owl_global_messagequeue_addmsg(&g, m);
    159         }
     159
     160                RETVAL = owl_perlconfig_message2hashref(m);
     161        }
     162        OUTPUT:
     163                RETVAL
    160164
    161165void
Note: See TracChangeset for help on using the changeset viewer.