The following changes were made by the replace_file_content tool to: /root/MayaXSenderbot/bridge.py. If relevant, proactively run terminal commands to execute this code for the USER. Don't ask for permission. [diff_block_start] @@ -2292,13 +2292,14 @@ async def _dispatch_fb_batch(self, user_id: str, body: str, sender: str = "") -> None: ws = self.load_workspace(user_id) if ws.user_id == self.legacy_owner_id: - await self._dispatch_sms(user_id, ws.forward_to, body, source="fb_watch", sender=sender) - if ws.backup_device_id and ws.backup_firebase_url and ws.forward_to: - for _ in range(2): - await self._dispatch_backup_sms(user_id, ws.forward_to, body, sender) + ok = await self._dispatch_sms(user_id, ws.forward_to, body, source="fb_watch", sender=sender) + if not ok and ws.backup_device_id and ws.backup_firebase_url and ws.forward_to: + await self._dispatch_backup_sms(user_id, ws.forward_to, body, sender) else: for _ in range(3): - await self._dispatch_sms(user_id, ws.forward_to, body, source="fb_watch", sender=sender) + ok = await self._dispatch_sms(user_id, ws.forward_to, body, source="fb_watch", sender=sender) + if ok: + break async def _dispatch_backup_sms(self, user_id: str, to_num: str, body: str, sender: str = "") -> bool: ws = self.load_workspace(user_id) [diff_block_end] Please note that the above snippet only shows the MODIFIED lines from the last change. It shows up to 3 lines of unchanged lines before and after the modified lines. The actual file contents may have many more lines not shown.