@booming-kr Phase 2.5 서비스 업데이트 공지 (9/20일자)
이번 시범운용 참여자 여러분들 간에 보팅하고 댓글을 다는 경우
@booming-kr이 여러분께 보팅을 드리면서 대댓글을 달아서 알려드립니다.
여러분이 어느 정도 수치로 보팅했는지도 알려드리면서요
보팅을 받으려면 50% 이상 또는 65,000 Mrshares 이상으로 원글에 보팅하셔야 합니다.
65,000 Mrshares는 약 80%의 5000 보팅스파를 가진 분이 가중치 50%로 보팅했을때의 근사 수치입니다.
if vote_passes_thresholds(voter, post_author, permlink) and has_user_commented_on_post(voter, post_author, permlink):
latest = get_latest_comment_by_user_on_post(voter, post_author, permlink)
if latest:
schedule_vote_on_comment(
latest["author"],
latest["permlink"],
ALLOWED.get(voter, 100),
voter_name=voter,
voter_percent=_to_int(op.get("percent")), # 보팅시 사용된 percent
voter_rshares=_to_int(op.get("rshares")) # 보팅시 사용된 rshares
)
보팅에 사용되 percent와 rshares를 구해서 comment 작성 모듈로 전달하는 것이 핵심이네요...
def already_replied_as_a(comment: Comment) -> bool:
try:
for rep in comment.get_replies():
if rep["author"] == A_ACCOUNT and REPLY_MARKER in rep.get("body", ""):
return True
except Exception:
return False
return False
def post_reply_after_vote(comment: Comment, job):
if not REPLY_AFTER_VOTE:
return
if already_replied_as_a(comment):
return
try:
msg = REPLY_TEMPLATE.format(
voter=job["voter_name"],
voter_percent=job["voter_percent"] / 100,
voter_rshares_fmt=_fmt_int(job["voter_rshares"]),
a_weight=job["a_weight"],
kst=now_kst().strftime("%Y-%m-%d %H:%M:%S %Z")
)
comment.reply(body=msg, author=A_ACCOUNT)
log("보팅 알림 대댓글 작성", f"- @{comment['author']}/{comment['permlink']}")
except Exception as e:
print(f"[WARN] reply failed: {e}", file=sys.stderr)
시범운용에 참여중인 분들 (14명)
@cabbagelover
@dorian-lee
@dozam
@erinleeishere
@illluck
@jungjunghoon
@kimyg18
@newiz
@parkname
@peterpa
@successgr
@syskwl
@talkit
@yoghurty
100% 보팅으로 응원해봅니다.
즐거운 주말 되십시오.
감사합니다.
0.00 SBD,
0.07 STEEM,
0.07 SP
[booming-kr-auto]
@booming-kr이 보팅드렸습니다 🙌
(보팅받는 기준: 원글에 50% 이상 또는 65,000 Mrshares 이상으로 보팅)
감사해요~~ ^^
Upvoted! Thank you for supporting witness @jswit.