Skip to content

Major update (2021/7/30)

Choose a tag to compare

@KnugiHK KnugiHK released this 30 Jul 13:12
· 131 commits to main since this release
126b12a

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