Add a u-uid to the h-card to ensure the h-card is considered representative

This commit is contained in:
Danielle McLean 2017-10-04 10:07:51 +11:00
parent 484609fb8b
commit 25a1e00cd7
Signed by: 00dani
GPG key ID: 5A5D2D1AFF12EEC5
3 changed files with 7 additions and 0 deletions

View file

@ -28,6 +28,7 @@ routeFromPgp PgpKey { pgpKeyFingerprint = f, pgpKeyHash = h } =
hcard :: Entity User -> Widget
hcard (Entity userId user) = do
maybeAvatar <- liftIO $ L.avatarUrl (L.Email $ userEmail user) def { L.optSecure = True, L.optSize = L.Size 512 }
mcurrentRoute <- getCurrentRoute
userProfiles <- handlerToWidget . runDB $ do
profiles <- map entityVal <$> selectList [ProfileUserId ==. userId] []
sites <- M.fromList . map entityToTuple <$> selectList [SiteId <-. (profileSiteId <$> profiles)] []