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:
@@ -20,3 +20,11 @@ test('Classic peer commands bind both accounts and preserve literal speech',()=>
|
||||
assert.equal(command.peerGuid,8);assert.equal(command.peerAccountId,4);
|
||||
assert.ok(command.expiresAt>Date.now()/1000);
|
||||
});
|
||||
|
||||
test('Classic human replies require authoritative recipient identity',()=>{
|
||||
const {classicPlayerReply}=require('../.test-build/classic.js');
|
||||
for(const request of [{speakerName:'Endami',channel:'whisper'},{speakerName:'Endami',channel:'say',speakerGuid:-1,speakerAccountId:1}])assert.throws(()=>classicPlayerReply(actor,request,'Hello'));
|
||||
const reply=JSON.parse(classicPlayerReply(actor,{speakerName:'Endami',channel:'whisper',speakerGuid:51,speakerAccountId:11},'Hello'));
|
||||
assert.equal(reply.kind,'reply-whisper');assert.equal(reply.peerGuid,51);assert.equal(reply.peerAccountId,11);assert.equal(reply.peerName,'Endami');
|
||||
assert.equal(reply.guid,7);assert.equal(reply.argument,'Hello');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user