aboutsummaryrefslogtreecommitdiff
path: root/src/Endpoints/ProfileEndpoint.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Endpoints/ProfileEndpoint.hs')
-rw-r--r--src/Endpoints/ProfileEndpoint.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Endpoints/ProfileEndpoint.hs b/src/Endpoints/ProfileEndpoint.hs
index 8aaaa52..3b04a02 100644
--- a/src/Endpoints/ProfileEndpoint.hs
+++ b/src/Endpoints/ProfileEndpoint.hs
@@ -6,7 +6,7 @@ module Endpoints.ProfileEndpoint (ProfileAPI, profileServer) where
import Servant
import Data.Aeson
-import Data.Text (Text, pack)
+import Data.Text (Text)
import qualified Data.Text as T
import Database.Persist
import Database (runDb)
@@ -34,11 +34,11 @@ handleProfileGet user_id = do
case maybe_user of
Just (Entity _ db_user) ->
return $ ProfileResponse
- { display_name = (userDisplayName db_user) <> (Just $ userIdent $ db_user)
+ { display_name = (userDisplayName db_user)
, avatar_url = userAvatarUrl db_user
, tz = Nothing
}
Nothing ->
throwError err404 { errBody = encode user_not_found_error }
where
- user_not_found_error = (MatrixErrorResponse (pack "M_NOT_FOUND") (pack "Profile not found")) \ No newline at end of file
+ user_not_found_error = (MatrixErrorResponse "M_NOT_FOUND" "Profile not found") \ No newline at end of file