treebird/perl/chat.pm
nekobit ce74e7125e Chats
FossilOrigin-Name: 54a80dceb8d34d72d13ae4adc77229d8293fed346908ea4d5fdbac6c4c916b67
2022-08-17 21:35:11 +00:00

38 lines
636 B
Perl

package chat;
use strict;
use warnings;
use Exporter 'import';
our @EXPORTS = qw( content_chats );
use template_helpers 'to_template';
use string_helpers 'format_username';
sub construct_chat
{
my ($ssn, $data, $chat) = @_;
my %vars = (
prefix => '',
ssn => $ssn,
chat => $chat,
);
to_template(\%vars, \$data->{'chat.tt'});
}
sub content_chats
{
my ($ssn, $data, $chats) = @_;
my %vars = (
prefix => '',
ssn => $ssn,
chats => $chats,
format_username => \&format_username,
);
to_template(\%vars, \$data->{'content_chats.tt'});
}
1;