# HG changeset patch # User Matthew Wild # Date 1599828752 -3600 # Node ID dd00a2b9927c65b26190bacdb93a2c575edd9c9a # Parent a2116f5a7c8f1efe033585289d1ea46968c26814 mod_invites_page: New module to generate landing page for invites diff -r a2116f5a7c8f -r dd00a2b9927c mod_invites_page/README.markdown --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mod_invites_page/README.markdown Fri Sep 11 13:52:32 2020 +0100 @@ -0,0 +1,53 @@ +--- +labels: +- 'Stage-Beta' +summary: 'Generate friendly web page for invitations' +... + +Introduction +============ + +This module is part of the suite of modules that implement invite-based +account registration for Prosody. The other modules are: + +- mod_invites +- mod_invites_adhoc +- mod_invites_register +- mod_invites_register_web +- mod_register_apps + +For details and a full overview, start with the mod_invites documentation. + +Details +======= + +mod_invites_page provides a unique web page for each generated invitation. +Without this module, Prosody will only be able to generate invite links as +`xmpp:` URIs (they look something like `xmpp:example.com?register;preauth=29Xbxr91`). +URIs will only work if the invited user already has an XMPP client installed. +This is usually not the case. + +This module transforms the URI into a friendly web page that can be shared +via any method (email, SMS, etc.), and opened in any browser. The page explains +the invitation and guides the user to set up their account using one of a +configurable list of XMPP clients (to configure the list, see mod_register_apps +documentation). + +Configuration +============= + +| Name | Description | Default | +|---------------------------|--------------------------------------------------------------------------------|------------------------------------------------------------| +| invites_page | The format of an invite page URL (must begin with `https://`) | `"https://{host}:5281/invites_page?{invite.token}"` | +| invites_registration_page | The format of an invite registration page URL (may be relative to invites_page)| `"register?t={invite.token}&c={app.id}"` | +| | | site_name | The friendly name of the server| `"example.com"` | + +The `invites_page` and `invites_registration_page` options are templates +that support a number of variables. The most useful being `{host}` and +`{invite.token}`. + +All the usual [HTTP configuration options](https://prosody.im/doc/http) +can be used to configure this module. In particular, if you run Prosody +behind a reverse proxy such as nginx or Apache, you will probably want +to set `http_external_url` so that Prosody knows what URLs should look +like for users. diff -r a2116f5a7c8f -r dd00a2b9927c mod_invites_page/copyright --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mod_invites_page/copyright Fri Sep 11 13:52:32 2020 +0100 @@ -0,0 +1,19 @@ +The file static/illus-empty.svg is included under the following +license: + +Copyright 2020 Katerina Limpitsouni + +All images, assets and vectors published on unDraw can be used for free. +You can use them for noncommercial and commercial purposes. You do not +need to ask permission from or provide credit to the creator or unDraw. + +More precisely, unDraw grants you an nonexclusive, worldwide copyright +license to download, copy, modify, distribute, perform, and use the +assets provided from unDraw for free, including for commercial purposes, +without permission from or attributing the creator or unDraw. This +license does not include the right to compile assets, vectors or images +from unDraw to replicate a similar or competing service, in any form or +distribute the assets in packs or otherwise. This extends to automated +and non-automated ways to link, embed, scrape, search or download the +assets included on the website without our consent. + diff -r a2116f5a7c8f -r dd00a2b9927c mod_invites_page/html/client.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mod_invites_page/html/client.html Fri Sep 11 13:52:32 2020 +0100 @@ -0,0 +1,136 @@ + + + + + + Invite to {site_name} + + + + + + + + + + +
+
+
+

+ Join {site_name} with {app.name}
+

+
+
+ Tip: You can open this invite + on your mobile device by scanning a barcode with + your camera. + + + +
+ + {inviter?

You have been invited to chat on {site_name} using XMPP, + a secure and decentralized messaging network.

} + + {inviter&

You have been invited to chat with {inviter} on {site_name}, + part of the XMPP secure and decentralized messaging network.

} + +

You can start chatting right away with {app.name}. Let's get started!

+ +
+
+
+ {app.imagetext?} +
+
+
+
{app.name}
+
+ {app.platforms#{item} } +
+

{app.text}

+ +
+
+
+
+ +

Step 1: Install {app.name}

+ +

{app.download.text?Download·and·install·{app.name}·below:}

+ +
+ {app.download.buttons# + {item.image& + + + + } + {item.text& + + + + } + } +
+ +

After successfully installing {app.name}, come back to this page and continue with Step 2.

+ +

Step 2: Activate your account

+ +

Installed ok? Great! Click or tap the button below to accept your invite and continue with your account setup:

+ +
+
+
+ +

After clicking the button you will be taken to {app.name} to finish setting up your new {site_name} account.

+
+
+
+ +