From c3b299d26cffde10a44057135a7f1af17da69129 Mon Sep 17 00:00:00 2001 From: Andrew Ferrazzutti Date: Fri, 6 May 2022 02:48:58 -0400 Subject: [PATCH] Make LoginResult.lastChannelId optional Needed for backfilling users who have not joined any channels --- matrix_appservice_kakaotalk/kt/types/client/client_session.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/matrix_appservice_kakaotalk/kt/types/client/client_session.py b/matrix_appservice_kakaotalk/kt/types/client/client_session.py index b2d08b5..a68e877 100644 --- a/matrix_appservice_kakaotalk/kt/types/client/client_session.py +++ b/matrix_appservice_kakaotalk/kt/types/client/client_session.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 NewType, Union +from typing import NewType, Optional, Union from attr import dataclass @@ -43,13 +43,13 @@ class LoginResult(SerializableAttrs): """Return value of TalkClient.login""" channelList: list[LoginDataItem] userId: Long - lastChannelId: Long lastTokenId: Long mcmRevision: int removedChannelIdList: list[Long] revision: int revisionInfo: str minLogId: Long + lastChannelId: Optional[Long] = None # NEW Made optional # TODO Consider catching SerializerError for channelList entries