2024-05-23 09:42:14 +00:00
|
|
|
// SPDX-FileCopyrightText: 2024 John Livingston <https://www.john-livingston.fr/>
|
|
|
|
//
|
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
2024-04-30 16:30:44 +00:00
|
|
|
import { Model } from '@converse/skeletor/src/model.js'
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A chat room task.
|
|
|
|
* @class
|
2024-07-15 15:46:45 +00:00
|
|
|
* @namespace _converse.exports.ChatRoomTask
|
2024-04-30 16:30:44 +00:00
|
|
|
* @memberof _converse
|
|
|
|
*/
|
|
|
|
class ChatRoomTask extends Model {
|
|
|
|
idAttribute = 'id'
|
2024-05-06 15:26:20 +00:00
|
|
|
|
|
|
|
async saveItem () {
|
|
|
|
console.log('Saving task ' + this.get('id') + '...')
|
|
|
|
await this.collection.chatroom.taskManager.saveItem(this)
|
|
|
|
console.log('Task ' + this.get('id') + ' saved.')
|
|
|
|
}
|
|
|
|
|
|
|
|
async deleteItem () {
|
|
|
|
return this.collection.chatroom.taskManager.deleteItem(this)
|
|
|
|
}
|
2024-04-30 16:30:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export {
|
|
|
|
ChatRoomTask
|
|
|
|
}
|