replaced usage of deprecated iq result on send. Fixed old send result to use stanzas instead of ElementTree

This commit is contained in:
Nathan Fritz
2010-04-07 23:10:32 -07:00
parent 935ee4d14e
commit ecd5a172ed
9 changed files with 23 additions and 22 deletions

View File

@@ -51,7 +51,7 @@ class gmail_notify(base.base_plugin):
iq.attrib['from'] = self.xmpp.fulljid
iq.attrib['to'] = self.xmpp.jid
self.xmpp.makeIqQuery(iq, 'google:mail:notify')
emails = self.xmpp.send(iq, self.xmpp.makeIq(self.xmpp.id))
emails = iq.send()
mailbox = emails.find('{google:mail:notify}mailbox')
total = int(mailbox.get('total-matched', 0))
logging.info("%s New Gmail Messages" % total)