plugin XEP-0402: Use cast for correct type hints.
This commit is contained in:
parent
2d86208e98
commit
4a66addc34
1 changed files with 3 additions and 3 deletions
|
|
@ -33,6 +33,7 @@ from libervia.backend.models.types import DomishElementType, JIDType
|
|||
from libervia.backend.plugins.plugin_xep_0045 import XEP_0045
|
||||
from libervia.backend.plugins.plugin_xep_0048 import XEP_0048
|
||||
from libervia.backend.plugins.plugin_xep_0060 import XEP_0060
|
||||
from libervia.backend.plugins.plugin_xep_0163 import XEP_0163
|
||||
from libervia.backend.tools import utils
|
||||
from libervia.backend.tools.common import data_format
|
||||
|
||||
|
|
@ -190,6 +191,7 @@ class XEP_0402:
|
|||
self._legacy = cast(XEP_0048, host.plugins["XEP-0048"])
|
||||
self._p = cast(XEP_0060, host.plugins["XEP-0060"])
|
||||
self._muc = cast(XEP_0045, host.plugins["XEP-0045"])
|
||||
pep = cast(XEP_0163, host.plugins["XEP-0163"])
|
||||
host.bridge.add_method(
|
||||
"bookmark_get",
|
||||
".plugin",
|
||||
|
|
@ -222,9 +224,7 @@ class XEP_0402:
|
|||
method=self._bookmarks_set,
|
||||
async_=True,
|
||||
)
|
||||
host.plugins["XEP-0163"].add_pep_event(
|
||||
None, NS_BOOKMARKS2, self._on_bookmark_event
|
||||
)
|
||||
pep.add_pep_event(None, NS_BOOKMARKS2, self._on_bookmark_event)
|
||||
host.register_namespace("bookmarks2", NS_BOOKMARKS2)
|
||||
|
||||
async def _on_bookmark_event(
|
||||
|
|
|
|||
Loading…
Reference in a new issue