Skip to content

Commit

Permalink
Add new method for manual device list refresh accross all loaded back…
Browse files Browse the repository at this point in the history
…ends, prepare release
  • Loading branch information
Syndace committed Sep 25, 2024
1 parent d25d216 commit 19a66ea
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

## [1.0.5] - 25th of September, 2024

### Added
- A new method `refresh_device_lists` that calls `refresh_device_list` for all loaded backends.

## [1.0.4] - 14th of July, 2024

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

[Unreleased]: https://github.com/Syndace/python-omemo/compare/v1.0.4...HEAD
[Unreleased]: https://github.com/Syndace/python-omemo/compare/v1.0.5...HEAD
[1.0.5]: https://github.com/Syndace/python-omemo/compare/v1.0.4...v1.0.5
[1.0.4]: https://github.com/Syndace/python-omemo/compare/v1.0.3...v1.0.4
[1.0.3]: https://github.com/Syndace/python-omemo/compare/v1.0.2...v1.0.3
[1.0.2]: https://github.com/Syndace/python-omemo/compare/v1.0.1...v1.0.2
Expand Down
18 changes: 18 additions & 0 deletions omemo/session_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -1122,6 +1122,24 @@ async def refresh_device_list(self, namespace: str, bare_jid: str) -> None:
await self._download_device_list(namespace, bare_jid)
)

async def refresh_device_lists(self, bare_jid: str) -> None:
"""
Manually trigger the refresh of a device list accross all loaded backends.
Args:
bare_jid: The bare JID of the XMPP account.
Raises:
DeviceListDownloadFailed: if any device list download failed. Forwarded from
:meth:`_download_device_list`.
DeviceListUploadFailed: if a device list upload failed. An upload can happen if the device list
update is for the own bare JID and does not include the own device. Forwarded from
:meth:`update_device_list`.
"""

for backend in self.__backends:
await self.refresh_device_list(backend.namespace, bare_jid)

####################
# trust management #
####################
Expand Down
2 changes: 1 addition & 1 deletion omemo/version.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
__all__ = [ "__version__" ] # pylint: disable=unused-variable

__version__ = {}
__version__["short"] = "1.0.4"
__version__["short"] = "1.0.5"
__version__["tag"] = "stable"
__version__["full"] = f"{__version__['short']}-{__version__['tag']}"

0 comments on commit 19a66ea

Please sign in to comment.