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