Stream: t-release/triagebot

Topic: Zulip commands


LeSeulArtichaut (Jun 28 2020 at 16:35, on Zulip):

I don’t understand how Triagebot handles Zulip commands. I can see in the code that it listens for webhook events at the /zulip-hook endpoint, but I can’t find any part of the code that’s responsible for figuring out if there is supposed to be a command invocation in a given message.

So what I imagine is that the bot is subscribed to only receive messages that notify it, i.e. pings and private messages. @simulacrum could you enlighten me on how the bot is setup? :D

simulacrum (Jun 28 2020 at 16:36, on Zulip):

yep, zulip by default only sends a request to the endpoint if the bot's name (triagebot in this case) is directly mentioned

simulacrum (Jun 28 2020 at 16:37, on Zulip):

we only support invocations that are via PM I think right now

simulacrum (Jun 28 2020 at 16:37, on Zulip):

so we don't actually look for the name of the bot or anything, just assume that the message in its entirety is the command

simulacrum (Jun 28 2020 at 16:37, on Zulip):

@triagebot test

triagebot (Jun 28 2020 at 16:37, on Zulip):

Unknown command.

LeSeulArtichaut (Jun 28 2020 at 16:55, on Zulip):

It responds in streams but fails to parse commands

LeSeulArtichaut (Jun 28 2020 at 16:55, on Zulip):

For example

LeSeulArtichaut (Jun 28 2020 at 16:55, on Zulip):

@triagebot ack

triagebot (Jun 28 2020 at 16:55, on Zulip):

Unknown command.

simulacrum (Jun 28 2020 at 16:59, on Zulip):

right yeah because it's seeing "@triagebot" as the command which isn't a command

simulacrum (Jun 28 2020 at 16:59, on Zulip):

I suppose...

simulacrum (Jun 28 2020 at 16:59, on Zulip):

ack @triagebot

triagebot (Jun 28 2020 at 16:59, on Zulip):

Failed to acknowledge @triagebot: Did not delete any notifications.

simulacrum (Jun 28 2020 at 16:59, on Zulip):

yeah, see

LeSeulArtichaut (Jun 28 2020 at 17:47, on Zulip):

I have a few ideas in mind

LeSeulArtichaut (Jun 28 2020 at 17:48, on Zulip):

I’ll experiment a bit and see how it goes

Last update: Jan 22 2021 at 13:15UTC