core: minor style/typos fixes

This commit is contained in:
Goffi 2018-12-01 10:04:17 +01:00
commit a29893ac1f

View file

@ -34,8 +34,6 @@ from zope.interface import implements
from twisted.words.xish import domish
NS_SF = C.NS_FORWARD
PLUGIN_INFO = {
C.PI_NAME: u"Stanza Forwarding",
C.PI_IMPORT_NAME: u"XEP-0297",
@ -51,7 +49,7 @@ class XEP_0297(object):
# FIXME: check this implementation which doesn't seems to be used
def __init__(self, host):
log.info(_("Stanza Forwarding plugin initialization"))
log.info(_(u"Stanza Forwarding plugin initialization"))
self.host = host
def getHandler(self, client):
@ -95,7 +93,7 @@ class XEP_0297(object):
if body:
body_elt.addContent(body)
forwarded_elt = domish.Element((NS_SF, "forwarded"))
forwarded_elt = domish.Element((C.NS_FORWARD, "forwarded"))
delay_elt = self.host.plugins["XEP-0203"].delay(stamp)
forwarded_elt.addChild(delay_elt)
if not stanza.uri: # None or ''
@ -118,7 +116,7 @@ class XEP_0297_handler(XMPPHandler):
self.profile = profile
def getDiscoInfo(self, requestor, target, nodeIdentifier=""):
return [disco.DiscoFeature(NS_SF)]
return [disco.DiscoFeature(C.NS_FORWARD)]
def getDiscoItems(self, requestor, target, nodeIdentifier=""):
return []