Skip to content

feat: Don't show non-delivery-notfications in broadcast channels#8159

Merged
Hocuri merged 1 commit into
mainfrom
hoc/no-ndns-in-broadcast-channels
Apr 25, 2026
Merged

feat: Don't show non-delivery-notfications in broadcast channels#8159
Hocuri merged 1 commit into
mainfrom
hoc/no-ndns-in-broadcast-channels

Conversation

@Hocuri
Copy link
Copy Markdown
Collaborator

@Hocuri Hocuri commented Apr 23, 2026

Looking forward, it is unclear how exactly we want to handle errors, but in the meantime, this is a simple thing we can do to improve the situation.

If you have a broadcast channel, chances are that some of your recipients have some problems receiving your messages. You are probably not too interested in that.

In reality, some channel operators were quite confused by these errors, and we told them to just ignore them, but at this point we may as well just hide them.

Theoretically we can start removing recipients that never get our messages at some point.

Looking forward, it is unclear how exactly we want to handle errors, but
in the meantime, this is a simple thing we can do to improve the
situation.

If you have a broadcast channel, chances are that some of your
recipients have some problems receiving your messages. You are probably
not too interested in that.

In reality, some channel operators were quite confused by these errors,
and we told them to just ignore them, but at this point we may as well
just hide them.

Theoretically we can start removing recipients that never get our
messages at some point.
@Hocuri Hocuri requested review from hpk42, link2xt and r10s April 23, 2026 15:36
Comment thread src/mimeparser.rs

for msg_id in msg_ids {
let mut message = Message::load_from_db(context, msg_id).await?;
let chat = Chat::load_from_db(context, message.chat_id).await?;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We already have chat_visibility and chat_blocked in Message, can add chat_typ almost for free

@Hocuri Hocuri enabled auto-merge (squash) April 25, 2026 17:09
@Hocuri Hocuri merged commit 1fd4a19 into main Apr 25, 2026
56 of 57 checks passed
@Hocuri Hocuri deleted the hoc/no-ndns-in-broadcast-channels branch April 25, 2026 17:19
@NotExactlySiev
Copy link
Copy Markdown

Another non-intuitive place where an NDN shows up is this scenario:

Consider a group chat with three users, one of whom has two published transports. Call them A with email address A1, B with email address B1, and C with email addresses C1 and C2.

It's possible for a message sent by A in this chat to fail due to message not delivering to either C1 or C2. In this case the user will get an error, despite the message successfully being delivered to everybody in the group chat. This has been causing a lot of confusion on a relay I administer.

I believe there needs to be another check inside handle_ndn to see if delivery has failed to all the addresses of any contact in the group, and only then should set_msg_failed be called. But so far DeliveryReport doesn't seem to store a list of the failed addresses in machine readable form. But that shouldn't be too hard to add. More importantly, I'm not sure what the best way of acquiring all the (contact_id, [addresses...]) pairs from the chat is.

@Hocuri
Copy link
Copy Markdown
Collaborator Author

Hocuri commented May 8, 2026

Yes, this needs further discussion. Another idea that was floating around is: Remember in a new table for which relays we got an NDN within the last week (or month, idk). If we get an NDN for all transports of a given contact, show an info message in the contact's chat.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants