Software /
code /
prosody-modules
Comparison
mod_smacks/README.md @ 6025:a5fff4995862
mod_smacks: Obsolete this module, it is included in Prosody since 0.12
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sun, 27 Oct 2024 13:14:25 +0100 |
parent | 6002:5a65a632d5b9 |
comparison
equal
deleted
inserted
replaced
6024:fc607d79765a | 6025:a5fff4995862 |
---|---|
4 labels: | 4 labels: |
5 - 'Stage-Obsolete' | 5 - 'Stage-Obsolete' |
6 ... | 6 ... |
7 | 7 |
8 Since Prosody 0.12, this module is [included in Prosody](https://prosody.im/doc/modules/mod_smacks). | 8 Since Prosody 0.12, this module is [included in Prosody](https://prosody.im/doc/modules/mod_smacks). |
9 | |
10 #Introduction | |
11 | |
12 By default XMPP is as reliable as your network is. Unfortunately in some | |
13 cases that is not very reliable - in some network conditions disconnects | |
14 can be frequent and message loss can occur. | |
15 | |
16 To overcome this, XMPP has an optional extension (XEP-0198: Stream | |
17 Management) which, when supported by both the client and server, can | |
18 allow a client to resume a disconnected session, and prevent message | |
19 loss. | |
20 | |
21 #Details | |
22 | |
23 When using XEP-0198 both the client and the server keep a queue of the | |
24 most recently sent stanzas - this is cleared when the other end | |
25 acknowledges they have received the stanzas. If the client disconnects, | |
26 instead of marking the user offline the server pretends the client is | |
27 still online for a short (configurable) period of time. If the client | |
28 reconnects within this period, any stanzas in the queue that the client | |
29 did not receive are re-sent. | |
30 | |
31 If the client fails to reconnect before the timeout it will be marked as | |
32 offline like prosody does on disconnect without mod_smacks. | |
33 If the client is the last one for this jid, all message stanzas are added to | |
34 the offline store and all other stanzas stanzas are returned with an | |
35 "recipient-unavailable" error. If the client is not the last one with an | |
36 open smacks session, *all* stanzas are returned with an "recipient-unavailable" error. | |
37 | |
38 If you deliberately disabled [mod_offline], all message stanzas of the last client | |
39 are also returned with an "recipient-unavailable" error, because the can not be | |
40 added to the offline storage. | |
41 If you don't want this behaviour you can use [mod_nooffline_noerror] to suppress the error. | |
42 This is generally only advisable, if you are sure that all your clients are using MAM! | |
43 | |
44 This module also provides some events used by [mod_cloud_notify]. | |
45 These events are: "smacks-ack-delayed", "smacks-hibernation-start" and | |
46 "smacks-hibernation-end". See [mod_cloud_notify] for details on how this | |
47 events are used there. | |
48 | |
49 Use prosody 0.10+ to have per user limits on allowed sessions in hibernation | |
50 state and allowed sessions for which the h-value is kept even after the | |
51 hibernation timed out. | |
52 These are settable using `smacks_max_hibernated_sessions` and `smacks_max_old_sessions`. | |
53 | |
54 #Configuration | |
55 | |
56 Option Default Description | |
57 ---------------------------------- ----------------- ------------------------------------------------------------------------------------------------------------------ | |
58 `smacks_hibernation_time` 600 (10 minutes) The number of seconds a disconnected session should stay alive for (to allow reconnect) | |
59 `smacks_enabled_s2s` true Enable Stream Management on server connections? *Experimental* | |
60 `smacks_s2s_resend` false Attempt to re-send unacked messages on s2s disconnect *Experimental* | |
61 `smacks_max_unacked_stanzas` 0 How many stanzas to send before requesting acknowledgement | |
62 `smacks_max_ack_delay` 30 (1/2 minute) The number of seconds an ack must be unanswered to trigger an "smacks-ack-delayed" event | |
63 `smacks_max_hibernated_sessions` 10 The number of allowed sessions in hibernated state (limited per user) | |
64 `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) | |
65 | |
66 #Compatibility | |
67 | |
68 ------- ------- | |
69 trunk Works | |
70 0.11 Works | |
71 ------- ------- | |
72 | |
73 | |
74 #Clients | |
75 | |
76 Clients that support [XEP-0198]: | |
77 | |
78 - Gajim (Linux, Windows, OS X) | |
79 - Conversations (Android) | |
80 - ChatSecure (iOS) | |
81 - Swift (but not resumption, as of version 2.0 and alphas of 3.0) | |
82 - Psi (in an unreleased branch) | |
83 - Yaxim (Android) | |
84 - Monal (iOS) | |
85 | |
86 [7693724881b3]: //hg.prosody.im/prosody-modules/raw-file/7693724881b3/mod_smacks/mod_smacks.lua | |
87 [mod_offline]: //modules.prosody.im/mod_offline | |
88 [mod_nooffline_noerror]: //modules.prosody.im/mod_nooffline_noerror | |
89 [mod_cloud_notify]: //modules.prosody.im/mod_cloud_notify |