fix: Handle rich message signatures & attachment overflow (#13045)

This commit is contained in:
Sivin Varghese
2025-12-10 23:13:04 +05:30
committed by GitHub
parent 89d02e2c92
commit f2054e703a
9 changed files with 197 additions and 63 deletions

View File

@@ -370,7 +370,7 @@ function addSignature() {
// see if the content is empty, if it is before appending the signature
// we need to add a paragraph node and move the cursor at the start of the editor
const contentWasEmpty = isBodyEmpty(content);
content = appendSignature(content, props.signature);
content = appendSignature(content, props.signature, props.channelType);
// need to reload first, ensuring that the editorView is updated
reloadState(content);

View File

@@ -565,7 +565,7 @@ export default {
}
return this.sendWithSignature
? appendSignature(message, this.messageSignature)
? appendSignature(message, this.messageSignature, this.channelType)
: removeSignature(message, this.messageSignature);
},
removeFromDraft() {
@@ -757,7 +757,11 @@ export default {
// if signature is enabled, append it to the message
// appendSignature ensures that the signature is not duplicated
// so we don't need to check if the signature is already present
message = appendSignature(message, this.messageSignature);
message = appendSignature(
message,
this.messageSignature,
this.channelType
);
}
const updatedMessage = replaceVariablesInMessage({
@@ -796,7 +800,11 @@ export default {
this.message = '';
if (this.sendWithSignature && !this.isPrivate) {
// if signature is enabled, append it to the message
this.message = appendSignature(this.message, this.messageSignature);
this.message = appendSignature(
this.message,
this.messageSignature,
this.channelType
);
}
this.attachedFiles = [];
this.isRecordingAudio = false;