@@ -4,6 +4,7 @@ import { path, pathEq } from 'ramda'
44import { createSettings } from '../../factories/settings-factory'
55import { escapeHtml } from '../../utils/html'
66import { FeeSchedule } from '../../@types/settings'
7+ import { DEFAULT_FILTER_LIMIT } from '../../constants/base'
78import { fromBech32 } from '../../utils/transform'
89import { getTemplate } from '../../utils/template-cache'
910import packageJson from '../../../package.json'
@@ -41,16 +42,16 @@ export const rootRequestHandler = (request: Request, response: Response, next: N
4142 const relayInformationDocument = {
4243 name,
4344 description,
44- banner,
45- icon,
45+ ... ( banner !== undefined ? { banner } : { } ) ,
46+ ... ( icon !== undefined ? { icon } : { } ) ,
4647 pubkey,
47- self,
48+ ... ( self !== undefined ? { self } : { } ) ,
4849 contact,
4950 supported_nips : packageJson . supportedNips ,
5051 supported_nip_extensions : packageJson . supportedNipExtensions ,
5152 software : packageJson . repository . url ,
5253 version : packageJson . version ,
53- terms_of_service,
54+ ... ( terms_of_service !== undefined ? { terms_of_service } : { } ) ,
5455 limitation : {
5556 max_message_length : settings . network . maxPayloadSize ,
5657 max_subscriptions : settings . limits ?. client ?. subscription ?. maxSubscriptions ,
@@ -67,7 +68,7 @@ export const rootRequestHandler = (request: Request, response: Response, next: N
6768 payment_required : settings . payments ?. enabled ,
6869 created_at_lower_limit : createdAtLimits ?. maxNegativeDelta ,
6970 created_at_upper_limit : createdAtLimits ?. maxPositiveDelta ,
70- default_limit : 500 ,
71+ default_limit : DEFAULT_FILTER_LIMIT ,
7172 restricted_writes : hasWriteRestriction ,
7273 } ,
7374 payments_url : paymentsUrl . toString ( ) ,
0 commit comments