Skip to content

Commit 4d05e27

Browse files
author
Poscat
committed
Add ChatStatus
1 parent f573012 commit 4d05e27

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

src/Web/Telegram/Types/Internal/Common.hs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,10 +270,23 @@ data ChatPhoto
270270
via Snake ChatPhoto
271271
deriving (ToHttpApiData) via Serialize ChatPhoto
272272

273+
data ChatStatus
274+
= Creator
275+
| Administrator
276+
| Member
277+
| Restricted
278+
| Left
279+
| Kicked
280+
deriving (Show, Eq, Generic, Default)
281+
deriving
282+
(FromJSON, ToJSON)
283+
via UntaggedSum ChatStatus
284+
deriving (ToHttpApiData) via Serialize ChatStatus
285+
273286
data ChatMember
274287
= ChatMember
275288
{ user :: User,
276-
status :: Text,
289+
status :: ChatStatus,
277290
customTitle :: Text,
278291
untilDate :: Maybe Integer,
279292
canBeEdited :: Maybe Bool,

0 commit comments

Comments
 (0)