xep_0317: Fix compatibility with python < 3.9

This commit is contained in:
mathieui 2024-02-09 21:32:19 +01:00
parent b8205a9ae4
commit 66d552d057

View File

@ -1,5 +1,6 @@
from slixmpp import Presence
from slixmpp.xmlstream import ElementBase, register_stanza_plugin
from typing import List, Tuple
NS = 'urn:xmpp:hats:0'
@ -26,7 +27,7 @@ class Hats(ElementBase):
namespace = NS
plugin_attrib = 'hats'
def add_hats(self, data: list[tuple[str, str]]) -> None:
def add_hats(self, data: List[Tuple[str, str]]) -> None:
for uri, title in data:
hat = Hat()
hat["uri"] = uri