2024-04-30 16:30:44 +00:00
|
|
|
import { Model } from '@converse/skeletor/src/model.js'
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A chat room task.
|
|
|
|
* @class
|
|
|
|
* @namespace _converse.ChatRoomTask
|
|
|
|
* @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
|
|
|
|
}
|