1
0
Fork 0
mirror of https://code.sup39.dev/repos/Wqawg synced 2024-12-31 08:24:51 +09:00

S2S: sharerCreateNoteF: If ctx is sharer-ticket of another user, store to inbox

This commit is contained in:
fr33domlover 2020-05-13 13:49:22 +00:00
parent f296dc173c
commit a548dc8c5b

View file

@ -288,7 +288,14 @@ sharerCreateNoteF now shrRecip author body note = do
] ]
remoteRecips <- insertRemoteActivityToLocalInboxes False ractid $ localRecipSieve' sieve False False localRecips remoteRecips <- insertRemoteActivityToLocalInboxes False ractid $ localRecipSieve' sieve False False localRecips
(sig,) <$> deliverRemoteDB_S (actbBL body) ractid sid sig remoteRecips (sig,) <$> deliverRemoteDB_S (actbBL body) ractid sid sig remoteRecips
else return $ Left "Context is a sharer-ticket of another sharer" else do
let did = localTicketDiscuss lt
_ <- traverse (getParent did) mparent
mractid <- lift $ insertToInbox now author body ibid luCreate True
return $ Left $
case mractid of
Nothing -> "Context is a sharer-ticket of another sharer, and I already have this activity in my inbox, doing nothing"
Just _ -> "Context is a sharer-ticket of another sharer, just storing in my inbox"
case mremotesHttp of case mremotesHttp of
Left msg -> return msg Left msg -> return msg
Right (sig, remotesHttp) -> do Right (sig, remotesHttp) -> do