If the "captcha_host" is specified without "http://" or "https://"
prefix, ejabberd_captcha tries to figure out the protocol automatically.
Fix the code that parses the listener configuration in order to do that.
As a small optimization, use io:format's "B" control sequence to format
integers. We don't need to let Erlang figure out the data type if we
already know it.
Include fractions of a second with XEP-0203 <delay/> timestamps, as
specified in XEP-0082.
Old timestamp: 2014-05-19T11:55:00Z
New timestamp: 2014-05-19T11:55:00.123Z
When an unacknowledged stanza is resent from the Stream Management
queue, add a timestamp so that the receiving client can display the time
at which the stanza was originally sent.
Provide a simpler interface for adding <delay/> and <x/> timestamps to
stanzas. This also makes sure that only one <delay/> tag and one <x/>
tag is added to a given stanza.
When a contact becomes available, usually both the 'caps_update' hook
and the 'presence_probe_hook' are called. For remote contacts, both
hooks triggered PEP notifications, so each item was sent twice. Fix
this by ignoring the 'presence_probe_hook' for remote contacts.
When a config relative path specified, get_absolute_path would not
return an absolute path. The patch fixed it using current working
home as base directory.
Signed-off-by: Gu Feng <flygoast@126.com>
When a remote subscriber becomes available, send him the last published
PEP items, as we do for local subscribers.
However, the current implementation depends on a running ejabberd_c2s
process of the publisher to send items to remote subscribers. So, for
those, the behavior is always like it is for local subscribers when
"ignore_pep_from_offline" is set to "true".
A while back, mod_pubsub was modified to address EJAB-1456. However,
the change was only partially applied to mod_pubsub_odbc. This commit
adds the remaining part.
When multiple resources have the same (highest) priority, the session
manager routes messages sent to their bare JID to each of these
resources. When another resource has a lower priority but receives
carbon copies, make sure it won't receive multiple copies of such
messages.
According to XEP-0054, if no vCard exists, the server MUST return a stanza
error (which SHOULD be <item-not-found/>) or an IQ-result containing an
empty <vCard/> element.
Signed-off-by: Gu Feng <flygoast@126.com>
Terminate the ejabberd_c2s process immediately once stanza queue
overflow is detected. This makes sure the FSM won't process additional
stanzas before terminating if the recipient is flooded.