-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create a trigger-specific dynamic configuration layer #1217
Comments
Is the proposal to have a single trigger layer for all triggers effectively sharing config? I'm having trouble thinking of a case where I'd need a separate layer of config that wouldn't already either be in the base layer or in some room layer. A trigger layer would solve the issue but seems like it would be duplicating config that already exists somewhere else. Another idea: Since we already have the notion of running a trigger as a specific user, would it make sense to also provide an |
I think |
It's not a single layer for all triggers; it'd be like a "special room" that triggers would execute in. You'd provide configuration for your bundles just like you would for other rooms. Specifying a room would be similar; if there aren't trigger-specific needs, then that may be fine. There may be weirdness due to the fact that we'd be referring to rooms from one provider in another one; I haven't fully refreshed myself on the current implementation, though. |
If we go the |
Commands executing in the context of a trigger invocation can currently access user-layer dynamic configuration (user specified in trigger definition or through request headers), but cannot access room-layer dynamic configuration.
It may be useful to create a trigger-specific layer that can be applied instead of the room layer when a command executes from a trigger.
A partial workaround for the time being would be to create a user for the trigger and assign them whatever credentials are needed in a user layer.
UPDATE
Turns out that triggers currently behave as 1-on-1 messages with the bot:
cog/lib/cog/chat/http/provider.ex
Lines 51 to 54 in c0041e4
The text was updated successfully, but these errors were encountered: