Query other users's device keys
This commit is contained in:
parent
5ff82471fc
commit
e9592a7289
2
TODO.md
2
TODO.md
|
@ -11,6 +11,7 @@
|
|||
- `MessageDelegate.qml:63: TypeError: 'reloadPreviousItem' not a function`
|
||||
|
||||
- UI
|
||||
- "the tree arrows could be smaller"
|
||||
- Improve SidePane appearance when at min width
|
||||
- Accounts delegates background
|
||||
- Server selection
|
||||
|
@ -38,6 +39,7 @@
|
|||
|
||||
- Client improvements
|
||||
- Initial sync filter and lazy load, see weechat-matrix `_handle_login()`
|
||||
- See also `handle_response()`'s `keys_query` request
|
||||
- HTTP/2
|
||||
- `retry_after_ms` when rate-limited
|
||||
- Direct chats category
|
||||
|
|
|
@ -81,6 +81,18 @@ class Client(QObject):
|
|||
return self.nio.user_id
|
||||
|
||||
|
||||
@futurize(pyqt=False)
|
||||
def _keys_upload(self) -> None:
|
||||
print("uploading key")
|
||||
self.net.talk(self.nio.keys_upload)
|
||||
|
||||
|
||||
@futurize(max_instances=1, pyqt=False)
|
||||
def _keys_query(self) -> None:
|
||||
print("querying keys")
|
||||
self.net.talk(self.nio.keys_query)
|
||||
|
||||
|
||||
@pyqtSlot(str, result="QVariant")
|
||||
@pyqtSlot(str, str, result="QVariant")
|
||||
@futurize()
|
||||
|
@ -108,12 +120,6 @@ class Client(QObject):
|
|||
return self
|
||||
|
||||
|
||||
@futurize(pyqt=False)
|
||||
def _keys_upload(self) -> None:
|
||||
print("uploading key")
|
||||
self.net.talk(self.nio.keys_upload)
|
||||
|
||||
|
||||
@pyqtSlot(result="QVariant")
|
||||
@futurize()
|
||||
def logout(self) -> "Client":
|
||||
|
@ -144,6 +150,9 @@ class Client(QObject):
|
|||
if self.nio.should_upload_keys:
|
||||
self._keys_upload()
|
||||
|
||||
if self.nio.should_query_keys:
|
||||
self._keys_query()
|
||||
|
||||
for room_id, room_info in response.rooms.invite.items():
|
||||
for ev in room_info.invite_state:
|
||||
member_ev = isinstance(ev, nio.InviteMemberEvent)
|
||||
|
|
Loading…
Reference in New Issue
Block a user