RE: LeoThread 2024-12-27 15:37

You are viewing a single comment's thread:

I see InLeo also display low rating comments from users even with negative reputation. I believe this shouldn't happen.

#feedback #ui #filtering #hive #inleo



0
0
0.000
17 comments
avatar

I don't think that's a problem because some people get negative reputation by mistake.

But I believe there should be a MUTE button and a way for the user to hide all these low reputation users.

0
0
0.000
avatar

This is a programatically posted comment.

0
0
0.000
avatar

You mean this is posted by a hive bot, right? did you code anything special to make it show up on all frontends including the inleo ui? My testbotβ€˜s comments only show on the other frontends πŸ€”

0
0
0.000
avatar

I passed "leothreads" in the meta data. I'm not on PC now, but I'll give you the line of code when I can.

!RemindMe in 9 hours

0
0
0.000
avatar

yeah, great πŸ‘πŸ½ looking forward to see it!

0
0
0.000
avatar

Here's the line:

json_metadata={"app": "leothreads/0.3"} 

Full segment of the code:

def post_reply(parent_comment, reply_text):
    hive = Hive(node='https://api.hive.blog', keys=[POSTING_KEY])
    try:
        # Generate a unique permlink for your comment and convert it to lowercase
        permlink = f"re-{parent_comment.author}-{parent_comment.permlink}-{datetime.utcnow().strftime('%Y%m%dT%H%M%S%f')}"
        permlink = permlink.lower()

        result = hive.post(
            title="",  # Leave empty for a comment
            body=reply_text,
            author=ACCOUNT,
            permlink=permlink,
            reply_identifier=f"{parent_comment.author}/{parent_comment.permlink}",
            json_metadata={"app": "leothreads/0.3"}  # Change this line to use "leothreads/0.3"
        )
``
0
0
0.000
avatar

yeah, that did the trick πŸ‘πŸ½ thank you
I had 'leofinance/3.0.0' instead of 'leothreads/0.3' on that line

0
0
0.000
avatar

Glad I helped!

When it comes to metadata it's always best to grab comments form the blockchain, and analyze how different interfaces do metadata differently.

0
0
0.000
avatar

absolutely right, will do my homework better next time πŸ˜‰

πŸ‘πŸ½

0
0
0.000
avatar

you're right, but maybe it's to avoid spammers

0
0
0.000