!JiiOHXrIUCtcOJsZCa:matrix.org

nio

250 Members
The nio matrix python library | Latest release 0.18.3 https://pypi.org/project/matrix-nio/ | Documentation: https://matrix-nio.readthedocs.io/en/stable/119 Servers

Load older messages


SenderMessageTime
19 Oct 2021
@houkime:m.wfr.moehoukime

theoretically, nio could infer that from the fully qualified user ID, but looking at the code here nio does not do that https://matrix-nio.readthedocs.io/en/latest/_modules/nio/api.html?highlight=register#

15:38:44
@houkime:m.wfr.moehoukime

although, looking by the return value, it is not supposed to be called on its' own, but more like generating an input to aother function that actually does the request

15:46:42
@houkime:m.wfr.moehoukimewhat function it is supposed to be used with?15:47:17
@houkime:m.wfr.moehoukimeok, i guess just regular python request will do. whateber15:53:38
@houkime:m.wfr.moehoukime*whatever15:53:44
@houkime:m.wfr.moehoukime

basically, it is just other methods of this family are stating that they are request data generators and register() for some reason omitted 'Returns the HTTP method, HTTP path and data for the request.' string in the doc

15:56:34
@krazykirby99999:matrix.orgkrazykirby99999 "The fully qualified user ID" 15:56:38
@krazykirby99999:matrix.orgkrazykirby99999that means that the homeserver is included as part of the user id unless i am mistaken15:57:09
@houkime:m.wfr.moehoukimeit means, i have noted above that nio could infer that. But it does not do this because this function is supposed to just generate a path and data for a request (so it is code that is calling this function that is supposed to know a server)15:59:08
@krazykirby99999:matrix.orgkrazykirby99999yes15:59:23
@krazykirby99999:matrix.orgkrazykirby99999 it returns a tuple return "POST", path, Api.to_json(content_dict) 16:00:11
@krazykirby99999:matrix.orgkrazykirby99999perhaps you are expected to make the request yourself?16:00:23
@houkime:m.wfr.moehoukime

yes, that's what i stated.

16:00:48
@houkime:m.wfr.moehoukimewill try now16:01:22
@houkime:m.wfr.moehoukime(small local conduit server)16:01:33
@houkime:m.wfr.moehoukimeworks16:56:07
@krazykirby99999:matrix.orgkrazykirby99999
In reply to@tulir:maunium.net
I think the whoami endpoint returns the device ID nowadays (but keep in mind that encryption won't work if another client already set up keys with that token/ID)
it only returns the user id, not the device id
20:37:47
@tulir:maunium.nettulir
In reply to @krazykirby99999:matrix.org
it only returns the user id, not the device id
no, it returns both
20:38:34
@tulir:maunium.nettulir(but I said "nowadays" for a reason: it's a relatively recent change)20:39:01
@tulir:maunium.nettulir((relatively recent = MSC passed a year ago, spec PR merged 6 months ago, synapse implemented 3 months ago))20:43:24
@vfosnar:matrix.orgVojtěch Fošnár joined the room.20:54:57
@krazykirby99999:matrix.orgkrazykirby99999oh, ok21:06:03
@krazykirby99999:matrix.orgkrazykirby99999the spec on the website needs to be updated then21:06:20
@krazykirby99999:matrix.orgkrazykirby99999unless it was caching on my part21:06:25
@krazykirby99999:matrix.orgkrazykirby99999ty21:06:32
@houkime:m.wfr.moehoukime

I have discovered that even from asyncClient nio can send a join_room message to a server with empty body and without raising any errors (until server itself complains in response)
Some checks are missing.

22:09:25
@houkime:m.wfr.moehoukimeor maybe it is ok by the spec (seems all needed data is in eaders and address aanyway?)22:12:33
@tulir:maunium.nettulir
In reply to @krazykirby99999:matrix.org
the spec on the website needs to be updated then
https://spec.matrix.org/unstable/client-server-api/#get_matrixclientv3accountwhoami is up to date
22:37:19
@tulir:maunium.nettulir(the latest spec release from over a year ago naturally won't have it, because the field was only added to the spec half a year ago. Matrix v1.1 is coming soon though so then it'll be in the stable spec)22:39:35
20 Oct 2021
@houkime:m.wfr.moehoukime
In reply to @houkime:m.wfr.moe
or maybe it is ok by the spec (seems all needed data is in eaders and address aanyway?)

yep, normal. ok

00:56:19

There are no newer messages yet.


Back to Room List