diff --git a/slixmpp/plugins/xep_0196/__init__.py b/slixmpp/plugins/xep_0196/__init__.py index 89f0f89e..3a01dcb2 100644 --- a/slixmpp/plugins/xep_0196/__init__.py +++ b/slixmpp/plugins/xep_0196/__init__.py @@ -1,10 +1,7 @@ -""" - Slixmpp: The Slick XMPP Library - Copyright (C) 2012 Nathanael C. Fritz, Lance J.T. Stout - This file is part of Slixmpp. - - See the file LICENSE for copying permission. -""" +# Slixmpp: The Slick XMPP Library +# Copyright (C) 2012 Nathanael C. Fritz, Lance J.T. Stout +# This file is part of Slixmpp. +# See the file LICENSE for copying permission. from slixmpp.plugins.base import register_plugin diff --git a/slixmpp/plugins/xep_0196/stanza.py b/slixmpp/plugins/xep_0196/stanza.py index 756208b2..d676a9ad 100644 --- a/slixmpp/plugins/xep_0196/stanza.py +++ b/slixmpp/plugins/xep_0196/stanza.py @@ -1,10 +1,7 @@ -""" - Slixmpp: The Slick XMPP Library - Copyright (C) 2012 Nathanael C. Fritz, Lance J.T. Stout - This file is part of Slixmpp. - - See the file LICENSE for copying permission. -""" +# Slixmpp: The Slick XMPP Library +# Copyright (C) 2012 Nathanael C. Fritz, Lance J.T. Stout +# This file is part of Slixmpp. +# See the file LICENSE for copying permission. from slixmpp.xmlstream import ElementBase, ET diff --git a/slixmpp/plugins/xep_0196/user_gaming.py b/slixmpp/plugins/xep_0196/user_gaming.py index 623410a1..40c74e84 100644 --- a/slixmpp/plugins/xep_0196/user_gaming.py +++ b/slixmpp/plugins/xep_0196/user_gaming.py @@ -1,13 +1,11 @@ -""" - Slixmpp: The Slick XMPP Library - Copyright (C) 2011 Nathanael C. Fritz, Lance J.T. Stout - This file is part of Slixmpp. - - See the file LICENSE for copying permission. -""" +# Slixmpp: The Slick XMPP Library +# Copyright (C) 2011 Nathanael C. Fritz, Lance J.T. Stout +# This file is part of Slixmpp. +# See the file LICENSE for copying permission. import logging +from asyncio import Future from slixmpp import JID from typing import Optional, Callable from slixmpp.plugins.base import BasePlugin @@ -43,11 +41,7 @@ class XEP_0196(BasePlugin): character_name: Optional[str] = None, character_profile: Optional[str] = None, server_address: Optional[str] = None, - options: Optional[Form] = None, - ifrom: Optional[JID] = None, - callback: Optional[Callable] = None, - timeout: Optional[int] = None, - timeout_callback: Optional[Callable]=None): + **pubsubkwargs) -> Future: """ Publish the user's current gaming status. @@ -69,20 +63,19 @@ class XEP_0196(BasePlugin): gaming['character_profile'] = character_profile gaming['server_name'] = server_name gaming['server_address'] = server_address - return self.xmpp['xep_0163'].publish(gaming, - node=UserGaming.namespace, - options=options, ifrom=ifrom, - callback=callback, timeout=timeout, - timeout_callback=timeout_callback) + return self.xmpp['xep_0163'].publish( + gaming, + node=UserGaming.namespace, + **pubsubkwargs + ) - def stop(self, ifrom=None, callback=None, timeout=None, - timeout_callback=None): + def stop(self, **pubsubkwargs) -> Future: """ Clear existing user gaming information to stop notifications. """ gaming = UserGaming() - return self.xmpp['xep_0163'].publish(gaming, - node=UserGaming.namespace, - ifrom=ifrom, callback=callback, - timeout=timeout, - timeout_callback=timeout_callback) + return self.xmpp['xep_0163'].publish( + gaming, + node=UserGaming.namespace, + **pubsubkwargs + )