Sender | Message | Time |
---|---|---|
21 Mar 2020 | ||
ma1uta | RoomEvent has also child classes. Point at the StateEvent and RoomMessage. First add the state_key field for all state events. You can find here events for name, topic, powerlevel (permissions), etc. RoomMessage ( https://github.com/ma1uta/jeon/blob/master/common-api/src/main/java/io/github/ma1uta/matrix/event/RoomMessage.java) used for messages :) Messages you can find in the content https://github.com/ma1uta/jeon/tree/master/common-api/src/main/java/io/github/ma1uta/matrix/event/message | 10:50:37 |
ma1uta | Each message event (child from https://github.com/ma1uta/jeon/blob/master/common-api/src/main/java/io/github/ma1uta/matrix/event/content/RoomMessageContent.java) has the body - text message. | 10:52:38 |
ma1uta | So on the Timeline you get RoomEvent's. tl;dr: get timeline and iterate into timeline events. If this event instance of RoomMessageEvent then you can get message like this "event.getContent().getBody()". Also event.getContent() return you Text class, Image and other message events. | 11:00:33 |
ma1uta | I recommend to read the article: https://brendan.abolivier.bzh/enter-the-matrix/ to understand the Matrix API. | 11:03:53 |
testitest | Thank you :) I already looked at that article but didn't understand everything back then, I'll check it out again There's one thing I still don't understand. by calling "getEvents()" on any kind of event(Timeline, Ephemeral...) you always get back a List of Events, correct? How do you then access the different methods for different Events? Sorry, object-oriented programming is still difficult to understand for me | 13:18:55 |
testitest | I only have access to getContent() on these plain Events and can't cast them either | 13:20:07 |
ma1uta | В ответ на@testitest:matrix.btwarch.tk Pattern matching (example for java 8):
| 16:50:52 |
testitest | thanks again man, I hope we won't have to ask too many questions from now on, we owe you big time =) | 19:06:30 |
22 Mar 2020 | ||
ma1uta | In reply to @testitest:matrix.btwarch.tkAs I have said, no problem, you can ask questions 🙂 | 08:04:15 |
24 Mar 2020 | ||
testitest | Hey ma1uta, how's it going? Also we came across this folder: https://github.com/ma1uta/jmsdk/tree/12a38c009ee0de3c038ed1ebb207abe2163e956b/client-impl/src/test/java/io/github/ma1uta/matrix/client, is this just you trying out stuff or is it documentation on how to use the sdk? We saw you use a "mock" server, is that just so you can host synapse locally or is this to send the json requests to the server, or another different reason? Thanks =) | 20:19:55 |
ma1uta | Hello. The server return one or more registration flows. Each flow contains one or more steps. If you want register user you should pass all steps from any flow. For this use uses the sessionId to identify your registration session. Unfortunately it is no way to automatically pass the captcha. For captcha user should download the captch page and then pass the captcha. | 20:29:01 |
ma1uta | I mock the server to avoid start synapse locally for each test. | 20:29:36 |
25 Mar 2020 | ||
newExampleTest | Hi Ma1uta, thanks for your answer. Code:
We have tried to implement this here as a test and tried to get a single stage output but always get NULL back. what are we doing wrong? At the bottom of the console in intellij we see the response from the loggingfilter like this. {"auth":{"type":"m.login.dummy"},"username":"klejtljwl874","password":"lksflmwlf75","initial_device_display_name":"***"} How can we access exactly these values and for example the response, how is it done in the Java code with your SDK that we can react to them? | 17:16:59 |
ma1uta | It's my fault, I totally forgot about this case. I will publish tomorrow fix. | 20:45:20 |
26 Mar 2020 | ||
newExampleTest | Thanks! Is this meaning that currently is not possible to working with stages in your SDK? Or do you mean receiving captcha requests when signing up or something else? | 10:57:39 |
ma1uta | newExampleTest: I have release 0.11.1 version with fix of the User-interactive flows. In will be published in the maven repository in a few hours. Also I have added the registration (sync and async) example: https://github.com/ma1uta/matrix-client-example/blob/master/src/main/java/io/github/ma1uta/matrix/example/RegistrationExample.java
| 16:49:16 |
newExampleTest | hey ma1uta very cool, thank you very much for fixing this so fast and thank you for helping us again nice man! 🙂 | 19:15:53 |
28 Mar 2020 | ||
testitest | Hey ma1uta, thanks for the new release. When we try to use your new release to work stages (specificially the registration again) we keep getting a MismatchedInputException: com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of Is this due to an issue inside of your sdk or because we did something wrong? | 11:47:26 |
ma1uta | Strange. It seems a bug in the sdk. | 16:46:28 |
ma1uta | Yeah, I found it. I will publish today a fix. | 16:49:50 |
testitest | Thanks, that's great. Sounds like it was expecting a differently formatted json than the one it was getting? | 17:55:13 |
ma1uta | Yes, I expected that params can be object only with string params, without nested objects. | 18:35:04 |
ma1uta | Just released 0.11.2 with user-interactive fix. Will available in a few hours. | 19:10:32 |
29 Mar 2020 | ||
testitest | thanks for the quick fix again =), we hope we're helping by testing out things and finding bugs | 09:15:20 |
ma1uta | В ответ на@testitest:matrix.btwarch.tkYes, you are very helping to test. Thanks. | 10:12:20 |
testitest | I was thinking, do you maybe prefer if we opened issues on github with bugs instead of writing here? so everyone can see. Or is this okay | 10:22:52 |
ma1uta | В ответ на@testitest:matrix.btwarch.tkOpen issues prefer, of course. | 10:27:46 |
3 Apr 2020 | ||
testitest | Hey ma1uta, hows it going? // list of timeline events Always returns roomId: null. But at the same time I'm able to get content of messages ... from the Events. | 19:20:58 |
testitest | * Hey ma1uta, hows it going? Always returns roomId: null. But at the same time I'm able to get content of messages ... from the Events. | 19:24:25 |
testitest | * Hey ma1uta, hows it going? // list of timeline events Always returns roomId: null. But at the same time I'm able to get content of messages ... from the Events. | 19:24:32 |