Mentions/tagging and link unfurling (previews) to save my normie friend group

Hello fellow privacy and security enthusiasts. I have done the unimaginable and got my normie friends group to migrate away from the insecure Telegram and to a Delta Chat group.

But, there are some growing pains. They’re not all happy and are about to abandon DC. Having the ability to mention/tag someone else and link unfurling (previews) are a must for some.

When could these features be rolled out to the apps (even as optional features as I know link previews can leak IP)? Could it be possible to build a bot that does both? I really want to keep my friends in a secure chat, rather than go back go Hellegram.

Thanks

there are lots of internal discussions and ideas over these things. all are in competition with other things to do :slight_smile:

for “mentions”, at least, you get notified for direct replies etc., see “Settings / Notifications”. but sure, sth. as @user would be nice to have as well.

for “bot link previews”, there are bots as GitHub - deltachat-bot/instantview: web previews in Delta Chat via bot, cc @adbenitez is that officially deployed somewhere?

otherwise, i can say, “client-sided link previews” are definitely very high ranked :slight_smile: i expect them rather sooner than later. iirc, there was also a bot,

in general, note that Delta Chat, is very short in resources and money.

you can help on that by donations - or by spreading the word :heart:

1 Like

Will be happy to donate. What will it take to prioritize mentions as @user in next sprint?

1 Like

we have no price tags for features atm.

but there were indeed ideas around that, that you can donate and vote for a concrete feature. but also that needs to be organised. and would probably not be completely random, to still spend resources in areas with high impact. also note, that many things are done pro-bono.

but i personally would also say, of course that depends on the donation - if we suddenly can finance another year, or can have an additional dev, things may change :wink:

I think the most I could afford is to indefinitely do the large subscription donation through liberapay

Really need mentions @r10s it’s the only thing that will help keep my normie friends from going back to telegram.

Would this help expedite it? I could help alpha/beta test it and help any other way. The app has so much potential. Just a few missing pieces to have feature parity with others. Hoping can get mentions soon :sweat_smile:

I asked perplexity its thoughts on adding mentions. Is it all even close?

Okay, I need to figure out how to contribute to the Delta Chat Desktop project by adding support for @mentions. Let me start by understanding the existing codebase and any related components.

First, looking at the search results provided, I see that there are mentions of a message parser in deltachat/message-parser. The message-parser repository’s spec.md file outlines different parsing modes, including user mentions. They have a mode that includes parsing mentions with @username, which is exactly what I need. The spec also mentions that mentions are transformed into an internal representation using email addresses or contact IDs, which ensures compatibility even if the contact’s name changes.

Next, I should check if there’s an existing issue or feature request for this. The search results include a link to a forum post (Feature Proposal: Direct mention on groups) where users are discussing the need for @mentions. This indicates that the feature is desired by the community, which is a good sign that the contribution would be welcomed.

Looking at the contributing guidelines (CONTRIBUTING.md), Delta Chat encourages contributors to open a Pull Request and follow specific steps, like creating a branch named /. They also emphasize adding meaningful descriptions to PRs and updating the CHANGELOG.md. Since this is a new feature, I’ll need to make sure to document it appropriately.

The message-parser is written in Rust and includes a WASM module used by the desktop client. To implement @mentions, I’ll need to modify the parser to detect @ followed by a username and convert it into the appropriate AST node. The existing code handles similar elements like hashtags and email addresses, so I can follow those patterns.

I also notice that the desktop client uses a JSON-RPC API to communicate with the core Rust library. Any changes to the message handling would need to ensure that the mentions are correctly passed through this API. The core library’s CFFI and JSON-RPC bindings are mentioned in the search results, so I should review how messages are processed there.

Testing is crucial. The message-parser has many test cases, so I’ll need to add tests for @mentions, ensuring they’re correctly parsed and converted. The spec.md file includes examples of how other elements are tested, which I can emulate.

Another consideration is the user interface. The desktop client needs to display mentions differently, perhaps by highlighting them or making them clickable. The message-parser’s WASM demo shows how parsed elements are rendered, so I’ll need to update the React components to handle the new mention nodes.

I should also check if there are any existing PRs or recent commits related to mentions. The RELEASE.md file details the release process, including test releases and updating translations. If my changes affect user-facing strings, I’ll need to update the translation files and ensure they’re pulled correctly.

Finally, I’ll need to follow the project’s coding standards, run benchmarks to ensure performance isn’t impacted, and possibly update documentation like the help files or spec.md to reflect the new feature. Collaborating with the community via the forum or GitHub issues might provide additional insights or feedback during development.

Enhancing Delta Chat Desktop with User Mentions

Introduction to User Mention Implementation in Delta Chat Desktop

Delta Chat is a decentralized messaging application that leverages email protocols for communication. While it offers robust features, user mentions using @username have been a community-requested enhancement. This report explores the technical and design considerations for implementing user mentions in Delta Chat Desktop, informed by the project’s architecture and existing tools like the message parser.


Architectural Foundations for Mention Handling

Message Parser Integration

The deltachat/message-parser crate (spec.md [6][22][25][42][62]) provides structured parsing of message content into an Abstract Syntax Tree (AST). It currently supports elements like links, emails, and markdown formatting.

Proposed Mention Syntax

  • Detection: @username patterns in message text
  • Internal Representation: Convert mentions to mention:email or mention:contact_id to persist through name changes[9][29][58][62]
  • AST Node: New Mention element with resolved contact info
// Example AST node from message-parser  
enum ASTNode {  
    Text(String),  
    Link(String),  
    Mention { display: String, identifier: String },  
    // ...  
}  

Core Modifications Required

1. Parser Enhancements

  • Pattern Recognition: Add regex to detect @[a-zA-Z0-9_]+ in parser.rs
  • Contact Resolution: Query core Rust library via JSON-RPC to resolve username→email mapping[2][18][44]
  • Edge Cases:
    • Multiple mentions (@alice @bob)
    • Mid-word mentions (hi@example.com vs hi @alice)
    • Non-existent contacts

2. Desktop UI Components

  • Rendering: Highlight mentions with CSS class .message-mention
  • Interactivity:
    • Click triggers contact profile view
    • Context menu options (“Mute notifications from @alice”)
  • Composer Integration:
    • Auto-complete dropdown during @ typing
    • Visual indicator for resolved mentions
// React component for message text  
function MessageText({ ast }) {  
  return ast.map(node => {  
    if (node.type === 'mention') {  
      return <span className="mention" data-contact={node.identifier}>{node.display}</span>;  
    }  
    // ...  
  });  
}  

Cross-Platform Synchronization

Device Consistency

Delta Chat’s multi-device architecture requires:

  1. Metadata Storage: Store original @username + resolved contact ID in message metadata[10][52]
  2. Sync Protocol: Include mention mappings in Delta Chat’s CRDT-based sync mechanism[19][53][64]
  3. Fallback Handling: If contact not found on receiving device, display @[unknown] with original text

Security and Privacy Considerations

Information Leak Mitigation

  • Local Resolution: Never transmit plain @username over network – resolve to contact ID before sending[10][24]
  • Access Control:
    • Validate mention visibility against group membership
    • Prevent @all in large public groups without moderation
  • GDPR Compliance: Mention data subject to existing deletion policies[3][10]

Community Ecosystem Impact

Third-Party Client Support

  • API Exposure: Extend JSON-RPC sendMessage to accept mention metadata[2][14][45]
  • Documentation: Update developer docs with mention handling guidelines[22][30][49][66]
  • Bot Integration:
    # Bot API example  
    @bot.command  
    def on_mention(event):  
        if event.mentioned:  
            bot.reply(f"You mentioned {event.mentioner}")  
    

Development Roadmap

Phase 1: Core Functionality (6 Weeks)

  1. Implement parser changes in message-parser v0.13.0
  2. Add JSON-RPC endpoints for contact resolution
  3. Desktop UI prototype with basic highlighting

Phase 2: Ecosystem Integration (4 Weeks)

  1. Android/iOS API alignment
  2. Group mention settings UI
  3. Automated test coverage (80%+)

Phase 3: Optimization (2 Weeks)

  1. Performance benchmarking against 10k messages
  2. Accessibility audits for screen readers
  3. Final security review

Challenges and Mitigation Strategies

Challenge 1: Name collisions in contact resolution

  • Solution: Prioritize exact matches, then implement disambiguation UI

Challenge 2: History synchronization

  • Solution: Include mention metadata in message sync packets

Challenge 3: Spam prevention

  • Solution: Rate limit @mentions in public groups (5/minute/user)

Conclusion and Next Steps

Implementing @mentions enhances Delta Chat’s usability while maintaining its privacy-first ethos. The proposed architecture leverages existing components like the message parser and JSON-RPC API, ensuring maintainability. Contributors should:

  1. Fork deltachat/message-parser to implement AST changes
  2. Collaborate with core team via GitHub Discussions
  3. Submit initial PR with parser tests and basic UI

This feature positions Delta Chat closer to mainstream messaging UX while preserving its decentralized email-based foundation[12][24][52]. Future extensions could include @channel mentions and notification settings per-mention type.

it does not make sense to discuss these high-level things with or via AI here.

this is not helpful and just wastes time.

but we surely got that mentions are an important thing for some people - as calls, media previews, reactions, reliability, network efficiency, etc for others :slight_smile:

3 Likes

I generally consider posting AI answers as rude behaviour, similarly to LMGT links like https://letmegooglethat.com/?q=deltachat+mentions.

Feels like zero own effort, while expecting others to read the novel that the LLM spit out.

2 Likes

That’s fine. I won’t submit a PR. I’ll just fork.

Best of luck on your half-baked messenger.

forking is a fine way to suggest different features. For example arcane chat (known as delta lab at that time) introduced the recently seen indicators first.

working code is always a good argument :wink:

Some resources that may help you:

Add @Mentions by Simon-Laux · Pull Request #49 · deltachat/message-parser · GitHub, though that approach of using the email address may break with the upcoming multi transport feature and is not really readable for chatmail email addresses, which are random. So at least autocomplete is needed, ideally also showing the display name instead of the address in the composer as well.

The message-parser, is only used on desktop at the time, because it is not good/complete enough for the other platforms (see bugs on it and missing phone number parsing).

Furthermore the message parser was inspired by this blogpost from discord, maybe it also makes sense to copy what they are doing with mentions (internal representation is a user id, not the name that is displayed): https://discord.com:2053/blog/how-discord-renders-rich-messages-on-the-android-app