1AnyEvent::XMPP::Ext::ReUcseeirptCso(n3t)ributed Perl DocAunmyeEnvteantti:o:nXMPP::Ext::Receipts(3)
2
3
4
6 AnyEvent::XMPP::Ext::Receipts - XEP-0184 message receipts
7
9 use AnyEvent::XMPP::Ext::Disco;
10 use AnyEvent::XMPP::Ext::Receipts;
11
12 my $disco = AnyEvent::XMPP::Ext::Disco->new();
13 $xmpp->add_extension($disco);
14
15 my $receipts = AnyEvent::XMPP::Ext::Receipts->new(disco => $disco);
16 $xmpp->add_extension($receipts);
17
18 $disco->enable_feature($receipts->disco_feature);
19
21 This module adds support for XEP-0184 message receipts.
22
23 Message receipts provide a way to verify that messages were received by
24 the recipient, as long as the recipient's client supports it.
25
26 Note that you need to send messages with message receipts to full
27 Jabber IDs (e.g. jabber@example.com/android3948128), not bare Jabber
28 IDs (e.g. jabber@example.com).
29
31 new (%args)
32 Creates a new receipts handle.
33
34 The following keys can be specified:
35
36 disco
37 An "AnyEvent::XMPP::Ext::Disco" object so that it can be
38 figured out whether the recipient supports message receipts
39 (via service discovery).
40
41 This is required.
42
43 debug
44 If you pass a value that evaluates to true, debug messages will
45 be printed to STDOUT.
46
47 auto_resend
48 Amount of time in seconds after which messages will be re-sent
49 when no receipt was received. Of course messages will only be
50 re-sent if the recipient is known to support message receipts.
51
52 Defaults to 30 (seconds).
53
54 Set to 0 to disable automatic re-sending.
55
56 Here is an example with all keys set:
57
58 my $receipts = AnyEvent::XMPP::Ext::Receipts->new(
59 disco => $disco,
60 auto_resend => 30,
61 debug => 1,
62 );
63
65 Michael Stapelberg, "<michael at stapelberg.de>"
66
68 Copyright 2012 Michael Stapelberg
69
70 This program is free software; you can redistribute it and/or modify it
71 under the same terms as Perl itself.
72
73
74
75perl v5.28.0 2014-02-16 AnyEvent::XMPP::Ext::Receipts(3)