Monorepo for Tangled tangled.org

appview/strings: delete PDS record when deleting a string #1145

merged opened by melois.dev targeting master from melois.dev/tangled.org-core: youn/push-kzxomtzxykpm

Orphaned sh.tangled.string records on users' PDSs cannot be cleaned up by the appview and they would need to be removed manually by each user.

Signed-off-by: Youn MΓ©lois youn@melois.dev

Labels

None yet.

assignee

None yet.

Participants 2
AT URI
at://did:plc:sl3qsialnnm24haayxlidcwu/sh.tangled.repo.pull/3mgpxevfrl422
+16
Diff #0
+16
appview/strings/strings.go
··· 407 407 return 408 408 } 409 409 410 + client, err := s.OAuth.AuthorizedClient(r) 411 + if err != nil { 412 + fail("Failed to authorize client.", err) 413 + return 414 + } 415 + 416 + _, err = comatproto.RepoDeleteRecord(r.Context(), client, &comatproto.RepoDeleteRecord_Input{ 417 + Collection: tangled.StringNSID, 418 + Repo: user.Active.Did, 419 + Rkey: rkey, 420 + }) 421 + if err != nil { 422 + fail("Failed to delete string record from PDS.", err) 423 + return 424 + } 425 + 410 426 if err := db.DeleteString( 411 427 s.Db, 412 428 orm.FilterEq("did", user.Active.Did),

History

1 round 2 comments
sign up or login to add to the discussion
melois.dev submitted #0
1 commit
expand
appview/strings: delete PDS record when deleting a string
expand 2 comments

woah completely missed this! thanks for the PR!

pull request successfully merged