peertube-plugin-livechat/conversejs/custom/plugins/tasks/task-list.js
2024-05-13 10:52:32 +02:00

23 lines
407 B
JavaScript

import { Model } from '@converse/skeletor/src/model.js'
/**
* A chat room task list.
* @class
* @namespace _converse.ChatRoomTaskList
* @memberof _converse
*/
class ChatRoomTaskList extends Model {
idAttribute = 'id'
getTasks () {
const taskListId = this.get('id')
return this.collection?.chatroom?.tasks?.filter({
list: taskListId
}) ?? []
}
}
export {
ChatRoomTaskList
}