Live video on the AT Protocol
79
fork

Configure Feed

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

oauth: generate oauth string scopes

+17 -22
+14 -3
pkg/atproto/lexicon_repo.go
··· 36 36 37 37 var LexiconRepo *atrepo.Repo 38 38 var LexiconPubMultibase string 39 + var OAuthString string 39 40 var RepoUser models.Uid = models.Uid(1) 40 41 var CarStore carstore.CarStore 41 42 var ActionCreate = "create" ··· 401 402 } 402 403 403 404 allRecords := []string{} 404 - allCollectionStrings := []string{} 405 + allCollectionStrings := []string{ 406 + "atproto", 407 + "blob:*/*", 408 + "repo?collection=app.bsky.feed.post&action=create", 409 + "repo?collection=app.bsky.actor.status", 410 + "repo?collection=app.bsky.graph.block", 411 + "repo?collection=app.bsky.graph.follow", 412 + "rpc:app.bsky.actor.getProfile?aud=did:web:api.bsky.app%23bsky_appview", 413 + "rpc:app.bsky.actor.getProfiles?aud=did:web:api.bsky.app%23bsky_appview", 414 + "include:place.stream.authFull", 415 + } 405 416 for _, record := range recordLexicons { 406 417 allRecords = append(allRecords, record.ID) 407 - allCollectionStrings = append(allCollectionStrings, fmt.Sprintf("collection=%s", record.ID)) 418 + allCollectionStrings = append(allCollectionStrings, fmt.Sprintf("repo?collection=%s", record.ID)) 408 419 } 409 420 410 - log.Warn(ctx, "oauth string", "string", fmt.Sprintf("repo?%s", strings.Join(allCollectionStrings, "&"))) 421 + OAuthString = strings.Join(allCollectionStrings, " ") 411 422 412 423 for _, permSetLex := range permissionSets { 413 424 permSet := permSetLex.Defs["main"].Inner.(lexicon.SchemaPermissionSet)
+3 -19
pkg/cmd/streamplace.go
··· 52 52 53 53 // parse the CLI and fire up an streamplace node! 54 54 func start(build *config.BuildFlags, platformJobs []jobFunc) error { 55 - oauthString := strings.Join([]string{ 56 - "atproto", 57 - // "rpc:app.bsky.actor.getProfile?aud=did:web:api.bsky.app%23bsky_appview", 58 - // "repo?collection=place.stream.broadcast.origin", 59 - // "repo?collection=place.stream.broadcast.syndication", 60 - // "repo?collection=place.stream.chat.gate", 61 - // "repo?collection=place.stream.chat.message", 62 - // "repo?collection=place.stream.chat.profile", 63 - // "repo?collection=place.stream.key", 64 - "repo?collection=place.stream.livestream", 65 - // "repo?collection=place.stream.metadata.configuration", 66 - // "repo?collection=place.stream.segment", 67 - // "repo?collection=place.stream.server.settings", 68 - "repo?collection=app.bsky.feed.post&action=create", 69 - "repo?collection=app.bsky.actor.status", 70 - }, " ") 71 55 iroh_streamplace.InitLogging() 72 56 selfTest := len(os.Args) > 1 && os.Args[1] == "self-test" 73 57 err := media.RunSelfTest(context.Background()) ··· 326 310 } 327 311 host = u.Host 328 312 clientMetadata = &oatproxy.OAuthClientMetadata{ 329 - Scope: oauthString, 313 + Scope: atproto.OAuthString, 330 314 ClientName: "Streamplace", 331 315 RedirectURIs: []string{ 332 316 fmt.Sprintf("%s/login", cli.OwnPublicURL()), ··· 336 320 } else { 337 321 host = cli.BroadcasterHost 338 322 clientMetadata = &oatproxy.OAuthClientMetadata{ 339 - Scope: oauthString, 323 + Scope: atproto.OAuthString, 340 324 ClientName: "Streamplace", 341 325 RedirectURIs: []string{ 342 326 fmt.Sprintf("https://%s/login", cli.BroadcasterHost), ··· 390 374 UpdateOAuthSession: state.UpdateOAuthSession, 391 375 GetOAuthSession: state.LoadOAuthSession, 392 376 Lock: state.GetNamedLock, 393 - Scope: oauthString, 377 + Scope: atproto.OAuthString, 394 378 UpstreamJWK: cli.JWK, 395 379 DownstreamJWK: cli.AccessJWK, 396 380 ClientMetadata: clientMetadata,