From 0d772d4dba044106946b5d5f871dd9dc1d340366 Mon Sep 17 00:00:00 2001 From: link2xt Date: Tue, 28 Apr 2026 00:51:28 +0200 Subject: [PATCH] api!(deltachat-rpc-client): remove deprecated get_fresh_messages_in_arrival_order() --- .../src/deltachat_rpc_client/account.py | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/deltachat-rpc-client/src/deltachat_rpc_client/account.py b/deltachat-rpc-client/src/deltachat_rpc_client/account.py index dd6722298..db24c8ff2 100644 --- a/deltachat-rpc-client/src/deltachat_rpc_client/account.py +++ b/deltachat-rpc-client/src/deltachat_rpc_client/account.py @@ -5,7 +5,6 @@ from __future__ import annotations import json from dataclasses import dataclass from typing import TYPE_CHECKING, Optional, Union -from warnings import warn from ._utils import AttrDict, futuremethod from .chat import Chat @@ -392,8 +391,7 @@ class Account: """Return the list of fresh messages, newest messages first. This call is intended for displaying notifications. - If you are writing a bot, use `get_fresh_messages_in_arrival_order()` instead, - to process oldest messages first. + If you are writing a bot, process "incoming message" events instead. """ fresh_msg_ids = self._rpc.get_fresh_msgs(self.id) return [Message(self, msg_id) for msg_id in fresh_msg_ids] @@ -463,16 +461,6 @@ class Account: """Wait for reaction change event.""" return self.wait_for_event(EventType.REACTIONS_CHANGED) - def get_fresh_messages_in_arrival_order(self) -> list[Message]: - """Return fresh messages list sorted in the order of their arrival, with ascending IDs.""" - warn( - "get_fresh_messages_in_arrival_order is deprecated, use get_next_messages instead.", - DeprecationWarning, - stacklevel=2, - ) - fresh_msg_ids = sorted(self._rpc.get_fresh_msgs(self.id)) - return [Message(self, msg_id) for msg_id in fresh_msg_ids] - def export_backup(self, path, passphrase: str = "") -> None: """Export backup.""" self._rpc.export_backup(self.id, str(path), passphrase)