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:
parent
e9739cd806
commit
baa654a37a
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user