Parley: Federated, decentralised chat that speaks plain IRC
Parley: Federated, Decentralised Chat that speaks plain IRC
Parley is a decentralized, federated communication system designed to be compatible with standard IRC. Instead of a central server, individuals or organizations host their own instances tied to their specific domains.
🌐 Core Architecture & Identity
Parley allows you to interact with the network using any traditional IRC client (such as irssi, WeeChat, or Textual) without needing additional plugins.
How it works:
- Discovery: Instances locate one another via DNS and "well-known" identity documents.
- Transport: Messages are signed and exchanged over HTTPS.
- Addressing: User identities follow an email-like format:
user@domain.
| User Identity | Hosting Domain | Example Command |
|---|---|---|
alice@foo.com | foo.com | /msg alice@foo.com hello |
bob@bar.com | bar.com | /msg bob@bar.com hi there |
🛠 Technical Update: Refining Mention Notifications (#39)
A recent update addressed a bug where notifications were being pushed to too many users when multiple people shared the same nickname across different instances.
The Problem
Previously, the namesAccount function triggered a mention whenever a nickname appeared as a standalone word (since colons are treated as word boundaries).
Scenario: If
bobexists on bothfoo.comandbar.comin the same room:
- A message like
bob:bar.com: lunch?sent fromfoo.comwould notify both Bobs.- A simple
bob: lunch?sent frombar.comwould also notify the Bob onfoo.com.
Because the raw text is federated exactly as typed, every instance containing a "bob" would trigger a push notification.
The Solution
The logic for identifying a mention has been updated to match how the sender actually perceives the user (R189):
- Qualified Names:
bob:bar.com(similar tobob@bar.com) always refers specifically to the Bob onbar.com. - Bare Nicks: A plain
bobnow only refers to the Bob on the sender's own instance. It only triggers a local account mention if the sender is also local. - Filtering: Strings like
barinsidealice:bar.comare ignored. - Validation: Only domains belonging to the local instance or a known peer are considered valid.
Old Logic: Any "bob" = All Bobs notified New Logic:
This ensures that strings like bob:D or bob:10 still correctly resolve to "bob" while preventing cross-instance notification spam.
Implementation Details
- The
pushConsideredfunction now referencess.peersunder the existings.mulock. - Protocol Changes: Updated
parley.btwith aNAMES [read-as-the-sender-was-shown-them]node underPUSH [considered]and updateddocs/PROTOCOL.md.
✅ Verification & Testing
The following checks were performed to ensure stability:
-
make testpassed successfully. - Race condition check (
-race) passed. - Integration test
TestOnlyTheBobThatWasMeantIsPushedpassed 10 consecutive iterations. -
bte check parley.btreturned 0 errors. -
bte fmtconfirmed no formatting changes needed. -
demo/demo.sh(Skipped: Docker unavailable in current environment).
📈 Recent Project Activity
The project continues to evolve with various improvements across the stack:
| Component | Change Description |
|---|---|
| Chat | Implemented rate limiting for accounts and refined the spec. |
| Config | Removed config files in favor of CLI flags, environment variables, and DB settings. |
| Features | Added support for the +reply tag and the ability for users to edit their messages across all instances. |
| Homecloud | Added synchronization of household members into accounts. |
| Web | Completely rebuilt the interface using templ components. |
| Security | Established a dedicated SECURITY.md for reporting vulnerabilities. |
For more details, explore the source code or check the main branch.