Simplify send_presence_subscription()
This commit is contained in:
parent
95a0e51b41
commit
f7a74d960e
1 changed files with 4 additions and 8 deletions
|
@ -551,14 +551,10 @@ class BaseXMPP(XMLStream):
|
||||||
:param ptype: The type of presence, such as ``'subscribe'``.
|
:param ptype: The type of presence, such as ``'subscribe'``.
|
||||||
:param pnick: Optional nickname of the presence's sender.
|
:param pnick: Optional nickname of the presence's sender.
|
||||||
"""
|
"""
|
||||||
presence = self.makePresence(ptype=ptype,
|
self.make_presence(ptype=ptype,
|
||||||
pfrom=pfrom,
|
pfrom=pfrom,
|
||||||
pto=self.getjidbare(pto))
|
pto=JID(pto).bare,
|
||||||
if pnick:
|
pnick=pnick).send()
|
||||||
nick = ET.Element('{http://jabber.org/protocol/nick}nick')
|
|
||||||
nick.text = pnick
|
|
||||||
presence.append(nick)
|
|
||||||
presence.send()
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def jid(self):
|
def jid(self):
|
||||||
|
|
Loading…
Reference in a new issue