Convos::Core::Settings - Convos settings

  1. DESCRIPTION
  2. ATTRIBUTES
    1. base_url
    2. contact
    3. core
    4. default_connection
    5. forced_connection
    6. local_secret
    7. open_to_public
    8. organization_name
    9. organization_url
    10. session_secrets
    11. uri
    12. video_service
  3. METHODS
    1. default_connection_safe
    2. id
    3. load_p
    4. public_attributes
    5. save_p
  4. SEE ALSO

DESCRIPTION

Convos::Core::Settings is a class used to model Convos server settings.

ATTRIBUTES

base_url

$url = $settings->base_url;

Holds a Mojo::URL object that holds the public location of this Convos instance.

contact

$str = $settings->contact;
$settings = $settings->contact("mailto:root@localhost");

Holds a string with an URL to where the Convos admin can be contacted.

core

$obj = $settings->core;

Holds a Convos::Core object.

default_connection

$url = $settings->default_connection;
$settings = $settings->default_connection(Mojo::URL->new("irc://..."));

Holds a Mojo::URL object with the default connection URL. Default value is "irc://irc.libera.chat:6697/%23convos". (Subject to change)

forced_connection

$bool = $settings->forced_connection;
$settings = $settings->forced_connection(Mojo::JSON::true);

True if this instance of Convos can only connect to the "default_connection".

local_secret

$str = $settings->local_secret;

Holds a local password/secret that can be used to run admin actions from localhost.

open_to_public

$bool = $settings->open_to_public;
$settings = $settings->open_to_public(Mojo::JSON::true);

True if users can register without an invite link.

organization_name

$str = $settings->organization_name;
$settings = $settings->organization_name("Convos");

Can be used to customize the title and sidebars.

organization_url

$url = $settings->organization_url;
$settings = $settings->organization_url(Mojo::URL->new("https://..."));

Will be used together with a custom "organization_name" to add links to your organization in the Convos UI.

session_secrets

$array_ref = $settings->session_secrets;

A list of strings used to make the session cookie safe. See also "secrets" in Mojolicious for a longer description.

uri

$path = $settings->uri;

Holds a Mojo::Path object, with the URI to where this object should be stored.

video_service

$str = $settings->video_service;
$settings = $settings->video_service("https://meet.jit.si/");

METHODS

default_connection_safe

$url = $settings->default_connection_safe;

Returns "default_connection", but without any channel password.

id

$str = $settings->id;

Always returns "settings". Used by Convos::Core::Backend::File and friends.

load_p

$p = $settings->load_p;

Will save "ATTRIBUTES" to persistent storage. See "save_object" in Convos::Core::Backend for details.

public_attributes

@attr_names = $settings->public_attributes;

Returns a list of "ATTRIBUTES" that are considered open_to_public. Currently that is: "contact", "open_to_public", "organization_name" and "organization_url".

save_p

$p = $settings->save_p(\%attributes);

Will save "ATTRIBUTES" to persistent storage. %attributes is optional, but willl be used to change the public "ATTRIBUTES".

See "save_object" in Convos::Core::Backend for details.

SEE ALSO

Convos.