(pubkey: string, eventIdsToDelete: EventId[])
| 365 | } |
| 366 | |
| 367 | public deleteByPubkeyAndIds(pubkey: string, eventIdsToDelete: EventId[]): Promise<number> { |
| 368 | logger('deleting events from %s: %o', pubkey, eventIdsToDelete) |
| 369 | |
| 370 | return this.masterDbClient('events') |
| 371 | .where('event_pubkey', toBuffer(pubkey)) |
| 372 | .whereIn('event_id', map(toBuffer)(eventIdsToDelete)) |
| 373 | .whereNot('event_kind', EventKinds.REQUEST_TO_VANISH) |
| 374 | .whereNull('deleted_at') |
| 375 | .update({ |
| 376 | deleted_at: this.masterDbClient.raw('now()'), |
| 377 | }) |
| 378 | } |
| 379 | |
| 380 | public deleteByPubkeyExceptKinds(pubkey: string, excludedKinds: number[]): Promise<number> { |
| 381 | logger('deleting events from %s except kinds %o', pubkey, excludedKinds) |
nothing calls this directly
no test coverage detected