Ignore:
Timestamp:
Sep 20, 2011, 11:15:31 PM (10 years ago)
Author:
Edward Z. Yang <ezyang@mit.edu>
Branches:
master, release-1.9
Children:
65c2b3c
Parents:
eb20731
git-author:
Edward Z. Yang <ezyang@mit.edu> (06/22/11 18:30:55)
git-committer:
Edward Z. Yang <ezyang@mit.edu> (09/20/11 23:15:31)
Message:
Add autocomplete and wall-posting support.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perl/modules/Facebook/lib/BarnOwl/Module/Facebook.pm

    reb497a9 r8b62088  
    123123sub cmd_facebook {
    124124    my $cmd = shift;
    125     BarnOwl::start_edit_win("What's on your mind?", sub{ facebook(shift) });
    126     # User prompt for other person's wall is "Write something..." which
    127     # we will ostensibly check for soon.
     125    my $user = shift;
     126
     127    BarnOwl::start_edit_win(
     128        defined $user ? "Write something to $user..." : "What's on your mind?",
     129        sub{ facebook($user, shift) }
     130    );
    128131}
    129132
     
    156159BarnOwl::filter(qw{facebook type ^facebook$});
    157160
     161# Autocompletion support
     162
     163sub complete_user { return keys %{$facebook_handle->{friends}}; }
     164BarnOwl::Completion::register_completer(facebook => sub { complete_user(@_) });
     165
    1581661;
Note: See TracChangeset for help on using the changeset viewer.