diff --git a/inbox.graphql b/inbox.graphql index 5581981..91ac806 100644 --- a/inbox.graphql +++ b/inbox.graphql @@ -8,7 +8,7 @@ type ChatMember { id: Int! slug: String! name: String! - userpic: String + pic: String last_seen: Int! online: Boolean # invitedAt: DateTime diff --git a/models/member.py b/models/member.py index bdf40fa..c61e157 100644 --- a/models/member.py +++ b/models/member.py @@ -5,6 +5,6 @@ class ChatMember(TypedDict): id: int slug: str name: str - userpic: Optional[str] + pic: Optional[str] last_seen: int online: Optional[bool] diff --git a/services/core.py b/services/core.py index 768caac..b59ca5a 100644 --- a/services/core.py +++ b/services/core.py @@ -10,7 +10,7 @@ async def get_all_authors() -> List[ChatMember]: query_name = "authorsAll" query_type = "query" operation = "AuthorsAll" - query_fields = "id slug userpic name" + query_fields = "id slug pic name" gql = { "query": query_type + " " + operation + " { " + query_name + " { " + query_fields + " } " + " }", @@ -38,7 +38,7 @@ async def get_my_followings() -> List[ChatMember]: query_name = "loadMySubscriptions" query_type = "query" operation = "LoadMySubscriptions" - query_fields = "id slug userpic name" + query_fields = "id slug pic name" gql = { "query": query_type + " " + operation + " { " + query_name + " { authors {" + query_fields + "} } " + " }",