Commit 98216410 authored by Philipp Hörist's avatar Philipp Hörist
Browse files

Presence: Use log_calls decorator

parent d2e8aae7
Pipeline #7519 passed with stages
in 5 minutes and 5 seconds
......@@ -25,6 +25,7 @@ from nbxmpp.util import error_factory
from nbxmpp.const import PresenceType
from nbxmpp.const import PresenceShow
from nbxmpp.modules.base import BaseModule
from nbxmpp.modules.util import log_calls
class BasePresence(BaseModule):
......@@ -93,15 +94,19 @@ class BasePresence(BaseModule):
self._log.warning(stanza)
return PresenceShow.ONLINE
@log_calls
def unsubscribe(self, jid):
self.send(jid=jid, typ='unsubscribe')
@log_calls
def unsubscribed(self, jid):
self.send(jid=jid, typ='unsubscribed')
@log_calls
def subscribed(self, jid):
self.send(jid=jid, typ='subscribed')
@log_calls
def subscribe(self, jid, status=None, nick=None):
self.send(jid=jid, typ='subscribe', status=status, nick=nick)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment