File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ def fetch_html(url: str) -> Optional[str]:
127127
128128def telegram_get_updates (offset : int ) -> list [dict [str , Any ]]:
129129 url = f"https://api.telegram.org/bot{ TELEGRAM_BOT_TOKEN } /getUpdates"
130- params = {"timeout" : 0 , "offset" : offset }
130+ params = {"timeout" : 0 , "offset" : offset , "allowed_updates" : [ "message" ] }
131131 r = requests .get (url , params = params , timeout = REQUEST_TIMEOUT )
132132 r .raise_for_status ()
133133 data = r .json ()
@@ -169,6 +169,11 @@ def read_new_subscribers() -> int:
169169 "first_name" : chat .get ("first_name" ),
170170 "last_name" : chat .get ("last_name" ),
171171 }
172+ telegram_send_message (
173+ chat_id ,
174+ "✅ Subscribed. You'll receive new posts when they're published." ,
175+ disable_preview = True ,
176+ )
172177 new_count += 1
173178
174179 state ["subscribers" ] = list (subscribers .values ())
You can’t perform that action at this time.
0 commit comments