diff --git a/src/Vervis/RemoteActorStore.hs b/src/Vervis/RemoteActorStore.hs index 8833607..4dd0d66 100644 --- a/src/Vervis/RemoteActorStore.hs +++ b/src/Vervis/RemoteActorStore.hs @@ -451,8 +451,7 @@ addVerifKey h uinb vkd = actorFetchShareSettings :: ( YesodPersist site - , PersistUniqueRead (YesodPersistBackend site) - , PersistStoreWrite (YesodPersistBackend site) + , PersistUniqueWrite (YesodPersistBackend site) , BaseBackend (YesodPersistBackend site) ~ SqlBackend , HasHttpManager site ) @@ -468,7 +467,8 @@ actorFetchShareSettings = ResultShareSettings manager <- getsYesod getHttpManager eactor <- fetchAPID' manager actorId h lu for eactor $ \ actor -> runDB $ - insertEntity $ RemoteActor lu iid (actorInbox actor) Nothing + let ra = RemoteActor lu iid (actorInbox actor) Nothing + in either id (flip Entity ra) <$> insertBy' ra } fetchRemoteActor