add get_start_notice to return startup messages

This commit is contained in:
Jack 2016-04-09 04:15:58 -04:00
parent a4c83a08c7
commit f4fe730dc9

View file

@ -113,7 +113,7 @@ class LBRYDaemon(jsonrpc.JSONRPC):
if not self.announced_startup: if not self.announced_startup:
if functionPath not in ['is_running', 'is_first_run', if functionPath not in ['is_running', 'is_first_run',
'get_time_behind_blockchain', 'stop', 'get_time_behind_blockchain', 'stop',
'daemon_status']: 'daemon_status', 'get_start_notice']:
return server.failure return server.failure
try: try:
@ -883,6 +883,12 @@ class LBRYDaemon(jsonrpc.JSONRPC):
return d return d
def jsonrpc_get_start_notice(self):
if self.startup_message:
return self._render_response(self.startup_message, OK_CODE)
else:
return defer.fail(None)
def jsonrpc_get_settings(self): def jsonrpc_get_settings(self):
""" """
Get LBRY payment settings Get LBRY payment settings