comparison src/plugins/plugin_xep_0184.py @ 2145:33c8c4973743

core (plugins): added missing contants + use of new constants in PLUGIN_INFO
author Goffi <goffi@goffi.org>
date Sun, 12 Feb 2017 18:59:10 +0100
parents 1d3f73e065e1
children
comparison
equal deleted inserted replaced
2144:1d3f73e065e1 2145:33c8c4973743
15 # GNU Affero General Public License for more details. 15 # GNU Affero General Public License for more details.
16 16
17 # You should have received a copy of the GNU Affero General Public License 17 # You should have received a copy of the GNU Affero General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. 18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 from sat.core.i18n import _ 19 from sat.core.i18n import _
20 from sat.core.constants import Const as C
20 from sat.core.log import getLogger 21 from sat.core.log import getLogger
21 from twisted.internet import reactor 22 from twisted.internet import reactor
22 from twisted.words.protocols.jabber import xmlstream, jid 23 from twisted.words.protocols.jabber import xmlstream, jid
23 from twisted.words.xish import domish 24 from twisted.words.xish import domish
24 log = getLogger(__name__) 25 log = getLogger(__name__)
48 PARAM_NAME = "Enable message delivery receipts" 49 PARAM_NAME = "Enable message delivery receipts"
49 ENTITY_KEY = PARAM_KEY + "_" + PARAM_NAME 50 ENTITY_KEY = PARAM_KEY + "_" + PARAM_NAME
50 51
51 52
52 PLUGIN_INFO = { 53 PLUGIN_INFO = {
53 "name": "XEP-0184 Plugin", 54 C.PI_NAME: "XEP-0184 Plugin",
54 "import_name": "XEP-0184", 55 C.PI_IMPORT_NAME: "XEP-0184",
55 "type": "XEP", 56 C.PI_TYPE: "XEP",
56 "protocols": ["XEP-0184"], 57 C.PI_PROTOCOLS: ["XEP-0184"],
57 "dependencies": [], 58 C.PI_DEPENDENCIES: [],
58 "main": "XEP_0184", 59 C.PI_MAIN: "XEP_0184",
59 "handler": "yes", 60 C.PI_HANDLER: "yes",
60 "description": _("""Implementation of Message Delivery Receipts""") 61 C.PI_DESCRIPTION: _("""Implementation of Message Delivery Receipts""")
61 } 62 }
62 63
63 64
64 STATUS_MESSAGE_DELIVERY_RECEIVED = "delivered" 65 STATUS_MESSAGE_DELIVERY_RECEIVED = "delivered"
65 TEMPO_DELETE_WAITING_ACK_S = 300 # 5 min 66 TEMPO_DELETE_WAITING_ACK_S = 300 # 5 min