xep 30 and 50 always reply from jid iq sent to

This commit is contained in:
Nathan Fritz
2010-01-15 21:07:28 -08:00
parent 5345e9a46b
commit e39a2395d7
10 changed files with 71 additions and 14 deletions

View File

@@ -3,4 +3,4 @@ from . import base
class MatcherId(base.MatcherBase):
def match(self, xml):
return xml.get('id') == self._criteria
return xml['id'] == self._criteria

View File

@@ -0,0 +1,7 @@
from . import base
from xml.etree import cElementTree
class StanzaPath(base.MatcherBase):
def match(self, stanza):
return stanza.match(self._criteria)

View File

@@ -16,6 +16,7 @@ class MatchXMLMask(base.MatcherBase):
self.default_ns = ns
def match(self, xml):
xml = xml.xml
return self.maskcmp(xml, self._criteria, True)
def maskcmp(self, source, maskobj, use_ns=False, default_ns='__no_ns__'):

View File

@@ -6,6 +6,7 @@ ignore_ns = False
class MatchXPath(base.MatcherBase):
def match(self, xml):
xml = xml.xml
x = cElementTree.Element('x')
x.append(xml)
if not ignore_ns: