plugin XEP-0431: Fulltext Search for MAM implementation
This commit is contained in:
parent
f69eb56a02
commit
247589aedc
1 changed files with 4 additions and 1 deletions
|
|
@ -43,7 +43,8 @@ PLUGIN_INFO = {
|
|||
C.PI_NAME: "Message Archive Management",
|
||||
C.PI_IMPORT_NAME: "XEP-0313",
|
||||
C.PI_TYPE: "XEP",
|
||||
C.PI_PROTOCOLS: ["XEP-0313"],
|
||||
# XEP-0431 only defines a namespace, so we register it here
|
||||
C.PI_PROTOCOLS: ["XEP-0313", "XEP-0431"],
|
||||
C.PI_DEPENDENCIES: ["XEP-0059", "XEP-0359"],
|
||||
C.PI_MAIN: "XEP_0313",
|
||||
C.PI_HANDLER: "yes",
|
||||
|
|
@ -55,6 +56,7 @@ FILTER_PREFIX = MAM_PREFIX + "filter_"
|
|||
KEY_LAST_STANZA_ID = "last_stanza_id"
|
||||
MESSAGE_RESULT = "/message/result[@xmlns='{mam_ns}' and @queryid='{query_id}']"
|
||||
MESSAGE_STANZA_ID = '/message/stanza-id[@xmlns="{ns_stanza_id}"]'
|
||||
NS_FTS = "urn:xmpp:fulltext:0"
|
||||
|
||||
|
||||
class XEP_0313(object):
|
||||
|
|
@ -62,6 +64,7 @@ class XEP_0313(object):
|
|||
log.info(_("Message Archive Management plugin initialization"))
|
||||
self.host = host
|
||||
self.host.registerNamespace("mam", mam.NS_MAM)
|
||||
host.registerNamespace("fulltextmam", NS_FTS)
|
||||
self._rsm = host.plugins["XEP-0059"]
|
||||
self._sid = host.plugins["XEP-0359"]
|
||||
# Deferred used to store last stanza id in order of reception
|
||||
|
|
|
|||
Loading…
Reference in a new issue