# HG changeset patch # User tmolitor # Date 1586122637 -7200 # Node ID 0957ba6aeb9907cebdea08b6d5bbc53c11d0e03c # Parent a411a8e028edfbffdbaced7f8b976586180c4f4d mod_smacks: Update documentation and slightly adjust default values diff -r a411a8e028ed -r 0957ba6aeb99 mod_smacks/README.markdown --- a/mod_smacks/README.markdown Sat Mar 21 23:50:34 2020 +0100 +++ b/mod_smacks/README.markdown Sun Apr 05 23:37:17 2020 +0200 @@ -27,12 +27,18 @@ reconnects within this period, any stanzas in the queue that the client did not receive are re-sent. -If the client fails to reconnect before the timeout then it is marked -offline as normal, and any stanzas in the queue are returned to the -sender as a "recipient-unavailable" error. +If the client fails to reconnect before the timeout it will be marked as +offline like prosody does on disconnect without mod_smacks. +If the client is the last one for this jid, all message stanzas are added to +the offline store and all other stanzas stanzas are returned with an +"recipient-unavailable" error. If the client is not the last one with an +open smacks session, *all* stanzas are returned with an "recipient-unavailable" error. -If you don't want this behaviour on timeout you can use [mod_smacks_offline] -or [mod_smacks_noerror] to customize the behaviour further. +If you deliberately disabled [mod_offline], all message stanzas of the last client +are also returned with an "recipient-unavailable" error, because the can not be +added to the offline storage. +If you don't want this behaviour you can use [mod_nooffline_noerror] to suppress the error. +This is generally only advisable, if you are sure that all your clients are using MAM! This module also provides some events used by [mod_cloud_notify]. These events are: "smacks-ack-delayed", "smacks-hibernation-start" and @@ -49,10 +55,10 @@ Option Default Description ---------------------------------- ----------------- ------------------------------------------------------------------------------------------------------------------ - `smacks_hibernation_time` 300 (5 minutes) The number of seconds a disconnected session should stay alive for (to allow reconnect) + `smacks_hibernation_time` 600 (10 minutes) The number of seconds a disconnected session should stay alive for (to allow reconnect) `smacks_enabled_s2s` false Enable Stream Management on server connections? *Experimental* `smacks_max_unacked_stanzas` 0 How many stanzas to send before requesting acknowledgement - `smacks_max_ack_delay` 60 (1 minute) The number of seconds an ack must be unanswered to trigger an "smacks-ack-delayed" event + `smacks_max_ack_delay` 30 (1/2 minute) The number of seconds an ack must be unanswered to trigger an "smacks-ack-delayed" event `smacks_max_hibernated_sessions` 10 The number of allowed sessions in hibernated state (limited per user) `smacks_max_old_sessions` 10 The number of allowed sessions with timed out hibernation for which the h-value is still kept (limited per user) @@ -80,6 +86,6 @@ - Monal (iOS) [7693724881b3]: //hg.prosody.im/prosody-modules/raw-file/7693724881b3/mod_smacks/mod_smacks.lua -[mod_smacks_offline]: //modules.prosody.im/mod_smacks_offline -[mod_smacks_noerror]: //modules.prosody.im/mod_smacks_noerror +[mod_offline]: //modules.prosody.im/mod_offline +[mod_nooffline_noerror]: //modules.prosody.im/mod_nooffline_noerror [mod_cloud_notify]: //modules.prosody.im/mod_cloud_notify diff -r a411a8e028ed -r 0957ba6aeb99 mod_smacks/mod_smacks.lua --- a/mod_smacks/mod_smacks.lua Sat Mar 21 23:50:34 2020 +0100 +++ b/mod_smacks/mod_smacks.lua Sun Apr 05 23:37:17 2020 +0200 @@ -34,11 +34,11 @@ local sm2_attr = { xmlns = xmlns_sm2 }; local sm3_attr = { xmlns = xmlns_sm3 }; -local resume_timeout = module:get_option_number("smacks_hibernation_time", 300); +local resume_timeout = module:get_option_number("smacks_hibernation_time", 600); local s2s_smacks = module:get_option_boolean("smacks_enabled_s2s", false); local s2s_resend = module:get_option_boolean("smacks_s2s_resend", false); local max_unacked_stanzas = module:get_option_number("smacks_max_unacked_stanzas", 0); -local delayed_ack_timeout = module:get_option_number("smacks_max_ack_delay", 60); +local delayed_ack_timeout = module:get_option_number("smacks_max_ack_delay", 30); local max_hibernated_sessions = module:get_option_number("smacks_max_hibernated_sessions", 10); local max_old_sessions = module:get_option_number("smacks_max_old_sessions", 10); local core_process_stanza = prosody.core_process_stanza;