Allow setting default text for media messages

This commit is contained in:
N-Pex 2025-06-26 12:11:58 +02:00
parent a0109f93af
commit b0fae3396d
2 changed files with 10 additions and 2 deletions

View file

@ -206,12 +206,20 @@ export default defineComponent({
components: { C2PABadge, AttachmentInfo },
emits: ["pick-file", "close"],
props: {
defaultRootMessageText: {
type: String,
default: function () {
return ""
}
},
showBackButton: {
type: Boolean,
default: function () {
return true;
},
},
batch: {
type: Object,
default: function () {
@ -295,7 +303,7 @@ export default defineComponent({
sendAll() {
this.status = this.mainStatuses.SENDING;
this.batch
.send(this.messageInput && this.messageInput.length > 0 ? this.messageInput : this.$t("file_mode.files"))
.send(this.messageInput && this.messageInput.length > 0 ? this.messageInput : this.defaultRootMessageText)
.then(() => {
this.status = this.mainStatuses.SENT;
});