From 51695693ece7f291f804294819956930548229ea Mon Sep 17 00:00:00 2001 From: Jan Kaluza Date: Sat, 20 Feb 2016 21:58:10 +0100 Subject: [PATCH] Documentation: Document web_url and web_directory --- documentation/admin.md | 1 + documentation/backends/libpurple.md | 4 +++ documentation/configuration/config_file.md | 32 ++++++++++++++++++++++ documentation/configuration/web_storage.md | 13 +++++++++ 4 files changed, 50 insertions(+) create mode 100644 documentation/configuration/web_storage.md diff --git a/documentation/admin.md b/documentation/admin.md index ded7e323..6545cff9 100644 --- a/documentation/admin.md +++ b/documentation/admin.md @@ -42,6 +42,7 @@ This is Admin documentation for Spectrum 2 transport. If you are user trying to * [MySQL Support](configuration/mysql.html) * [PostgreSQL Support](configuration/postgresql.html) * [Logging](configuration/logging.html) +* [Web storage](configuration/web_storage.html); #### Management diff --git a/documentation/backends/libpurple.md b/documentation/backends/libpurple.md index 4aebca4c..ebe7021e 100644 --- a/documentation/backends/libpurple.md +++ b/documentation/backends/libpurple.md @@ -39,6 +39,10 @@ prpl-skypeweb| [https://github.com/EionRobb/skype4pidgin/tree/master/skypeweb](w These plugins are included by default in our Docker image. +### Support for Facebook stickers + +Facebook stickers are supported using [Web Storage](../configuration/web_storage.html). + ### Setting libpurple plugins configurations Some libpurple protocol plugins allow setting configuration variables. Spectrum 2 passes every variable set in `purple` section to libpurple library. If you need to set such options, you can do it for example like this in your configuration file: diff --git a/documentation/configuration/config_file.md b/documentation/configuration/config_file.md index 7cc1e657..7a1a167d 100644 --- a/documentation/configuration/config_file.md +++ b/documentation/configuration/config_file.md @@ -39,10 +39,13 @@ title: Spectrum 2 > * [pidfile](#servicepidfile) > * [user](#serviceuser) > * [users_per_backend](#servicusersperbackend) +> * [web_directory](#servicewebdirectory) +> * [web_url](#serviceweburl) > * [working_dir](#serviceworkingdir) + ### Types of configuration fields Following types are used: @@ -376,6 +379,35 @@ get his own separated backend process. For bigger user-base, you have to increase the `service.users_per_backend` value, but there is no optimal value to be suggested yet. +#### service.web_directory + +Key | val +----|---- +Description:|Full path to directory used to save files to which the links are sent to users. +Context:|server-mode and gateway-mode +Type:|string +Default:| + +When Spectrum 2 has some image or file for the user and this option is set, the image or file is stored in this directory and +and link based on `service.web_url` is sent to the user so he can download the file. + +You can read more about this configuration on [Web Storage page](web_storage.html). + +#### service.web_url + +Key | val +----|---- +Description:|URL on which files in `service.web_directory` are accessible. +Context:|server-mode and gateway-mode +Type:|string +Default:| + +When Spectrum 2 has some image or file for the user and this option is set, the image or file is stored in the `service.web_directory` directory and +and link based on `service.web_url` is sent to the user so he can download the file. + +You can read more about this configuration on [Web Storage page](web_storage.html). + + #### service.working_dir Key | val diff --git a/documentation/configuration/web_storage.md b/documentation/configuration/web_storage.md new file mode 100644 index 00000000..9b0b9036 --- /dev/null +++ b/documentation/configuration/web_storage.md @@ -0,0 +1,13 @@ +--- +layout: page +title: Spectrum 2 +--- + +### Web Storage + +Web storage is used to send images and files received by Spectrum 2 to end user. When new image or file is downloaded from the 3rd-party network, it is stored into `service.web_directory` directory +and the link to that file, based on `service.web_url`, is sent to the user. + +That means that you should configure the web-server on the machine where you run Spectrum 2 to serve `service.web_directory`. + +If you for example use httpd, you can configure `service.web_directory=/var/www/html/spectrum2`. In that case, the matching `service.web_url` value will be `service.web_url=http://domain.tld/spectrum2`.