Lasa is a stateless proxy that generates a RSS or an Atom feed from a Standard.site publication. lasa.anhgelus.world
rss atom atprotocol standard-site atproto
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 34 lines 599 B view raw
1package lasa 2 3import ( 4 "context" 5 "errors" 6 "strings" 7 8 "tangled.org/anhgelus.world/xrpc/atproto" 9) 10 11func Resolve(ctx context.Context, dir atproto.Directory, arg string) (*atproto.DID, error) { 12 var err error 13 if strings.HasPrefix(arg, "did:") { 14 var did *atproto.DID 15 did, err = atproto.ParseDID(arg) 16 if err == nil { 17 return did, nil 18 } 19 } 20 handle, e := atproto.ParseHandle(arg) 21 if err == nil { 22 err = e 23 } else { 24 err = errors.Join(err, e) 25 } 26 if err != nil { 27 return nil, err 28 } 29 doc, err := dir.ResolveHandle(ctx, handle) 30 if err != nil { 31 return nil, err 32 } 33 return doc.DID, nil 34}