Added variables to disable/enable event types. Updated examples
Some checks failed
Create and publish the bot container / build-and-push-image (push) Has been cancelled

This commit is contained in:
Brad Ganley 2025-01-04 23:13:23 -06:00
parent 92c366b724
commit 7effbdc970
3 changed files with 25 additions and 10 deletions

View File

@ -1,10 +1,13 @@
TRACKER_BSKY_HANDLE=
TRACKER_BSKY_PASSWORD=
JETSTREAM_URL='wss://jetstream1.us-west.bsky.network/subscribe'
DEBUG_LOG_ACTIVE=true
DEBUG_LOG_LEVEL=info
JETSTREAM_URL='wss://jetstream1.us-west.bsky.network/subscribe'
POST_EVENT=true
LIKE_EVENT=true
BLOCK_EVENT=true
REPOST_EVENT=true
SESSION_DATA_PATH='/sessionData'
USER_DID=
NAME=
USER_DID=

View File

@ -6,8 +6,12 @@ services:
env_file:
- .env
environment:
- NAME=TEST
- USER_DID=did:plc:example
#- NAME=TEST
#- USER_DID=did:plc:example
#- POST_EVENT=true
#- LIKE_EVENT=true
#- BLOCK_EVENT=true
#- REPOST_EVENT=true
#- TRACKER_BSKY_HANDLE=
#- TRACKER_BSKY_PASSWORD=
#- DEBUG_LOG_ACTIVE=true

View File

@ -25,7 +25,7 @@ let jetstreamSubscription: JetstreamSubscription;
let handlers = {
post: {
c: [
c: (Bun.env.POST_EVENT !== "false" ? [
new MessageHandler(
// @ts-ignore
[ActionTakenByUserValidator.make(<string>Bun.env.USER_DID)],
@ -52,9 +52,11 @@ let handlers = {
testAgent
)
]
: []
)
},
like: {
c: [
c: (Bun.env.LIKE_EVENT !== "false" ? [
new MessageHandler(
// @ts-ignore
[ActionTakenByUserValidator.make(<string>Bun.env.USER_DID)],
@ -67,9 +69,11 @@ let handlers = {
testAgent
)
]
: []
)
},
repost: {
c: [
c: (Bun.env.REPOST_EVENT !== "false" ? [
new MessageHandler(
// @ts-ignore
[ActionTakenByUserValidator.make(<string>Bun.env.USER_DID)],
@ -82,9 +86,11 @@ let handlers = {
testAgent
)
]
: []
)
},
block: {
c: [
c: (Bun.env.BLOCK_EVENT !== "false" ? [
new MessageHandler(
// @ts-ignore
[
@ -100,6 +106,8 @@ let handlers = {
testAgent
)
]
: []
)
}
}