Skip to content

Commit

Permalink
Merge pull request #120 from nextcloud/fix/noid/notification-open-task
Browse files Browse the repository at this point in the history
Fix missing destructured param when calling openAssistantTask
  • Loading branch information
julien-nc authored Aug 27, 2024
2 parents f6c298c + f200109 commit 8b0db3f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/assistant.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ export function handleNotification(event) {
async function showAssistantTaskResult(taskId) {
getTask(taskId).then(response => {
console.debug('showing results for task', response.data?.ocs?.data?.task)
openAssistantTask(response.data?.ocs?.data?.task)
openAssistantTask(response.data?.ocs?.data?.task, {})
}).catch(error => {
if (error.response?.status === 401) {
showError(t('assistant', 'Please log in to view the task result'))
Expand All @@ -315,7 +315,7 @@ async function showAssistantTaskResult(taskId) {
* @param {Array} params.actionButtons List of extra buttons to show in the assistant result form
* @return {Promise<void>}
*/
export async function openAssistantTask(task, { isInsideViewer = undefined, actionButtons = undefined }) {
export async function openAssistantTask(task, { isInsideViewer = undefined, actionButtons = undefined } = {}) {
const { default: Vue } = await import(/* webpackChunkName: "vue-lazy" */'vue')
Vue.mixin({ methods: { t, n } })
const { showError } = await import(/* webpackChunkName: "dialogs-lazy" */'@nextcloud/dialogs')
Expand Down

0 comments on commit 8b0db3f

Please sign in to comment.