Skip to content

Conversation

@iklobato
Copy link

@iklobato iklobato commented Oct 26, 2025

This PR implements the ability to star messages and archive chats. It includes database schema changes, new API endpoints, and UI updates to support this functionality.

Im not a C++ dev so Im not how to test it properly because I did not find any unit test on this repo

@d99kris d99kris self-assigned this Oct 26, 2025
@d99kris
Copy link
Owner

d99kris commented Oct 26, 2025

Hi @iklobato - thanks for contributing! Ideally though, especially for feature addititions, I prefer to discuss the planned design upfront. So the preferred workflow would be; report feature request, discuss the design there, and then raise a PR (one per feature).

Anyway, it's nice to see that you followed the existing design / code structure, I think the main concern is that this PR introduces some local state (starred / archived chats) not synced with chat service providers. Generally, for supported functions, the goal is for nchat to stay in sync with the official app state.

So, the archive chat feature should ideally be designed to send an archive chat request to the chat protocol. Then upon receiving an update from the chat protocol that a chat is archived, it would update its db and ui. This way a user can archive a chat either on the phone app, or via nchat, and the result would be the same. Additionally, in the case of archived chats it's also a question on how to access / unarchive chats. Either (if they can be fetched from servers) a special dialog could be added, or we could leverage the address book, which already opens an archived chat if it exists (I believe), but might not change its archived status today (so that would need to be added).

As for starred chats I'm slightly hesitant, as I'm not aware of a similar concept across supported chat protocols (telegram and whatsapp). I see WhatsApp allows adding chats to favorites, but I don't see the same function in Telegram. Possibly it could be added as a WhatsApp-only feature. Btw today nchat already supports pinned chats, I'm wondering if that is perhaps sufficient?

@iklobato
Copy link
Author

Hi @iklobato - thanks for contributing! Ideally though, especially for feature addititions, I prefer to discuss the planned design upfront. So the preferred workflow would be; report feature request, discuss the design there, and then raise a PR (one per feature).

Anyway, it's nice to see that you followed the existing design / code structure, I think the main concern is that this PR introduces some local state (starred / archived chats) not synced with chat service providers. Generally, for supported functions, the goal is for nchat to stay in sync with the official app state.

So, the archive chat feature should ideally be designed to send an archive chat request to the chat protocol. Then upon receiving an update from the chat protocol that a chat is archived, it would update its db and ui. This way a user can archive a chat either on the phone app, or via nchat, and the result would be the same. Additionally, in the case of archived chats it's also a question on how to access / unarchive chats. Either (if they can be fetched from servers) a special dialog could be added, or we could leverage the address book, which already opens an archived chat if it exists (I believe), but might not change its archived status today (so that would need to be added).

As for starred chats I'm slightly hesitant, as I'm not aware of a similar concept across supported chat protocols (telegram and whatsapp). I see WhatsApp allows adding chats to favorites, but I don't see the same function in Telegram. Possibly it could be added as a WhatsApp-only feature. Btw today nchat already supports pinned chats, I'm wondering if that is perhaps sufficient?

Hello! First of all, thanks for sharing this awesome project, I’ve been using it for a few days now and it’s been working great!

My goal is to replicate the behavior found in WhatsApp Web, and yes, the starred messages would serve the same purpose as the “favorite” ones.

Sometimes I feel the contacts sidebar gets a bit “noisy,” especially since we don’t have images and channels show only their IDs instead of names, which makes the UI look a bit cluttered. Is there currently any feature that allows hiding certain channels or grouping together only a selected list of contacts/numbers?

Thanks again for your work and for taking the time to reply!

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.

2 participants