From f4fe730dc9614f2ecac994a4b206355dc5f77df0 Mon Sep 17 00:00:00 2001 From: Jack Date: Sat, 9 Apr 2016 04:15:58 -0400 Subject: [PATCH] add get_start_notice to return startup messages --- lbrynet/lbrynet_daemon/LBRYDaemon.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lbrynet/lbrynet_daemon/LBRYDaemon.py b/lbrynet/lbrynet_daemon/LBRYDaemon.py index 0ef030026..247c96414 100644 --- a/lbrynet/lbrynet_daemon/LBRYDaemon.py +++ b/lbrynet/lbrynet_daemon/LBRYDaemon.py @@ -113,7 +113,7 @@ class LBRYDaemon(jsonrpc.JSONRPC): if not self.announced_startup: if functionPath not in ['is_running', 'is_first_run', 'get_time_behind_blockchain', 'stop', - 'daemon_status']: + 'daemon_status', 'get_start_notice']: return server.failure try: @@ -883,6 +883,12 @@ class LBRYDaemon(jsonrpc.JSONRPC): 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): """ Get LBRY payment settings