Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/thin-ducks-remain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@tribesxyz/ayaos': patch
---

minor xmtp fix
11 changes: 8 additions & 3 deletions src/plugins/xmtp/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,13 @@ export class XMTPManager {
if (this.isConversationGroup(conversation)) {
const isBotMentioned = this.isBotMentioned(message)
const isReplyToBot = this.isReplyToBot(message)

if (isBotMentioned || isReplyToBot) {
return true
}

const isBotAction = await this.isBotAction(message)
return isBotMentioned || isReplyToBot || isBotAction
return isBotAction
}

// Default to processing (fallback for unknown conversation types)
Expand Down Expand Up @@ -288,8 +293,8 @@ export class XMTPManager {
return true
}

const xmptEnsName = this.runtime.getSetting('XMTP_ENS_NAME')
if (xmptEnsName && text.includes(xmptEnsName)) {
const xmptEnsName = z.string().parse(this.runtime.getSetting('XMTP_ENS_NAME'))
if (xmptEnsName && text.includes(xmptEnsName.toLowerCase())) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

U should also lowercase "text"

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

U should also lowercase "text"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

text was already lowercase thats why it was not working, look at line 269

ayaLogger.info(`Bot mentioned with ENS name: ${xmptEnsName}`)
return true
}
Expand Down