Skip to content

Commit

Permalink
Merge pull request #227 from TogetherCrew/debug-hivemind-adapter
Browse files Browse the repository at this point in the history
Debug hivemind adapter
  • Loading branch information
Behzad-rabiei authored Nov 7, 2024
2 parents a837f0b + 2eb7ba6 commit 6c8ffa4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 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)
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 6c8ffa4

Please sign in to comment.