Skip to content

Added features: Forwarding Message, Editing Message & Starred Messages - #269

Open
techyminati wants to merge 8 commits into
HelloVolla:developfrom
MinatiScape:develop
Open

techyminati wants to merge 8 commits into
HelloVolla:developfrom
MinatiScape:develop

Conversation

@techyminati

Copy link
Copy Markdown
Contributor

Summary

  • Added Starring, forwarded & editing message.
  • Common features, their implementation & inspired is by whatsapp & telegram app.

review @Amirhesp

techyminati and others added 7 commits November 4, 2026 14:31
Add a Forward action to messages, letting users send an existing
message's text and attachments to another conversation.

Change-Id: I8e6c0c45736115d7e12f8dfae8ff85c5d63bfb6f
Adds a star toggle to the message actions. Starred messages are
remembered locally by action hash and show a small star under the
bubble. Handy for pinning something important without sharing that
choice with anyone else.

Change-Id: I967cee4bbf1d0e56b19b5a0af91b0a13898a4bb5
Signed-off-by: techyminati <techyminati@outlook.com>
Wires up the existing update_message zome call. The author picks Edit
from the message actions, changes the text, and the update is written
to the DHT and reflected locally with an "edited" marker. Edits follow
the update chain so a message can be changed more than once.

NOTE:- Peers pick up the new text when they refetch the message; there's no
live update signal yet, so this is deliberately author-side for now.

Change-Id: I8d407b03f684e0e9656e6867d1974a4f4c18e75d
Signed-off-by: techyminati <techyminati@outlook.com>
Change-Id: I04cf59b897511ca58d1a336d201fdcab725a6da2
Signed-off-by: techyminati <techyminati@outlook.com>
update_message only wrote the edit to the local chain, so peers never
saw it. It now broadcasts the edit the same way create_message does,
keyed by the original message hash, and the receiving client swaps the
new content into the message it already has instead of treating it as a
new one. The edit carries the participant list so the signal reaches
everyone in the conversation.

Change-Id: I4e283a23820ebd12635f2cbe558c287a4722f599
Signed-off-by: techyminati <techyminati@outlook.com>
Add "Starred Messages" entry in conversation list which opens starred messages just like whatsapp.

Change-Id: I82b2def7c84ceb6e8301d37150c0ea5dfbe9fab5
Signed-off-by: techyminati <techyminati@outlook.com>
Forwarding now marks the new message with a forwarded flag, and the
bubble shows a small "Forwarded" tag. Adds an optional forwarded field
to the message entry (defaulted so old messages still read back).

Change-Id: I0423176181bbe9dcbb7581b9bb1e7418d2fa4295
Signed-off-by: techyminati <techyminati@outlook.com>
@techyminati
techyminati requested a review from Amirhesp November 4, 2026 10:16
Change-Id: I571525cb631420755aac7025c32cc7c40aba18b8
Signed-off-by: techyminati <techyminati@outlook.com>
@Amirhesp

Copy link
Copy Markdown
Collaborator

@techyminati
Thanks for the PR, these are useful features. Requesting changes before merge; here's what I found.

Blocking (security)

Edit spoofing: handleMessageUpdatedSignalReceived applies a MessageUpdated signal without checking the sender. Please ignore it unless from equals the original message's author and the update action is authored by from. Better still, re-fetch the latest version from the DHT instead of trusting the signal's content. Right now any member can rewrite others' messages on recipients' devices, and it persists in their cache.

No author check on updates: validate_update_message accepts any update, and get_latest_message takes the newest update from any author. Now that editing is in the UI, please add to integrity: an update's author must equal the original message's author; and filter get_latest_message by that author. This is an integrity change, so it must land before the 2.0 DNA is frozen.

Group description: any member of a public group can edit it, and saving rewrites the group's settings (title, picture). Please restrict it the same way as title and picture.

Also needed:

Two new type errors: Update isn't imported in types.ts, and MessageType.Reaction doesn't exist (SignalHandler.ts).
Tests: an update by a non-author is rejected; old messages and settings without the new fields still decode; a spoofed edit signal is ignored.
The "edited" label is lost after a restart; please derive it when messages load.
Forwarding: tell the user when an image couldn't be forwarded.

Scope and timing: Message and Config are integrity types, so this changes the 2.0 DNA hash, and it overlaps with the moderation PRs (#231, #238, #240), which change the same structs. Could you split it?

Stars (UI only) can go in once the type errors are fixed. Forwarding, editing and the description would go in together with the other 2.0 integrity changes, before we build the 2.0 happ.

Synchronization and cache (also blocking)

Edits only reach other devices through one MessageUpdated signal. Devices that miss it (offline, Lite, members without a profile) keep the old text forever, because the loading pipeline skips messages already in IndexedDB. Please re-fetch the latest version of cached messages that have updates when a chat loads; keep the signal as a fast path only.
The "edited" marker should be recomputed when loading from the network, not only set during the session.
The starred view only lists messages already loaded in memory. It should read from the message cache (or fetch), so stars from unopened chats appear.
Coordination

Moderation (#231/#238/#240) changes the same Message/Config structs and their validation. Description edits by members would be rejected under #231, and forwarding into moderated chats needs role evidence. Updates should also require membership, so removed members can't edit.

Please rebase after #279 (the hidden-messages and history-loading fixes on develop), since both touch ConversationMessageStore.ts.

This branch has not been deployed

No deployments
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.

3 participants