Add author_is_bot to MessageResponse so bots can filter bot messages #73
Labels
No labels
area:api
area:core
area:docs
area:infra
area:ux
dependencies
documentation
duplicate
good first issue
help wanted
invalid
question
rust
status:complete
status:partial
status:planned
type:bug
type:design
type:feature
type:infra
type:refactor
type:research
type:ux
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
icub3d/decentcom#73
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Migrated from GitHub issue icub3d/decentcom#114
Original Author: @icub3d
Original Date: 2026-04-23T23:57:10Z
Problem
MessageResponse(and by extension the bot SDK'sMessageEvent) does not include anauthor_is_botfield. This means bots like modbot cannot distinguish messages sent by other bots from messages sent by users.Currently modbot only ignores its own messages via
evt.author_id == ctx.bot_user_id(). If another bot (e.g. welcomebot) sends a welcome message, modbot runs it through the spam detector. In practice this is low-risk today, but it will become a real issue as more bots are added.Proposed fix
server/src/messages/models.rs— addauthor_is_bot: booltoMessageResponse, populated by joining on theuserstable (or passing it through from the storage layer).tools/bot-sdk/src/events.rs— addauthor_is_bot: booltoMessageEvent.tools/bots/modbot/src/main.rs— add an early return whenevt.author_is_botis true, consistent with howMemberEvent::is_botis handled in the welcomebot.Labels
area:apiarea:coretype:feature