The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Convos::Plugin::Helpers - Mojo's little helpers

HELPERS

active_class

Will add "active" class to a link based on url

id_as

See "id_as" in Convos::Core::Util.

as_id

See "as_id" in Convos::Core::Util.

conversation_list

Will render the conversation list for all conversations.

day_changed

  $bool = $c->day_changed($epoch_now, $epoch_prev);

Returns true if day has changed between two events.

format_conversation

  $c->format_conversation(\&iterator, \&callback);

Takes a list of JSON strings and turns them into a list of hash-refs where the "message" key contains a formatted version with HTML and such. The result will be passed on to the $callback.

logf

See "logf" in Convos::Core::Util.

redis

Returns a Mojo::Redis object.

notification_list

Will render notifications.

send_partial

Will render "partial" and send the result.

timestamp

Returns a "<div>" tag with a timestamp.

redirect_last

Redirect to the last visited channel for $login. Falls back to settings.

METHODS

register

Will register the "HELPERS" above.

AUTHOR

Jan Henning Thorsen - jhthorsen@cpan.org