Default actor name display is now its URL, not the string "(?)"
This commit is contained in:
parent
edf624e806
commit
1c56f63e86
3 changed files with 26 additions and 16 deletions
|
@ -241,15 +241,16 @@ followF
|
||||||
case newItem of
|
case newItem of
|
||||||
Nothing -> return $ Left "Activity already exists in inbox, not using"
|
Nothing -> return $ Left "Activity already exists in inbox, not using"
|
||||||
Just ractid -> do
|
Just ractid -> do
|
||||||
|
let raidAuthor = remoteAuthorId author
|
||||||
|
ra <- getJust raidAuthor
|
||||||
(obiid, doc) <-
|
(obiid, doc) <-
|
||||||
insertAcceptToOutbox
|
insertAcceptToOutbox
|
||||||
|
ra
|
||||||
luFollow
|
luFollow
|
||||||
(recipOutbox recip)
|
(recipOutbox recip)
|
||||||
newFollow <- insertFollow ractid obiid $ recipFollowers recip
|
newFollow <- insertFollow ractid obiid $ recipFollowers recip
|
||||||
if newFollow
|
if newFollow
|
||||||
then Right <$> do
|
then Right <$> do
|
||||||
let raidAuthor = remoteAuthorId author
|
|
||||||
ra <- getJust raidAuthor
|
|
||||||
let raInfo = (raidAuthor, remoteActorIdent ra, remoteActorInbox ra, remoteActorErrorSince ra)
|
let raInfo = (raidAuthor, remoteActorIdent ra, remoteActorInbox ra, remoteActorErrorSince ra)
|
||||||
iidAuthor = remoteAuthorInstance author
|
iidAuthor = remoteAuthorInstance author
|
||||||
hAuthor = objUriAuthority $ remoteAuthorURI author
|
hAuthor = objUriAuthority $ remoteAuthorURI author
|
||||||
|
@ -285,9 +286,9 @@ followF
|
||||||
mrfid <- insertUnique $ RemoteFollow raid fsid True (not hide) ractid obiidA
|
mrfid <- insertUnique $ RemoteFollow raid fsid True (not hide) ractid obiidA
|
||||||
return $ isJust mrfid
|
return $ isJust mrfid
|
||||||
|
|
||||||
insertAcceptToOutbox luFollow obidRecip = do
|
insertAcceptToOutbox ra luFollow obidRecip = do
|
||||||
now <- liftIO getCurrentTime
|
now <- liftIO getCurrentTime
|
||||||
let uAuthor@(ObjURI hAuthor _) = remoteAuthorURI author
|
let uAuthor@(ObjURI hAuthor luAuthor) = remoteAuthorURI author
|
||||||
encodeRouteLocal <- getEncodeRouteLocal
|
encodeRouteLocal <- getEncodeRouteLocal
|
||||||
hLocal <- asksSite siteInstanceHost
|
hLocal <- asksSite siteInstanceHost
|
||||||
let recipPath = localUriPath $ encodeRouteLocal recipRoute
|
let recipPath = localUriPath $ encodeRouteLocal recipRoute
|
||||||
|
@ -296,9 +297,12 @@ followF
|
||||||
withUrlRenderer
|
withUrlRenderer
|
||||||
[hamlet|
|
[hamlet|
|
||||||
<p>
|
<p>
|
||||||
<a href="#{renderObjURI $ remoteAuthorURI author}">
|
<a href="#{renderObjURI uAuthor}">
|
||||||
(?)
|
$maybe name <- remoteActorName ra
|
||||||
's follow request accepted by #
|
#{name}
|
||||||
|
$nothing
|
||||||
|
#{renderAuthority hAuthor}#{localUriPath luAuthor}
|
||||||
|
\'s follow request accepted by #
|
||||||
<a href=@{recipRoute}>
|
<a href=@{recipRoute}>
|
||||||
#{renderAuthority hLocal}#{recipPath}
|
#{renderAuthority hLocal}#{recipPath}
|
||||||
.
|
.
|
||||||
|
|
|
@ -171,7 +171,9 @@ projectOfferTicketF
|
||||||
(sid, jid, ibid, fsid{-, tids-}) <-
|
(sid, jid, ibid, fsid{-, tids-}) <-
|
||||||
getProjectAndDeps shrRecip prjRecip {-deps-}
|
getProjectAndDeps shrRecip prjRecip {-deps-}
|
||||||
lift $ do
|
lift $ do
|
||||||
mticket <- insertTicket luOffer jid ibid {-tids-}
|
mticket <- do
|
||||||
|
ra <- getJust $ remoteAuthorId author
|
||||||
|
insertTicket ra luOffer jid ibid {-tids-}
|
||||||
for mticket $ \ (ractid, num, obiidAccept, docAccept) -> do
|
for mticket $ \ (ractid, num, obiidAccept, docAccept) -> do
|
||||||
msr <- for msig $ \ sig -> do
|
msr <- for msig $ \ sig -> do
|
||||||
remoteRecips <- deliverLocal ractid colls sid fsid
|
remoteRecips <- deliverLocal ractid colls sid fsid
|
||||||
|
@ -219,7 +221,7 @@ projectOfferTicketF
|
||||||
| shr == shrRecip && prj == prjRecip
|
| shr == shrRecip && prj == prjRecip
|
||||||
-> Just OfferTicketRecipProjectFollowers
|
-> Just OfferTicketRecipProjectFollowers
|
||||||
_ -> Nothing
|
_ -> Nothing
|
||||||
insertTicket luOffer jid ibid {-deps-} = do
|
insertTicket ra luOffer jid ibid {-deps-} = do
|
||||||
let iidAuthor = remoteAuthorInstance author
|
let iidAuthor = remoteAuthorInstance author
|
||||||
raidAuthor = remoteAuthorId author
|
raidAuthor = remoteAuthorId author
|
||||||
ractid <- either entityKey id <$> insertBy' RemoteActivity
|
ractid <- either entityKey id <$> insertBy' RemoteActivity
|
||||||
|
@ -240,7 +242,7 @@ projectOfferTicketF
|
||||||
updateGet jid [ProjectNextTicket +=. 1]
|
updateGet jid [ProjectNextTicket +=. 1]
|
||||||
did <- insert Discussion
|
did <- insert Discussion
|
||||||
fsid <- insert FollowerSet
|
fsid <- insert FollowerSet
|
||||||
(obiidAccept, docAccept) <- insertAccept luOffer next
|
(obiidAccept, docAccept) <- insertAccept ra luOffer next
|
||||||
tid <- insert Ticket
|
tid <- insert Ticket
|
||||||
{ ticketProject = jid
|
{ ticketProject = jid
|
||||||
, ticketNumber = next
|
, ticketNumber = next
|
||||||
|
@ -291,7 +293,7 @@ projectOfferTicketF
|
||||||
delete ibiid
|
delete ibiid
|
||||||
return remotes
|
return remotes
|
||||||
|
|
||||||
insertAccept luOffer num = do
|
insertAccept ra luOffer num = do
|
||||||
now <- liftIO getCurrentTime
|
now <- liftIO getCurrentTime
|
||||||
(sid, project) <- do
|
(sid, project) <- do
|
||||||
sid <- fromJust <$> getKeyBy (UniqueSharer shrRecip)
|
sid <- fromJust <$> getKeyBy (UniqueSharer shrRecip)
|
||||||
|
@ -300,17 +302,21 @@ projectOfferTicketF
|
||||||
insertToOutbox now $ projectOutbox project
|
insertToOutbox now $ projectOutbox project
|
||||||
where
|
where
|
||||||
insertToOutbox now obid = do
|
insertToOutbox now obid = do
|
||||||
|
let uAuthor@(ObjURI hAuthor luAuthor) = remoteAuthorURI author
|
||||||
summary <-
|
summary <-
|
||||||
TextHtml . TL.toStrict . renderHtml <$>
|
TextHtml . TL.toStrict . renderHtml <$>
|
||||||
withUrlRenderer
|
withUrlRenderer
|
||||||
[hamlet|
|
[hamlet|
|
||||||
<p>
|
<p>
|
||||||
<a href="#{renderObjURI $ remoteAuthorURI author}">
|
<a href="#{renderObjURI uAuthor}">
|
||||||
(?)
|
$maybe name <- remoteActorName ra
|
||||||
's ticket accepted by project #
|
#{name}
|
||||||
|
$nothing
|
||||||
|
#{renderAuthority hAuthor}#{localUriPath luAuthor}
|
||||||
|
\'s ticket accepted by project #
|
||||||
<a href=@{ProjectR shrRecip prjRecip}>
|
<a href=@{ProjectR shrRecip prjRecip}>
|
||||||
./s/#{shr2text shrRecip}/p/#{prj2text prjRecip}
|
./s/#{shr2text shrRecip}/p/#{prj2text prjRecip}
|
||||||
: #
|
\: #
|
||||||
<a href=@{TicketR shrRecip prjRecip num}>
|
<a href=@{TicketR shrRecip prjRecip num}>
|
||||||
#{preEscapedToHtml $ unTextHtml $ AP.ticketSummary ticket}.
|
#{preEscapedToHtml $ unTextHtml $ AP.ticketSummary ticket}.
|
||||||
|]
|
|]
|
||||||
|
|
|
@ -54,7 +54,7 @@ sharerLinkFedW (Right (inztance, actor)) =
|
||||||
$maybe name <- remoteActorName actor
|
$maybe name <- remoteActorName actor
|
||||||
#{name}
|
#{name}
|
||||||
$nothing
|
$nothing
|
||||||
(?)
|
#{renderAuthority $ instanceHost inztance}#{localUriPath $ remoteActorIdent actor}
|
||||||
|]
|
|]
|
||||||
where
|
where
|
||||||
uActor = ObjURI (instanceHost inztance) (remoteActorIdent actor)
|
uActor = ObjURI (instanceHost inztance) (remoteActorIdent actor)
|
||||||
|
|
Loading…
Reference in a new issue