mirror of
https://github.com/hexastack/hexabot
synced 2025-03-10 14:25:42 +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 profile = event.getSender();
|
||||
|
||||
if (!convo.context) throw new Error('Missing conversation context');
|
||||
|
||||
// Capture channel specific context data
|
||||
convo.context.channel = event.getHandler().getName();
|
||||
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) => ({
|
||||
...conversationFixture,
|
||||
sender: subscribers[parseInt(conversationFixture.sender)].id,
|
||||
current: blocks[parseInt(conversationFixture.current)].id,
|
||||
next: conversationFixture.next.map((n) => blocks[parseInt(n)].id),
|
||||
current: conversationFixture?.current
|
||||
? blocks[parseInt(conversationFixture.current)]?.id
|
||||
: undefined,
|
||||
next: conversationFixture.next?.map((n) => blocks[parseInt(n)].id),
|
||||
})),
|
||||
);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user