Complete Classic telemetry, authenticated player replies and reversible cutover
Core tests / core (push) Successful in 27s
Core tests / core (push) Successful in 27s
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import {classicMode,classicCommand} from './classic';
|
||||
import {classicMode,classicCommand,classicPlayerReply} from './classic';
|
||||
import {bondEvidence,socialEntry,communityTick} from './community';
|
||||
import { z } from 'zod';
|
||||
import { queueAleCommand } from './ale-store';
|
||||
@@ -203,8 +203,7 @@ export async function runConversationTick(store:StateStore,db:D1Database,config:
|
||||
reply=cleanReply(reply);
|
||||
if(!reply)throw new Error('Conversation reply was empty');
|
||||
|
||||
if(classicMode(config)&&request.socialTurn===undefined)throw new Error('Classic player chat delivery is not enabled yet');
|
||||
const source=classicMode(config)?classicCommand('say',bot,reply,byName(state,request.speakerName)):compileReply(bot.name,request.speakerName,reply,request.channel,request.socialTurn!==undefined);
|
||||
const source=classicMode(config)?(request.socialTurn===undefined?classicPlayerReply(bot,request,reply):classicCommand('say',bot,reply,byName(state,request.speakerName))):compileReply(bot.name,request.speakerName,reply,request.channel,request.socialTurn!==undefined);
|
||||
const command=await queueAleCommand(db,source);
|
||||
await awaitDelivery(db,request,bot.id,reply,command.id);
|
||||
await cleanupConversations(db);
|
||||
|
||||
Reference in New Issue
Block a user