fix: merge context + topic into single field — one clear purpose
- Removed separate 'topic' field from BipolarTriggerRequest model - Removed topic parameter from force_trigger_argument, force_trigger_argument_from_message_id, and run_argument - trigger_context now doubles as the argument theme: if provided by user, it becomes the topic; if blank, a random topic is selected from the rotation pool - Web UI: replaced two confusing fields (Context + Topic) with one clear field labeled 'What should they argue about? (optional)' with a plain-English description - JS: removed topic field reference, context.trim() ensures empty strings aren't sent
This commit is contained in:
@@ -129,7 +129,7 @@ def trigger_argument(data: BipolarTriggerRequest):
|
||||
if message_id:
|
||||
async def trigger_from_message():
|
||||
success, error = await force_trigger_argument_from_message_id(
|
||||
channel_id, message_id, globals.client, data.context, topic=data.topic
|
||||
channel_id, message_id, globals.client, data.context
|
||||
)
|
||||
if not success:
|
||||
logger.error(f"Failed to trigger argument from message: {error}")
|
||||
@@ -148,8 +148,8 @@ def trigger_argument(data: BipolarTriggerRequest):
|
||||
if not channel:
|
||||
return JSONResponse(status_code=404, content={"status": "error", "message": f"Channel {channel_id} not found"})
|
||||
|
||||
# Trigger the argument with optional custom topic
|
||||
globals.client.loop.create_task(force_trigger_argument(channel, globals.client, data.context, topic=data.topic))
|
||||
# Trigger the argument — context doubles as the argument theme
|
||||
globals.client.loop.create_task(force_trigger_argument(channel, globals.client, data.context))
|
||||
|
||||
return {
|
||||
"status": "ok",
|
||||
|
||||
Reference in New Issue
Block a user