mirror of
https://github.com/hexastack/hexabot
synced 2025-06-26 18:27:28 +00:00
fix: update conversation fixtures + service
This commit is contained in:
parent
b574295d8c
commit
2a48974336
@ -71,8 +71,6 @@ export class ConversationService extends BaseService<
|
|||||||
const msgType = event.getMessageType();
|
const msgType = event.getMessageType();
|
||||||
const profile = event.getSender();
|
const profile = event.getSender();
|
||||||
|
|
||||||
if (!convo.context) throw new Error('Missing conversation context');
|
|
||||||
|
|
||||||
// Capture channel specific context data
|
// Capture channel specific context data
|
||||||
convo.context.channel = event.getHandler().getName();
|
convo.context.channel = event.getHandler().getName();
|
||||||
convo.context.text = event.getText();
|
convo.context.text = event.getText();
|
||||||
|
|||||||
6
api/src/utils/test/fixtures/conversation.ts
vendored
6
api/src/utils/test/fixtures/conversation.ts
vendored
@ -142,8 +142,10 @@ export const installConversationTypeFixtures = async () => {
|
|||||||
conversationFixtures.map((conversationFixture) => ({
|
conversationFixtures.map((conversationFixture) => ({
|
||||||
...conversationFixture,
|
...conversationFixture,
|
||||||
sender: subscribers[parseInt(conversationFixture.sender)].id,
|
sender: subscribers[parseInt(conversationFixture.sender)].id,
|
||||||
current: blocks[parseInt(conversationFixture.current)].id,
|
current: conversationFixture?.current
|
||||||
next: conversationFixture.next.map((n) => blocks[parseInt(n)].id),
|
? blocks[parseInt(conversationFixture.current)]?.id
|
||||||
|
: undefined,
|
||||||
|
next: conversationFixture.next?.map((n) => blocks[parseInt(n)].id),
|
||||||
})),
|
})),
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user