File tree Expand file tree Collapse file tree 2 files changed +2
-14
lines changed
Expand file tree Collapse file tree 2 files changed +2
-14
lines changed Original file line number Diff line number Diff line change 1111
1212use OCA \Talk \Chat \ChatManager ;
1313use OCA \Talk \ResponseDefinitions ;
14- use OCP \AppFramework \Db \Entity ;
14+ use OCP \AppFramework \Db \SnowflakeAwareEntity ;
1515use OCP \Comments \MessageTooLongException ;
1616use OCP \DB \Types ;
1717
1818/**
19- * @method string getId()
20- * @method void setId(string $id)
2119 * @method void setRoomId(int $roomId)
2220 * @method int getRoomId()
2321 * @method void setActorId(string $actorId)
3836 *
3937 * @psalm-import-type TalkScheduledMessage from ResponseDefinitions
4038 */
41- class ScheduledMessage extends Entity {
39+ class ScheduledMessage extends SnowflakeAwareEntity {
4240 public const METADATA_THREAD_TITLE = 'threadTitle ' ;
4341 public const METADATA_THREAD_ID = 'threadId ' ;
4442 public const METADATA_SILENT = 'silent ' ;
Original file line number Diff line number Diff line change 1010
1111use OCA \Talk \Room ;
1212use OCP \AppFramework \Db \DoesNotExistException ;
13- use OCP \AppFramework \Db \Entity ;
1413use OCP \AppFramework \Db \QBMapper ;
1514use OCP \DB \QueryBuilder \IQueryBuilder ;
1615use OCP \IDBConnection ;
17- use OCP \Snowflake \IGenerator ;
1816
1917/**
2018 * @method ScheduledMessage mapRowToEntity(array $row)
2725class ScheduledMessageMapper extends QBMapper {
2826 public function __construct (
2927 IDBConnection $ db ,
30- protected IGenerator $ generator ,
3128 ) {
3229 parent ::__construct ($ db , 'talk_scheduled_msg ' , ScheduledMessage::class);
3330 }
@@ -125,11 +122,4 @@ public function getMessagesDue(\DateTimeInterface $dateTime): array {
125122
126123 return $ this ->findEntities ($ query );
127124 }
128-
129- #[\Override]
130- public function insert (Entity $ entity ): Entity {
131- /** @psalm-suppress InvalidArgument */
132- $ entity ->setId ($ this ->generator ->nextId ());
133- return parent ::insert ($ entity );
134- }
135125}
You can’t perform that action at this time.
0 commit comments