| @@ -14,6 +14,13 @@ export class Muting { | ||||
| 	}) | ||||
| 	public createdAt: Date; | ||||
|  | ||||
| 	@Index() | ||||
| 	@Column('timestamp with time zone', { | ||||
| 		nullable: true, | ||||
| 		default: null, | ||||
| 	}) | ||||
| 	public expiresAt: Date | null; | ||||
|  | ||||
| 	@Index() | ||||
| 	@Column({ | ||||
| 		...id(), | ||||
|   | ||||
| @@ -16,6 +16,7 @@ export class MutingRepository extends Repository<Muting> { | ||||
| 		return await awaitAll({ | ||||
| 			id: muting.id, | ||||
| 			createdAt: muting.createdAt.toISOString(), | ||||
| 			expiresAt: muting.expiresAt ? muting.expiresAt.toISOString() : null, | ||||
| 			muteeId: muting.muteeId, | ||||
| 			mutee: Users.pack(muting.muteeId, me, { | ||||
| 				detail: true, | ||||
|   | ||||
| @@ -12,6 +12,11 @@ export const packedMutingSchema = { | ||||
| 			optional: false, nullable: false, | ||||
| 			format: 'date-time', | ||||
| 		}, | ||||
| 		expiresAt: { | ||||
| 			type: 'string', | ||||
| 			optional: false, nullable: true, | ||||
| 			format: 'date-time', | ||||
| 		}, | ||||
| 		muteeId: { | ||||
| 			type: 'string', | ||||
| 			optional: false, nullable: false, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 syuilo
					syuilo