@ -3,18 +3,8 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { XMLNS_POLL } from './constants.js'
|
||||
import { converse, _converse, api } from '../../../src/headless/core.js'
|
||||
import { _converse, api } from '../../../src/headless/core.js'
|
||||
import { __ } from 'i18n'
|
||||
const $iq = converse.env.$iq
|
||||
|
||||
function _fetchPollForm (mucModel) {
|
||||
return api.sendIQ(
|
||||
$iq({
|
||||
to: mucModel.get('jid'),
|
||||
type: 'get'
|
||||
}).c('query', { xmlns: XMLNS_POLL })
|
||||
)
|
||||
}
|
||||
|
||||
export function getHeadingButtons (view, buttons) {
|
||||
const muc = view.model
|
||||
@ -39,9 +29,7 @@ export function getHeadingButtons (view, buttons) {
|
||||
i18n_text: __(LOC_new_poll),
|
||||
handler: async (ev) => {
|
||||
ev.preventDefault()
|
||||
const r = await _fetchPollForm(muc)
|
||||
// FIXME
|
||||
console.info('Received poll form', r)
|
||||
api.modal.show('livechat-converse-poll-form-modal', { model: muc })
|
||||
},
|
||||
a_class: '',
|
||||
icon_class: 'fa-list-check', // FIXME
|
||||
|
Reference in New Issue
Block a user