···11+// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
22+33+package bsky
44+55+// schema: app.bsky.notification.unregisterPush
66+77+import (
88+ "context"
99+1010+ "github.com/bluesky-social/indigo/lex/util"
1111+)
1212+1313+// NotificationUnregisterPush_Input is the input argument to a app.bsky.notification.unregisterPush call.
1414+type NotificationUnregisterPush_Input struct {
1515+ AppId string `json:"appId" cborgen:"appId"`
1616+ Platform string `json:"platform" cborgen:"platform"`
1717+ ServiceDid string `json:"serviceDid" cborgen:"serviceDid"`
1818+ Token string `json:"token" cborgen:"token"`
1919+}
2020+2121+// NotificationUnregisterPush calls the XRPC method "app.bsky.notification.unregisterPush".
2222+func NotificationUnregisterPush(ctx context.Context, c util.LexClient, input *NotificationUnregisterPush_Input) error {
2323+ if err := c.LexDo(ctx, util.Procedure, "application/json", "app.bsky.notification.unregisterPush", nil, input, nil); err != nil {
2424+ return err
2525+ }
2626+2727+ return nil
2828+}
+4-2
api/ozone/moderationemitEvent.go
···15151616// ModerationEmitEvent_Input is the input argument to a tools.ozone.moderation.emitEvent call.
1717type ModerationEmitEvent_Input struct {
1818- CreatedBy string `json:"createdBy" cborgen:"createdBy"`
1919- Event *ModerationEmitEvent_Input_Event `json:"event" cborgen:"event"`
1818+ CreatedBy string `json:"createdBy" cborgen:"createdBy"`
1919+ Event *ModerationEmitEvent_Input_Event `json:"event" cborgen:"event"`
2020+ // externalId: An optional external ID for the event, used to deduplicate events from external systems. Fails when an event of same type with the same external ID exists for the same subject.
2121+ ExternalId *string `json:"externalId,omitempty" cborgen:"externalId,omitempty"`
2022 ModTool *ModerationDefs_ModTool `json:"modTool,omitempty" cborgen:"modTool,omitempty"`
2123 Subject *ModerationEmitEvent_Input_Subject `json:"subject" cborgen:"subject"`
2224 SubjectBlobCids []string `json:"subjectBlobCids,omitempty" cborgen:"subjectBlobCids,omitempty"`
+27
atproto/identity/mock_directory.go
···44 "context"
55 "encoding/json"
66 "fmt"
77+ "sync"
7889 "github.com/bluesky-social/indigo/atproto/syntax"
910)
10111112// A fake identity directory, for use in tests
1213type MockDirectory struct {
1414+ mu *sync.RWMutex
1315 Handles map[syntax.Handle]syntax.DID
1416 Identities map[syntax.DID]Identity
1517}
···19212022func NewMockDirectory() MockDirectory {
2123 return MockDirectory{
2424+ mu: &sync.RWMutex{},
2225 Handles: make(map[syntax.Handle]syntax.DID),
2326 Identities: make(map[syntax.DID]Identity),
2427 }
2528}
26292730func (d *MockDirectory) Insert(ident Identity) {
3131+ d.mu.Lock()
3232+ defer d.mu.Unlock()
3333+2834 if !ident.Handle.IsInvalidHandle() {
2935 d.Handles[ident.Handle.Normalize()] = ident.DID
3036 }
···3238}
33393440func (d *MockDirectory) LookupHandle(ctx context.Context, h syntax.Handle) (*Identity, error) {
4141+ d.mu.RLock()
4242+ defer d.mu.RUnlock()
4343+3544 h = h.Normalize()
3645 did, ok := d.Handles[h]
3746 if !ok {
···4554}
46554756func (d *MockDirectory) LookupDID(ctx context.Context, did syntax.DID) (*Identity, error) {
5757+ d.mu.RLock()
5858+ defer d.mu.RUnlock()
5959+4860 ident, ok := d.Identities[did]
4961 if !ok {
5062 return nil, ErrDIDNotFound
···5365}
54665567func (d *MockDirectory) Lookup(ctx context.Context, a syntax.AtIdentifier) (*Identity, error) {
6868+ d.mu.RLock()
6969+ defer d.mu.RUnlock()
7070+5671 handle, err := a.AsHandle()
5772 if nil == err { // if not an error, is a Handle
5873 return d.LookupHandle(ctx, handle)
···6580}
66816782func (d *MockDirectory) ResolveHandle(ctx context.Context, h syntax.Handle) (syntax.DID, error) {
8383+ d.mu.RLock()
8484+ defer d.mu.RUnlock()
8585+6886 h = h.Normalize()
6987 did, ok := d.Handles[h]
7088 if !ok {
···7492}
75937694func (d *MockDirectory) ResolveDID(ctx context.Context, did syntax.DID) (*DIDDocument, error) {
9595+ d.mu.RLock()
9696+ defer d.mu.RUnlock()
9797+7798 ident, ok := d.Identities[did]
7899 if !ok {
79100 return nil, ErrDIDNotFound
···83104}
8410585106func (d *MockDirectory) ResolveDIDRaw(ctx context.Context, did syntax.DID) (json.RawMessage, error) {
107107+ d.mu.RLock()
108108+ defer d.mu.RUnlock()
109109+86110 ident, ok := d.Identities[did]
87111 if !ok {
88112 return nil, ErrDIDNotFound
···92116}
9311794118func (d *MockDirectory) Purge(ctx context.Context, a syntax.AtIdentifier) error {
119119+ d.mu.Lock()
120120+ defer d.mu.Unlock()
121121+95122 return nil
96123}
+3-1
carstore/repo_test.go
···1616 appbsky "github.com/bluesky-social/indigo/api/bsky"
1717 "github.com/bluesky-social/indigo/repo"
1818 "github.com/bluesky-social/indigo/util"
1919- sqlbs "github.com/ipfs/go-bs-sqlite3"
1919+ //sqlbs "github.com/ipfs/go-bs-sqlite3"
2020 "github.com/ipfs/go-cid"
2121 flatfs "github.com/ipfs/go-ds-flatfs"
2222 blockstore "github.com/ipfs/go-ipfs-blockstore"
···452452 }
453453}
454454455455+/* NOTE(bnewbold): this depends on github.com/ipfs/go-bs-sqlite3, which rewrote git history (?) breaking the dependency tree. We can roll forward, but that will require broad dependency updates. So for now just removing this benchmark/perf test.
455456func BenchmarkRepoWritesSqlite(b *testing.B) {
456457 ctx := context.TODO()
457458···489490 head = nroot
490491 }
491492}
493493+*/
492494493495func TestDuplicateBlockAcrossShards(ot *testing.T) {
494496 ctx := context.TODO()