Make the service bot actually work finally #73

Merged
prologic merged 5 commits from service_works into master 9 months ago
Owner
There is no content yet.
prologic added 1 commit 9 months ago
ed7565be8d
Make the service bot actually work finally
prologic requested review from xuu 9 months ago
prologic added 1 commit 9 months ago
db2e6c1f68
Fix sed bug
prologic added 1 commit 9 months ago
620bd3625a
Fix where we send REGISTER to
prologic added 1 commit 9 months ago
xuu reviewed 9 months ago
export SALTY_IDENTITY="$identity_file"
msgbus sub "$pubkey" "$0" &
msgbus -u "https://discover_host/inbox" sub "$pubkey" "$0" &
Owner

Is discover_host supposed to be a variable?

Is `discover_host` supposed to be a variable?
prologic marked this conversation as resolved
xuu reviewed 9 months ago
s.svc = svc
svc.TextFunc("register", func(ctx context.Context, bot *saltyim.Service, key *keys.EdX25519PublicKey, msg *lextwt.SaltyText) error {
svc.TextFunc("register", func(ctx context.Context, svc *saltyim.Service, key *keys.EdX25519PublicKey, msg *lextwt.SaltyText) error {
Owner

Was just thinking for an echo bot we might need an all hook since this one only calls commands that match the first word

Was just thinking for an echo bot we might need an all hook since this one only calls commands that match the first word
Poster
Owner

Can we have some kind of glob pattern matchin?

Can we have some kind of glob pattern matchin?
prologic added 1 commit 9 months ago
5613c4605b
Fix discovery_host variable
xuu reviewed 9 months ago
msgch := svc.Read(ctx, "", "")
// create the service user's client in a loop until successful
// TODO: Should this timeout? Use a context?
for {
Owner

Why would this fail? Is thee some time between not create and the discovery URL working?

Why would this fail? Is thee some time between not create and the discovery URL working?
Poster
Owner

Yeah it's just racey. It actually does fail on the first try.

Yeah it's just racey. It actually does fail on the first try.
xuu approved these changes 9 months ago
prologic merged commit 9ab6687edf into master 9 months ago
prologic deleted branch service_works 9 months ago

Reviewers

xuu approved these changes 9 months ago
continuous-integration/drone/pr Build is failing
The pull request has been merged as 9ab6687edf.
Sign in to join this conversation.
Loading…
There is no content yet.