Describe the bug
The message pipeline only uses the filer "deleted_at" and not expires_at. This will result in messages that are expired now still being sent to users. This is especially more problematic when we later enable gift-wrapped messages(in nip 42 project).
To Reproduce
Steps to reproduce the behavior:
- Generate a secret key using
openssl rand -hex 128 and set it in your env
- use the script
./scripts/start to start a relay server
- send a message with an expiry of say 3 sec and after 3 sec try to retrieve it again.
Expected behavior
A no message or an empty message
System (please complete the following information):
- OS: ubuntu 24.04
- Platform: docker
Logs
Connected: ws://127.0.0.1:8008
IN: [
'OK',
'7b335ac11548ff49e3ddf7c4d6634e7706ac8ce11abafc60e247abf658ee1e12',
true,
''
]
IN: [
'EVENT',
'before',
{
id: '7b335ac11548ff49e3ddf7c4d6634e7706ac8ce11abafc60e247abf658ee1e12',
kind: 1,
pubkey: '6aea200fe3cac06908496e47baebe68f88fa9cb85a1b7a8fa6f0d0abc426a36f',
created_at: 1775687029,
content: 'expiry-check-1775687029515',
tags: [ [Array] ],
sig: 'f1f4a115b0f40597065a9992880b635efefd4d35fc151eda6d87e0c393bc1ead6ebe4e633dc28ea07fba1a585d14e3a47bf6133b61eebd879982f60030a22185'
}
]
IN: [ 'EOSE', 'before' ]
IN: [
'EVENT',
'after',
{
id: '7b335ac11548ff49e3ddf7c4d6634e7706ac8ce11abafc60e247abf658ee1e12',
kind: 1,
pubkey: '6aea200fe3cac06908496e47baebe68f88fa9cb85a1b7a8fa6f0d0abc426a36f',
created_at: 1775687029,
content: 'expiry-check-1775687029515',
tags: [ [Array] ],
sig: 'f1f4a115b0f40597065a9992880b635efefd4d35fc151eda6d87e0c393bc1ead6ebe4e633dc28ea07fba1a585d14e3a47bf6133b61eebd879982f60030a22185'
}
]
IN: [ 'EOSE', 'after' ]
Result before expiry: FOUND
Result after expiry: FOUND
These are the result logs from a script that connects to the relay, sends a message with an expiry of 3 seconds and then again queries it.
Describe the bug
The message pipeline only uses the filer "deleted_at" and not expires_at. This will result in messages that are expired now still being sent to users. This is especially more problematic when we later enable gift-wrapped messages(in nip 42 project).
To Reproduce
Steps to reproduce the behavior:
openssl rand -hex 128and set it in your env./scripts/startto start a relay serverExpected behavior
A no message or an empty message
System (please complete the following information):
Logs
These are the result logs from a script that connects to the relay, sends a message with an expiry of 3 seconds and then again queries it.