diff --git a/beem/cli.py b/beem/cli.py index a86cbe8fe95a1020885d12a6598d394a3a0f7d15..49cb386faeb25b4d874e2dbeaf1936c842a5cebd 100644 --- a/beem/cli.py +++ b/beem/cli.py @@ -1657,10 +1657,10 @@ def reply(authorperm, body, account, title): account = stm.config["default_account"] if not unlock_wallet(stm): return - c = Comment(authorperm, steem_instance=stm) + if title is None: title = "" - tx = c.reply(body, title=title, author=account) + tx = stm.post(title, body, json_metadata=None, author=account, reply_identifier=authorperm) if stm.unsigned and stm.nobroadcast and stm.steemconnect is not None: tx = stm.steemconnect.url_from_tx(tx) tx = json.dumps(tx, indent=4) diff --git a/beem/comment.py b/beem/comment.py index dbd21b0817a4afc237e003209511a737d058df62..ce1c7cd3b874ce3ad877432573130a23a2984c67 100644 --- a/beem/comment.py +++ b/beem/comment.py @@ -283,12 +283,18 @@ class Comment(BlockchainObject): def is_main_post(self): """ Returns True if main post, and False if this is a comment (reply). """ - return self['depth'] == 0 + if 'depth' in self: + return self['depth'] == 0 + else: + return self["parent_author"] == '' def is_comment(self): """ Returns True if post is a comment """ - return self['depth'] > 0 + if 'depth' in self: + return self['depth'] > 0 + else: + return self["parent_author"] != '' @property def reward(self): diff --git a/beem/version.py b/beem/version.py index 9c92f69296543abe5d1138c71b3a9ce78df859b2..ca13ec233e824971a6571c11869016e231c23215 100644 --- a/beem/version.py +++ b/beem/version.py @@ -1,2 +1,2 @@ """THIS FILE IS GENERATED FROM beem SETUP.PY.""" -version = '0.21.1' +version = '0.22.0' diff --git a/beemapi/version.py b/beemapi/version.py index 9c92f69296543abe5d1138c71b3a9ce78df859b2..ca13ec233e824971a6571c11869016e231c23215 100644 --- a/beemapi/version.py +++ b/beemapi/version.py @@ -1,2 +1,2 @@ """THIS FILE IS GENERATED FROM beem SETUP.PY.""" -version = '0.21.1' +version = '0.22.0' diff --git a/beembase/version.py b/beembase/version.py index 9c92f69296543abe5d1138c71b3a9ce78df859b2..ca13ec233e824971a6571c11869016e231c23215 100644 --- a/beembase/version.py +++ b/beembase/version.py @@ -1,2 +1,2 @@ """THIS FILE IS GENERATED FROM beem SETUP.PY.""" -version = '0.21.1' +version = '0.22.0' diff --git a/beemgraphenebase/version.py b/beemgraphenebase/version.py index 9c92f69296543abe5d1138c71b3a9ce78df859b2..ca13ec233e824971a6571c11869016e231c23215 100644 --- a/beemgraphenebase/version.py +++ b/beemgraphenebase/version.py @@ -1,2 +1,2 @@ """THIS FILE IS GENERATED FROM beem SETUP.PY.""" -version = '0.21.1' +version = '0.22.0' diff --git a/setup.py b/setup.py index 9230119d00134b29686be927c9c6f60b977f06a0..f1f39c793a07b31d03ffbe31dcc0b0eefcd1998f 100755 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ except LookupError: ascii = codecs.lookup('ascii') codecs.register(lambda name, enc=ascii: {True: enc}.get(name == 'mbcs')) -VERSION = '0.21.1' +VERSION = '0.22.0' tests_require = ['mock >= 2.0.0', 'pytest', 'pytest-mock', 'parameterized']