Repository navigation
feat(rooms): a room page can send a chat message (rooms.putMessage) - #453
Merged
Merged
Conversation
The member portal could add only notes, because putNote is the one write a
page has and it requires a title. Keyring shows a record with text and no
title as an ordinary chat message, so a portal member could not answer in
a room's chat.
rooms.putMessage({ hostDid, roomId, body }) writes the text with no title,
as the member, through writeMessageAsMember in @openvtc/pnm-core/rooms:
kind "message" and writtenAt where the room's profile lists them, else an
untitled record, which the reading rules show as a message. Sealed on
attributed and private rooms, in the clear on open ones.
Same gates as putNote: the page is the community's portal, the room is
shared with it, the share's member is used, never the page's, and the
write is confirmed in the wallet's window, worded as a message.
Signed-off-by: Glenn Gore <glenn.g@affinidi.com>
stormer78
added a commit
to OpenVTC/verifiable-trust-infrastructure
that referenced
this pull request
Nov 25, 2026
…onversation scrolls A member could add only notes to a room from the portal: the compose panel took a title and a note, and refused an empty title. Keyring shows a room record with text and no title as an ordinary chat message, so a portal member could not answer a conversation going on in Keyring. The compose panel now has a Note / Message switch. It starts on Note, as asked, and remembers the member's last choice in this browser. Message is one box: Enter sends, Shift+Enter starts a new line. It writes through the wallet's new rooms.putMessage (OpenVTC/vta-browser-plugin#453), which writes the text with no title and kind "message" where the room takes it, confirmed in the wallet's window like any write. A wallet without putMessage is offered notes only. The conversation scrolls in its own window, sized to the screen and opened at the newest message. It follows new messages while the member is at the bottom, or when the newest one is their own, and never pulls them down from something older they scrolled up to read. Only the layout changes: the order is still the wallet's, so the portal, the wallet and Keyring show the room alike. Signed-off-by: Glenn Gore <glenn.g@affinidi.com>
stormer78
added a commit
to OpenVTC/verifiable-trust-infrastructure
that referenced
this pull request
Nov 25, 2026
…onversation scrolls (#2820) A member could add only notes to a room from the portal: the compose panel took a title and a note, and refused an empty title. Keyring shows a room record with text and no title as an ordinary chat message, so a portal member could not answer a conversation going on in Keyring. The compose panel now has a Note / Message switch. It starts on Note, as asked, and remembers the member's last choice in this browser. Message is one box: Enter sends, Shift+Enter starts a new line. It writes through the wallet's new rooms.putMessage (OpenVTC/vta-browser-plugin#453), which writes the text with no title and kind "message" where the room takes it, confirmed in the wallet's window like any write. A wallet without putMessage is offered notes only. The conversation scrolls in its own window, sized to the screen and opened at the newest message. It follows new messages while the member is at the bottom, or when the newest one is their own, and never pulls them down from something older they scrolled up to read. Only the layout changes: the order is still the wallet's, so the portal, the wallet and Keyring show the room alike. Signed-off-by: Glenn Gore <glenn.g@affinidi.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
A community member portal can write to a room only with
rooms.putNote, which requires a title. Keyring shows a record that has text and no title as an ordinary chat message. So a member using the portal could not reply in a room's chat: everything they wrote showed up as a note with a title.What
@openvtc/pnm-core/roomswriteMessageAsMember(room, { body })writes the text with notitle, as the member.kind: "message"andwrittenAt, so every reader shows it as a message.shownKind).attributed/privaterooms and stored in the clear onopenones. Writes are create-only, and an empty message is refused before anything is sent.window.vtaWallet.rooms.putMessage({ hostDid, roomId, body })has the same gates asputNote:SignInPortalorigin);putNotestill requires a title. A note and a message are different records, and a page that offers both says which one it is writing.The VTI member portal's compose panel will use this behind a Note / Message switch (VTI PR to follow), and will offer only notes to a wallet that has no
putMessage.Tests
kind,body,writtenAt, no title, signed as the member), the untitled fallback, the open-room cleartext, and refusal of an empty message.npm run lint,npm test(core 1336, extension 1578),npm run buildandcheck-task-versionsall pass locally.