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

NAME

Convos::Plugin::Helpers - Default helpers for Convos

DESCRIPTION

This Convos::Plugin contains default helpers for Convos.

HELPERS

backend.dialog

  $dialog = $c->backend->dialog(\%args);

Helper to retrieve a Convos::Core::Dialog object. Will use data from %args or fall back to stash. Example %args:

  {
    # Key         => Example value        # Default value
    connection_id => "irc-localhost",     # $c->stash("connection_id")
    dialog_id     => "#superheroes",      # $c->stash("connection_id")
    email         => "superwoman@dc.com", # $c->session('email')
  }

backend.user

  $user = $c->backend->user($email);
  $user = $c->backend->user;

Used to return a Convos::User object representing the logged in user or a user with email $email.

unauthorized

  $c = $c->unauthorized;

Used to render an OpenAPI response with status code 401.

METHODS

register

  $self->register($app, \%config);

Called by Convos, when registering this plugin.

SEE ALSO

Convos.