mirror of
https://github.com/aljazceru/ditto.git
synced 2026-01-12 18:14:21 +01:00
feat(relay): send custom error messages - since, until & kind
This commit is contained in:
@@ -77,7 +77,10 @@ function connectStream(socket: WebSocket) {
|
||||
send(['EVENT', subId, event]);
|
||||
}
|
||||
} catch (e) {
|
||||
if (e instanceof RelayError) {
|
||||
if (
|
||||
e instanceof RelayError ||
|
||||
e.message.slice(-('filter too far into the future'.length)) === 'filter too far into the future'
|
||||
) {
|
||||
send(['CLOSED', subId, e.message]);
|
||||
} else {
|
||||
send(['CLOSED', subId, 'error: something went wrong']);
|
||||
|
||||
Reference in New Issue
Block a user