diff --git a/matrix_appservice_kakaotalk/kt/types/attachment/__init__.py b/matrix_appservice_kakaotalk/kt/types/attachment/__init__.py
index 9854339..0b590cb 100644
--- a/matrix_appservice_kakaotalk/kt/types/attachment/__init__.py
+++ b/matrix_appservice_kakaotalk/kt/types/attachment/__init__.py
@@ -13,6 +13,8 @@
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see .
+from typing import Optional
+
from attr import dataclass
from mautrix.types import SerializableAttrs
@@ -23,9 +25,9 @@ from .mention import MentionStruct
@dataclass(kw_only=True)
class Attachment(SerializableAttrs):
- shout: bool | None = None
- mentions: list[MentionStruct] | None = None
- urls: list[str] | None = None
+ shout: Optional[bool] = None
+ mentions: Optional[list[MentionStruct]] = None
+ urls: Optional[list[str]] = None
@dataclass
diff --git a/matrix_appservice_kakaotalk/kt/types/channel/channel_info.py b/matrix_appservice_kakaotalk/kt/types/channel/channel_info.py
index e54eabd..afceae0 100644
--- a/matrix_appservice_kakaotalk/kt/types/channel/channel_info.py
+++ b/matrix_appservice_kakaotalk/kt/types/channel/channel_info.py
@@ -13,7 +13,7 @@
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see .
-from typing import Generic, TypeVar
+from typing import Generic, TypeVar, Optional
from attr import dataclass
@@ -48,7 +48,7 @@ class ChannelInfo(Channel):
newChatCountInvalid: bool
lastChatLogId: Long
lastSeenLogId: Long
- lastChatLog: Chatlog | None = None
+ lastChatLog: Optional[Chatlog] = None
metaMap: ChannelMetaMap
displayUserList: list[DisplayUserInfo]
pushAlert: bool
diff --git a/matrix_appservice_kakaotalk/kt/types/openlink/open_channel_info.py b/matrix_appservice_kakaotalk/kt/types/openlink/open_channel_info.py
index 425a097..3bd3bde 100644
--- a/matrix_appservice_kakaotalk/kt/types/openlink/open_channel_info.py
+++ b/matrix_appservice_kakaotalk/kt/types/openlink/open_channel_info.py
@@ -13,6 +13,8 @@
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see .
+from typing import Optional
+
from attr import dataclass
from mautrix.types import JSON
@@ -25,7 +27,7 @@ from . import OpenTokenComponent, OpenLink
@dataclass(kw_only=True)
class OpenChannelInfo(ChannelInfo, OpenChannel, OpenTokenComponent):
directChannel: bool
- openLink: OpenLink | None = None
+ openLink: Optional[OpenLink] = None
@dataclass
diff --git a/matrix_appservice_kakaotalk/kt/types/user/channel_user.py b/matrix_appservice_kakaotalk/kt/types/user/channel_user.py
index 914e2ac..5b268ce 100644
--- a/matrix_appservice_kakaotalk/kt/types/user/channel_user.py
+++ b/matrix_appservice_kakaotalk/kt/types/user/channel_user.py
@@ -13,6 +13,8 @@
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see .
+from typing import Optional
+
from attr import dataclass
from mautrix.types import SerializableAttrs
@@ -28,7 +30,7 @@ class ChannelUser(SerializableAttrs):
@dataclass(kw_only=True)
class PartialOpenLinkComponent(SerializableAttrs):
"""Substitute for Partial"""
- linkId: Long | None = None
+ linkId: Optional[Long] = None
@dataclass