MCPcopy Create free account
hub / github.com/smallfawn/QLScriptPublic / do_notify

Function do_notify

daily/chinaUnicom.py:5669–5687  ·  view source on GitHub ↗
(users)

Source from the content-addressed store, hash-verified

5667 self.log("⏭️ 已被总开关关闭,跳过")
5668
5669def do_notify(users):
5670 notify_content = []
5671 for u in users:
5672 if u.notify_logs:
5673 phone = u.mobile or u.account_mobile
5674 phone_str = mask_str(phone) if phone else ""
5675 notify_content.append(f"【账号{u.index}】{phone_str}")
5676 notify_content.extend(u.notify_logs)
5677 notify_content.append("")
5678 if notify_content:
5679 content = "\n".join(notify_content)
5680 try:
5681 from notify import send
5682 send("中国联通", content)
5683 print(f"推送成功 (内容长度: {len(content)})")
5684 except Exception as e:
5685 print(f"推送失败,可能未配置 notify.py: {str(e)}")
5686 else:
5687 print("无推送内容")
5688
5689def main():
5690 global GRAB_AMOUNT

Callers 1

mainFunction · 0.85

Calls 3

sendFunction · 0.90
mask_strFunction · 0.85
printFunction · 0.70

Tested by

no test coverage detected