Skip to content

Releases: KnugiHK/synapse-admin-api-python

Major Update (2022/06/09)

09 Jun 16:37
Compare
Choose a tag to compare

As mentioned in Synapse 1.58.0 release notes, groups feature will be remove in 1.61.0. Therefore, this will be the last version that support groups related API.

Changes since 0.6.7

  1. Implemented two new APIs introduced in 1.52.0.
  2. Added an alias (Media.delete) for Media.delete_media.
  3. Media.delete_media accept a list of media id in "mediaid" argument now.

Bug fixed

  1. When "admin" & "deactivated" in User.create_modify is False, the program does not pass the boolean value to the request body.

Lunar Feature Update (2022/2/1)

01 Feb 06:31
Compare
Choose a tag to compare

Happy Lunar New Year!

Changes since 0.6.5

  1. Implemented new API to query account data.

Major Update (2021/12/15)

15 Dec 11:34
Compare
Choose a tag to compare

Changes since 0.6.0

  1. Implemented new delete room API.
  2. Implemented un-shadow ban API.
  3. Implemented block room APIs.
  4. Implemented APIs related to federation.
  5. Implemented APIs related to background update.
  6. Updated dependency HTTPX from 0.20.0 to 0.21.1.
  7. Added ability to add offset to current time in Utility.get_current_time.

Major Update (2021/11/18)

18 Nov 02:59
Compare
Choose a tag to compare

Changes since 0.5.6

  1. Support Python 3.10.0
  2. Updated dependency HTTPX from 0.18.2 to 0.20.0
  3. Show an error when timestamp in seconds is provided to the Media.purge_remote_media API.
  4. ClientAPI.admin_login will now perform auto-retry when HTTP 429 occurs.
  5. Added support for changing user type in User.create_modify.
  6. Added support for background updates status admin API.

Minor update (2021/09/11)

11 Sep 06:03
Compare
Choose a tag to compare

Changes since 0.5.5

  1. Retry the create room request automatically when being rate-limited
  2. Handle two API endpoints which are removed in Synapse 1.42.0

Major update (2021/08/26)

25 Aug 16:36
Compare
Choose a tag to compare

Changes since 0.5.0

  1. Added unit testing
  2. Added checking for argument order_by in User.lists
  3. Added username availability checking API
  4. Added delete media uploaded by a user API
  5. Added a new parameter called "external_ids" to User.create_modify
  6. Updated dependency httpx to 0.18.2
  7. Implemented a simple MIME type guessing based on magic
  8. Support sending media in an announcement
  9. Management.announce is now a helper method for old Management.announce and Management.announce_all
  10. Some PEP8

Major update (2021/7/30)

30 Jul 13:12
126b12a
Compare
Choose a tag to compare

This version has incompatibility with the previous version

  • Any methods that will return total number and/or next token will now return a new class, named Contents and ContentsDict, instance
    • The returned data (list/dict) can be accessed by Contents and ContentsDict itself
    • The total number can be accessed through Contents.total and ContensDict.total
    • The next token can be accessed through Contents.next and ContensDict.next

Changes since 0.3.0

  1. Added homeserver alias validation
  2. Added default value for size_gt in Media.delete_media
  3. Added type checking on argument "timestamp" in Media.delete_local_media_by_condition
  4. Added checking for the conflict values of members and leave in Room.create
  5. Added some alias for Room, Management, Media and ClientAPI
  6. Added an option for non-admin login in ClientAPI
  7. Added a new class named "Contents" to handle returned data with the total number and/or next token
  8. Replaced all return data which contain a total number and/or next token
  9. Converted some tuple in return data of some methods to NamedTuple
  10. Improved docstrings
  11. Re-implemented User._generate_mac
  12. Handled error in User.deactivate, User.active_sessions and User.query
  13. Renamed the package name in __init__
  14. Renamed ClientAPI.client_create to client_create_room and ClientAPI.client_leave to client_leave_room
  15. Made argument "userid" in Room.set_admin optional to implement the feature of granting power to the user themself
  16. Set the default value of size_gt to 0 in Media.delete_local_media_by_condition
  17. Support encryption when creating room
  18. Raise SynapseException instead of just returning False when an error occurs in _Device.delete and _Device._delete_multiple
  19. Accept a mxc URI as media id in class Media

Bug fixed

  1. User() and ClientAPI() read configuration when connection information is provided in initial variable
  2. Suppression of exception in _Device is missing
  3. The key, purge_id, is being accessed too early in Management.purge_history
  4. Wrong key being accessed in Room.lists and ClientAPI.client_create
  5. Parameter members in Room.create is not being checked for None before goes to the for loop

Major update (2021/7/5)

05 Jul 05:17
b0ab5f9
Compare
Choose a tag to compare

Changes since 0.2.0

  1. Implement the whole media statistics API
  2. Room.lists will now return dict item individually instead of returning the whole dict
  3. Return next_token in Management.event_reports
  4. Return a dict with user id as key and the event id as value in Management.announce_all
  5. Return bool instead of a list in Media.delete_local_media
  6. More docstrings
  7. Refactored some return line
  8. Removed SynapseAPIError

Bug fixed

  1. User.lists return one more value now, hence Management.announce_all is broken
  2. Fix some broken docstring contents

Minor update (2021/6/30)

30 Jun 04:42
Compare
Choose a tag to compare

Changes since 0.2.0

  1. Force the user to enter only "y" or "n" or leave it blank in saving config dialog

Bug fixed

  1. Failure to authenticate the user after invoking Admin.modify_config
  2. Even the user chose not to save the config in the dialog, the config still being saved

First beta release (2021/6/16)

16 Jun 04:27
Compare
Choose a tag to compare

Changes since 0.2.0rc2

  1. Development status changed from alpha to beta!
  2. Added a helper method for deleting local and remote media
  3. Refactored some code
  4. Made kwargs in User.create() keyword-only arguments
  5. More and better documentation
  6. Returning next_token in User.lists
  7. Support argument "dir" in User.lists
  8. Returning the admin status of the user after invoking User.set_admin
  9. User.validity will now return expiration_ts instead of a dict with only one key

Bug fixed

  1. server_name in Media.quarantine_remove should be optional