mirror of
https://github.com/Cameri/nostream.git
synced 2025-03-18 05:41:49 +01:00
fix: deleted_at not saved in UTC tz
Signed-off-by: Ricardo Arturo Cabral Mejía <me@ricardocabral.io>
This commit is contained in:
parent
dbf8a7f345
commit
297a07e281
@ -245,7 +245,7 @@ export class EventRepository implements IEventRepository {
|
||||
event_signature: pipe(always(''), toBuffer),
|
||||
event_delegator: always(null),
|
||||
event_deduplication: pipe(always([pubkey, 5]), toJSON),
|
||||
deleted_at: always(date),
|
||||
deleted_at: always(date.toISOString()),
|
||||
})
|
||||
)
|
||||
)
|
||||
|
@ -451,7 +451,7 @@ describe('EventRepository', () => {
|
||||
it('insert stubs by pubkey & event ids', () => {
|
||||
const query = repository.insertStubs('001122', ['aabbcc', 'ddeeff']).toString()
|
||||
|
||||
expect(query).to.equal('insert into "events" ("deleted_at", "event_content", "event_created_at", "event_deduplication", "event_delegator", "event_id", "event_kind", "event_pubkey", "event_signature", "event_tags") values (\'1970-01-20 03:57:15.425\', \'\', 1673835, \'["001122",5]\', NULL, X\'aabbcc\', 5, X\'001122\', X\'\', \'[]\'), (\'1970-01-20 03:57:15.425\', \'\', 1673835, \'["001122",5]\', NULL, X\'ddeeff\', 5, X\'001122\', X\'\', \'[]\') on conflict do nothing')
|
||||
expect(query).to.equal('insert into "events" ("deleted_at", "event_content", "event_created_at", "event_deduplication", "event_delegator", "event_id", "event_kind", "event_pubkey", "event_signature", "event_tags") values (\'1970-01-20T08:57:15.425Z\', \'\', 1673835, \'["001122",5]\', NULL, X\'aabbcc\', 5, X\'001122\', X\'\', \'[]\'), (\'1970-01-20T08:57:15.425Z\', \'\', 1673835, \'["001122",5]\', NULL, X\'ddeeff\', 5, X\'001122\', X\'\', \'[]\') on conflict do nothing')
|
||||
})
|
||||
})
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user