matrix-org / matrix-org/matrix-spec

Bots should only receive messages targeted at them

Open
#1,109 2 comments 7 reactions 0 assignees View on GitHub
A-Client-Server A-E2EE feature
Dominant language
HTML
Stars
330
Forks
150
Avg merge
2h 21m
Merged PRs (30d)
3

Description

*Note*: Some bots legitimately need access to *all* messages, and we should still permit those cases.

The general case for a bot is that it responds to commands by reading every message and doing something if it thinks the message matches a predetermined set. This is obviously not great as less trusted bots *could* become loggers too, though there is certainly an argument about only adding trusted bots to rooms.

This is more of an issue with encrypted rooms, where the bot has no reason to see messages not directed at it and can even be excluded more easily.

A challenge is doing this in a way where the bot can identify itself from a regular user (given bots are just user accounts), and not exposing metadata to the bot (ie: in an encrypted room, the bot doesn't need to know that *a* message was sent either).

Related:
* https://github.com/matrix-org/matrix-spec/issues/239
* https://github.com/matrix-org/matrix-spec/issues/56

Contributor guide

Open the contributing guide

Research direction

No file, test, or entry point is named. Start by reading the issue alongside related issues #239 and #56, then determine how bots can receive only targeted messages while preserving legitimate access to all messages and avoiding metadata leakage in encrypted rooms. Done means a settled protocol design and documented specification change.

Written by the indexing model from the issue text.

Assessment

Domain
security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.