Skip to content

Commit

Permalink
fix: fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Behzad-rabiei committed Nov 7, 2024
1 parent cce01c4 commit 6ab028a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
9 changes: 3 additions & 6 deletions hivemind-adapter/src/bot-adapter/bot.adapter.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,12 @@ export class BotAdapterService {
const platform = await this.platformService.getPlatform({
'metadata.id': interaction.guildId,
})
const data = this.adaptDataToHivemind(interaction, platform.community)
this.rabbitMQService.publish(Queue.HIVEMIND, Event.HIVEMIND.QUESTION_RECEIVED, { ...data })
const data = this.adaptDataToHivemind(interaction, platform.community.toString())
this.rabbitMQService.publish(Queue.HIVEMIND, Event.HIVEMIND.QUESTION_RECEIVED, data)
this.logger.info(data, `QUESTION_COMMAND_RECEIVED event is processed`)
}

private adaptDataToHivemind(
interaction: ChatInputCommandInteraction_broker,
communityId: Types.ObjectId
): Question {
private adaptDataToHivemind(interaction: ChatInputCommandInteraction_broker, communityId: string): Question {
return {
communityId,
route: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { PlatformNames } from '@togethercrew.dev/db'
import { Queue } from '@togethercrew.dev/tc-messagebroker'

export interface Question {
communityId: Types.ObjectId
communityId: string
route: {
source: PlatformNames
destination: {
Expand Down

0 comments on commit 6ab028a

Please sign in to comment.