From 0231139b0199d93a294685b4ee29850553e188e8 Mon Sep 17 00:00:00 2001 From: jessop Date: Sun, 27 Sep 2020 16:36:51 -0400 Subject: [PATCH] support anonymous react_list --- lbry/extras/daemon/daemon.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lbry/extras/daemon/daemon.py b/lbry/extras/daemon/daemon.py index e29c97cf1..8da6812b7 100644 --- a/lbry/extras/daemon/daemon.py +++ b/lbry/extras/daemon/daemon.py @@ -5334,8 +5334,7 @@ class Daemon(metaclass=JSONRPCServerType): Usage: comment_react_list (--comment_ids=) - (--channel_id=) - (--channel_name=) + [(--channel_id=)(--channel_name=)] [--react_types=] Options: @@ -5363,19 +5362,20 @@ class Daemon(metaclass=JSONRPCServerType): } """ wallet = self.wallet_manager.get_wallet_or_default(wallet_id) - channel = await self.get_channel_or_error( - wallet, channel_account_id, channel_id, channel_name, for_signing=True - ) - react_list_body = { 'comment_ids': comment_ids, - 'channel_id': channel_id, - 'channel_name': channel.claim_name, } + if channel_id: + channel = await self.get_channel_or_error( + wallet, channel_account_id, channel_id, channel_name, for_signing=True + ) + react_list_body['channel_id'] = channel_id + react_list_body['channel_name'] = channel.claim_name if react_types: react_list_body['types'] = react_types - comment_client.sign_reaction(react_list_body, channel) + if channel_id: + comment_client.sign_reaction(react_list_body, channel) response = await comment_client.jsonrpc_post(self.conf.comment_server, 'reaction.List', react_list_body) return response