From 1c38dabe79eee75210a604964d35a3151070d6c8 Mon Sep 17 00:00:00 2001 From: Marc Mintel Date: Mon, 27 Apr 2026 21:53:57 +0200 Subject: [PATCH] feat: gate DM inbox interaction behind explicit dm_reply toggle --- GramAddict/core/bot_flow.py | 12 ++++++++++-- config-examples/config.yml | 5 +++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/GramAddict/core/bot_flow.py b/GramAddict/core/bot_flow.py index ede221d..8f1cecb 100644 --- a/GramAddict/core/bot_flow.py +++ b/GramAddict/core/bot_flow.py @@ -460,9 +460,13 @@ def start_bot(**kwargs): target_map = { "DiscoverNewContent": ["ExploreFeed", "ReelsFeed"], "NurtureCommunity": ["HomeFeed", "StoriesFeed"], - "SocialReciprocity": ["FollowingList", "MessageInbox"], + "SocialReciprocity": ["FollowingList"], } + dm_config = configs.get_plugin_config("dm_reply") + if dm_config.get("enabled", False): + target_map["SocialReciprocity"].append("MessageInbox") + import secrets options = target_map.get(current_desire, ["HomeFeed"]) @@ -860,7 +864,11 @@ def _run_zero_latency_feed_loop( elif governance_decision == "CHECK_CURIOSITY": logger.info("👀 [Curiosity] Spontaneously checking DMs / Notifications...") - explore_target = random.choice(["MessageInbox", "Notifications"]) + dm_config = configs.get_plugin_config("dm_reply") + if dm_config.get("enabled", False): + explore_target = random.choice(["MessageInbox", "Notifications"]) + else: + explore_target = "Notifications" if explore_target == "MessageInbox": nav_graph.do("tap direct message icon inbox") diff --git a/config-examples/config.yml b/config-examples/config.yml index 39169a2..03c4fa7 100644 --- a/config-examples/config.yml +++ b/config-examples/config.yml @@ -89,6 +89,11 @@ telegram-reports: false # for using telegram-reports you have also to configure interactions-count: 30-40 likes-count: 1-2 likes-percentage: 100 + +plugins: + dm_reply: + enabled: false # Generates AI replies to unread DMs + stories-count: 1-2 stories-percentage: 30-40 carousel-count: 2-3