Merge pull request #7462 from nextcloud/fix/fix-6701-Editing_outbox_message_selects_wrong_account/alias
fix(outbox): select correct account/alias when opening messages
This commit is contained in:
Коммит
a412bf6a50
|
@ -513,6 +513,10 @@ export default {
|
|||
type: Number,
|
||||
default: () => undefined,
|
||||
},
|
||||
fromAlias: {
|
||||
type: Number,
|
||||
default: undefined,
|
||||
},
|
||||
to: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
|
@ -836,8 +840,15 @@ export default {
|
|||
methods: {
|
||||
setAlias() {
|
||||
const previous = this.selectedAlias
|
||||
if (this.fromAccount) {
|
||||
this.selectedAlias = this.aliases.find((alias) => alias.id === this.fromAccount)
|
||||
if (this.fromAccount && this.fromAlias) {
|
||||
this.selectedAlias = this.aliases.find((alias) => {
|
||||
return alias.id === this.fromAccount && alias.aliasId === this.fromAlias
|
||||
})
|
||||
} else if (this.fromAccount) {
|
||||
// Default alias of account: aliasId === null
|
||||
this.selectedAlias = this.aliases.find((alias) => {
|
||||
return alias.id === this.fromAccount && !alias.aliasId
|
||||
})
|
||||
} else {
|
||||
this.selectedAlias = this.aliases[0]
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
@close="$emit('close', { restoreOriginalSendAt: true })">
|
||||
<Composer
|
||||
:from-account="composerData.accountId"
|
||||
:from-alias="composerData.aliasId"
|
||||
:to="composerData.to"
|
||||
:cc="composerData.cc"
|
||||
:bcc="composerData.bcc"
|
||||
|
|
Загрузка…
Ссылка в новой задаче