prepare backend for inline replies

This commit is contained in:
marlon-erler
2026-04-14 11:28:43 +00:00
parent 311e6770c3
commit e0b3a85681
3 changed files with 13 additions and 7 deletions
+3 -1
View File
@@ -180,6 +180,7 @@ export default class ChatModel {
sendMessage = async (
body: string,
replyId?: string,
fileContent?: FileContent<string>,
): Promise<boolean> => {
const nameAndChannel = this.getNameAndChannel();
@@ -227,7 +228,7 @@ export default class ChatModel {
content,
isDeleting,
);
this.sendMessage("", reaction);
this.sendMessage("", undefined, reaction);
this.handleReaction(reaction);
};
@@ -466,6 +467,7 @@ export interface ChatMessage extends ValidObject {
readonly sender: string;
body: string;
readonly dateSent: string;
readonly inlineReplyId?: string;
status: ChatMessageStatuses;
+4 -2
View File
@@ -23,7 +23,8 @@ export default class MessagePageViewModel extends Context {
reactionFilter = new React.State<ReactionSymbols | undefined>(undefined);
isFilterActive: React.State<boolean>;
composingMessage: React.State<string> = new React.State("");
replyingMessageId = new React.State<string|undefined>(undefined)
composingMessage = new React.State<string>("");
// guards
cannotSendMessage: React.State<boolean>;
@@ -37,7 +38,8 @@ export default class MessagePageViewModel extends Context {
};
sendMessageFromBody = (body: string): void => {
this.chatViewModel.chatModel.sendMessage(body);
this.chatViewModel.chatModel.sendMessage(body, this.replyingMessageId.value);
this.replyingMessageId.value = undefined;
};
decryptMessage = async (