Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions lib/Model/ScheduledMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@

use OCA\Talk\Chat\ChatManager;
use OCA\Talk\ResponseDefinitions;
use OCP\AppFramework\Db\Entity;
use OCP\AppFramework\Db\SnowflakeAwareEntity;
use OCP\Comments\MessageTooLongException;
use OCP\DB\Types;

/**
* @method string getId()
* @method void setId(string $id)
* @method void setRoomId(int $roomId)
* @method int getRoomId()
* @method void setActorId(string $actorId)
Expand All @@ -38,7 +36,7 @@
*
* @psalm-import-type TalkScheduledMessage from ResponseDefinitions
*/
class ScheduledMessage extends Entity {
class ScheduledMessage extends SnowflakeAwareEntity {
public const METADATA_THREAD_TITLE = 'threadTitle';
public const METADATA_THREAD_ID = 'threadId';
public const METADATA_SILENT = 'silent';
Expand Down
8 changes: 0 additions & 8 deletions lib/Model/ScheduledMessageMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

use OCA\Talk\Room;
use OCP\AppFramework\Db\DoesNotExistException;
use OCP\AppFramework\Db\Entity;
use OCP\AppFramework\Db\QBMapper;
use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\IDBConnection;
Expand Down Expand Up @@ -127,11 +126,4 @@ public function getMessagesDue(\DateTime $dateTime): array {

return $this->findEntities($query);
}

#[\Override]
public function insert(Entity $entity): Entity {
/** @psalm-suppress InvalidArgument */
$entity->setId($this->generator->nextId());
return parent::insert($entity);
}
}