treebird/perl/postbox.pm
nekobit 50b0404c51 Fix timelines
FossilOrigin-Name: db1f2c1597a362e40bc65c39daf079ee51091bba653e721a9ac4e918bad95d61
2022-08-04 05:00:13 +00:00

27 lines
529 B
Perl

package postbox;
use strict;
use warnings;
use template_helpers 'to_template';
use string_helpers qw( get_mentions_from_content );
use Exporter 'import';
our @EXPORT = qw( generate_postbox );
use icons 'get_icon';
sub generate_postbox
{
my ($ssn, $data, $status) = @_;
my %vars = (
prefix => '',
ssn => $ssn,
data => $data,
status => $status,
icon => \&get_icon,
mentionify => \&get_mentions_from_content,
);
to_template(\%vars, \$data->{'postbox.tt'});
}