1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-12-21 21:30:08 +00:00

Relay the attachmentId in send event

This commit is contained in:
Tim Düsterhus 2020-11-01 11:57:30 +01:00
parent e9739cd806
commit baa654a37a
Signed by: TimWolla
GPG Key ID: 8FF75566094168AF

View File

@ -82,9 +82,11 @@ define([ 'WoltLabSuite/Core/Language'
elShow(this.uploadDescription)
}
async send(event) {
async send(attachmentId, event) {
event.preventDefault()
const parameters = { promise: Promise.resolve() }
const parameters = { promise: Promise.resolve()
, attachmentId
}
this.emit('send', parameters)
try {
@ -115,7 +117,7 @@ define([ 'WoltLabSuite/Core/Language'
sendButton.classList.add('button')
sendButton.dataset.objectId = objectID
sendButton.innerText = Language.get('wcf.global.button.submit')
sendButton.addEventListener('click', (e) => this.send(e))
sendButton.addEventListener('click', (e) => this.send(objectID, e))
li.appendChild(sendButton)
buttonGroup.appendChild(li)