Skip to content

Commit

Permalink
Merge pull request #6233 from nextcloud/fix/fix-undo-with-scheduled-m…
Browse files Browse the repository at this point in the history
…essage

Fix sending message workflow
  • Loading branch information
miaulalala authored Apr 14, 2022
2 parents 8088a1f + 1d35e0e commit 1fa3a56
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/NewMessageModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,10 @@ export default {
attachments: data.attachments,
aliasId: data.aliasId,
inReplyToMessageId: null,
sendAt: data.sendAt ? data.sendAt : Math.floor(now / 1000),
sendAt: data.sendAt ? data.sendAt : Math.floor((now + UNDO_DELAY) / 1000),
}
if (dataForServer.sendAt < Math.floor(now / 1000)) {
dataForServer.sendAt = Math.floor(now / 1000)
if (dataForServer.sendAt < Math.floor((now + UNDO_DELAY) / 1000)) {
dataForServer.sendAt = Math.floor((now + UNDO_DELAY) / 1000)
}
let message
Expand All @@ -135,7 +135,7 @@ export default {
})
}
if (!data.sendAt) {
if (!data.sendAt || data.sendAt < Math.floor((now + UNDO_DELAY) / 1000)) {
showUndo(
t('mail', 'Message sent'),
async() => {
Expand Down

0 comments on commit 1fa3a56

Please sign in to comment.