From 8428d3bbbf09c61d84550d050e596f1b43ec394c Mon Sep 17 00:00:00 2001 From: Joscha Date: Sun, 28 Jan 2018 14:36:45 +0000 Subject: [PATCH] Use Text instead of String --- src/EuphApi/Types.hs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/EuphApi/Types.hs b/src/EuphApi/Types.hs index 500eaaf..e690f2f 100644 --- a/src/EuphApi/Types.hs +++ b/src/EuphApi/Types.hs @@ -7,6 +7,7 @@ module EuphApi.Types ( Snowflake , SessionID + , Nick , UserID(..) , UserType(..) , Message(..) @@ -29,6 +30,9 @@ type Snowflake = T.Text -- | ID of a session, unique across all sessions globally. type SessionID = T.Text +-- | Nick of a user. +type Nick = T.Text + -- | Represents . -- -- A 'UserID' identifies a user. @@ -120,9 +124,9 @@ instance FromJSON Message where -- The fields @client_address@ and @real_client_address@ are not implemented. data SessionView = SessionView { sessID :: UserID - , sessName :: String - , sessServerID :: String - , sessServerEra :: String + , sessName :: Nick + , sessServerID :: T.Text + , sessServerEra :: T.Text , sessSessionID :: SessionID , isStaff :: Bool , isManager :: Bool