Restore M365Connector.delete_message (was an orphaned method body)
Some checks are pending
Build — Windows, Linux & macOS / GDPRScanner / linux (push) Waiting to run
Build — Windows, Linux & macOS / GDPRScanner / macos (push) Waiting to run
Build — Windows, Linux & macOS / GDPRScanner / windows (push) Waiting to run
Build — Windows, Linux & macOS / Create GitHub Release (push) Blocked by required conditions
Some checks are pending
Build — Windows, Linux & macOS / GDPRScanner / linux (push) Waiting to run
Build — Windows, Linux & macOS / GDPRScanner / macos (push) Waiting to run
Build — Windows, Linux & macOS / GDPRScanner / windows (push) Waiting to run
Build — Windows, Linux & macOS / Create GitHub Release (push) Blocked by required conditions
The def line for delete_message had been lost, leaving its body as unreachable dead code at the end of _delete() and no delete_message attribute on the connector. Deleting an Outlook message therefore failed with "'M365Connector' object has no attribute 'delete_message'". Restored the method (soft-delete: move to Deleted Items, fall back to DELETE). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
54f8848e30
commit
efbbeb7306
@ -552,6 +552,8 @@ class M365Connector:
|
|||||||
r.raise_for_status()
|
r.raise_for_status()
|
||||||
return True # 204 No Content = success
|
return True # 204 No Content = success
|
||||||
raise _requests.exceptions.RetryError(f"Gave up after {self._MAX_RETRIES} attempts: {url}")
|
raise _requests.exceptions.RetryError(f"Gave up after {self._MAX_RETRIES} attempts: {url}")
|
||||||
|
|
||||||
|
def delete_message(self, user_id: str, message_id: str) -> bool:
|
||||||
"""Move an email to Deleted Items (soft delete)."""
|
"""Move an email to Deleted Items (soft delete)."""
|
||||||
base = "/me" if (not user_id or user_id == "me") else f"/users/{user_id}"
|
base = "/me" if (not user_id or user_id == "me") else f"/users/{user_id}"
|
||||||
try:
|
try:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user