Skip to content

Commit 19a66ea

Browse files
committed
Add new method for manual device list refresh accross all loaded backends, prepare release
1 parent d25d216 commit 19a66ea

File tree

3 files changed

+26
-2
lines changed

3 files changed

+26
-2
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66

77
## [Unreleased]
88

9+
## [1.0.5] - 25th of September, 2024
10+
11+
### Added
12+
- A new method `refresh_device_lists` that calls `refresh_device_list` for all loaded backends.
13+
914
## [1.0.4] - 14th of July, 2024
1015

1116
### Fixed
@@ -144,7 +149,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
144149
### Changed
145150
- Upon serialization the current library version is added to the serialized structures, to allow for seamless updates in the future.
146151

147-
[Unreleased]: https://github.com/Syndace/python-omemo/compare/v1.0.4...HEAD
152+
[Unreleased]: https://github.com/Syndace/python-omemo/compare/v1.0.5...HEAD
153+
[1.0.5]: https://github.com/Syndace/python-omemo/compare/v1.0.4...v1.0.5
148154
[1.0.4]: https://github.com/Syndace/python-omemo/compare/v1.0.3...v1.0.4
149155
[1.0.3]: https://github.com/Syndace/python-omemo/compare/v1.0.2...v1.0.3
150156
[1.0.2]: https://github.com/Syndace/python-omemo/compare/v1.0.1...v1.0.2

omemo/session_manager.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1122,6 +1122,24 @@ async def refresh_device_list(self, namespace: str, bare_jid: str) -> None:
11221122
await self._download_device_list(namespace, bare_jid)
11231123
)
11241124

1125+
async def refresh_device_lists(self, bare_jid: str) -> None:
1126+
"""
1127+
Manually trigger the refresh of a device list accross all loaded backends.
1128+
1129+
Args:
1130+
bare_jid: The bare JID of the XMPP account.
1131+
1132+
Raises:
1133+
DeviceListDownloadFailed: if any device list download failed. Forwarded from
1134+
:meth:`_download_device_list`.
1135+
DeviceListUploadFailed: if a device list upload failed. An upload can happen if the device list
1136+
update is for the own bare JID and does not include the own device. Forwarded from
1137+
:meth:`update_device_list`.
1138+
"""
1139+
1140+
for backend in self.__backends:
1141+
await self.refresh_device_list(backend.namespace, bare_jid)
1142+
11251143
####################
11261144
# trust management #
11271145
####################

omemo/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
__all__ = [ "__version__" ] # pylint: disable=unused-variable
22

33
__version__ = {}
4-
__version__["short"] = "1.0.4"
4+
__version__["short"] = "1.0.5"
55
__version__["tag"] = "stable"
66
__version__["full"] = f"{__version__['short']}-{__version__['tag']}"

0 commit comments

Comments
 (0)