!PtKxxSgyjbNPrkBvRG:matrix.org

Jeon project (another Matrix implementation on java)

24 Members
https://github.com/ma1uta/jeon (mirror: https://gitlab.com/ma1uta/jeon)11 Servers

Load older messages


SenderMessageTime
19 Jan 2020
@arne:matrix.localtoast.deArne invited @arne:dramaticexit.deArne.18:37:03
@arne:matrix.localtoast.deArne left the room.18:37:04
@arne:dramaticexit.deArne joined the room.18:37:14
11 Mar 2020
@dominicusin:matrix.orgdominicusin joined the room.00:36:41
13 Mar 2020
@example:matrix.btwarch.tknewExampleTest joined the room.09:50:09
@example:matrix.btwarch.tknewExampleTest hello ma1uta im trying to understand your sdk, can you tell me what the difference between the io.github.ma1uta.matrix.client.api and the io.github.ma1uta.matrix.client.model classes are? 11:28:48
@supernoob:matrix.org@supernoob:matrix.org joined the room.13:13:10
@supernoob:matrix.org@supernoob:matrix.org left the room.17:14:04
@testitest:matrix.btwarch.tktestitest joined the room.17:22:49
@ma1uta:ru-matrix.orgma1uta
В ответ на@example:matrix.btwarch.tk
hello ma1uta im trying to understand your sdk, can you tell me what the difference between the io.github.ma1uta.matrix.client.api and the io.github.ma1uta.matrix.client.model classes are?
Hello, https://github.com/ma1uta/jeon/tree/master/client-api/src/main/java/io/github/ma1uta/matrix/client/api - is a interfaces for Client API. https://github.com/ma1uta/jeon/tree/master/client-api/src/main/java/io/github/ma1uta/matrix/client/model - models which are used in the interfaces.
19:22:00
14 Mar 2020
@testitest:matrix.btwarch.tktestitest

hey ma1uta, sorry to bother you again, I'm a classmate of example. We're currently trying to develop a Client for matrix using JavaFX and want to utilize your sdk for the communication between our client and the homeserver.

We're struggling to setup your sdk inside of an Intellij JavaFX project. Both while using gradle or when not. We used the client-impl-0.11.0.jar, but couldn't seem to get access to all the parts of your API, just a few.

Also, when we try to use your API in a JavaFX project with gradle I keep getting a java.util.NoSuchElementException when calling the .build() method from the first line of your example here: https://github.com/ma1uta/jmsdk/blob/master/client-impl/Readme.md.

As you can probably tell we're still in school and not very experienced developers so it would be nice if you had the time to give us a small guide on how to setup a project and how to work with your api.

Thank you :]

10:51:11
@ma1uta:ru-matrix.orgma1uta
In reply to @testitest:matrix.btwarch.tk

hey ma1uta, sorry to bother you again, I'm a classmate of example. We're currently trying to develop a Client for matrix using JavaFX and want to utilize your sdk for the communication between our client and the homeserver.

We're struggling to setup your sdk inside of an Intellij JavaFX project. Both while using gradle or when not. We used the client-impl-0.11.0.jar, but couldn't seem to get access to all the parts of your API, just a few.

Also, when we try to use your API in a JavaFX project with gradle I keep getting a java.util.NoSuchElementException when calling the .build() method from the first line of your example here: https://github.com/ma1uta/jmsdk/blob/master/client-impl/Readme.md.

As you can probably tell we're still in school and not very experienced developers so it would be nice if you had the time to give us a small guide on how to setup a project and how to work with your api.

Thank you :]

I see. You forgot to add the support library with deserializers (jackson or jsonb). I prepared an example with minimal configuration to run client: https://github.com/ma1uta/matrix-client-example. You can get from this example dependencies and code.
11:45:04
@testitest:matrix.btwarch.tktestitest ma1uta: thank you so much, it works like a charm :). It's difficult to figure out how to properly setup projects at first but I think we should be able to make this work from here 12:41:39
@example:matrix.btwarch.tknewExampleTest changed their display name from example to @example:matrix.btwarch.tk.20:48:53
@example:matrix.btwarch.tknewExampleTest changed their display name from @example:matrix.btwarch.tk to exampleTest.21:01:13
@example:matrix.btwarch.tknewExampleTest changed their display name from exampleTest to newExampleTest.21:18:22
15 Mar 2020
@ma1uta:ru-matrix.orgma1uta
В ответ на@testitest:matrix.btwarch.tk
ma1uta: thank you so much, it works like a charm :). It's difficult to figure out how to properly setup projects at first but I think we should be able to make this work from here
Yeah, it's my fault. I'll describe it.
06:08:36
17 Mar 2020
@testitest:matrix.btwarch.tktestitestRedacted or Malformed Event19:56:26
@testitest:matrix.btwarch.tktestitest ma1uta: thanks for responsing in the dev channel, we didn't want to keep spamming you with questions about the sdk and bother you 19:57:45
@example:matrix.btwarch.tknewExampleTest yes ma1uta , really nice move thank you for helping👍️ 22:04:29
18 Mar 2020
@ma1uta:ru-matrix.orgma1uta
В ответ на@testitest:matrix.btwarch.tk
ma1uta: thanks for responsing in the dev channel, we didn't want to keep spamming you with questions about the sdk and bother you
No problem, feel free to ask questions.
04:17:07
@ma1uta:ru-matrix.orgma1utaAlso it is possible to make changes in the sdk if something missing or works wrong.04:19:59
@testitest:matrix.btwarch.tktestitest

hey ma1uta, I'm still having trouble understanding how to work with responses / exceptions.

@FXML
private void checkUsernameAndPassword() {

    try {
        String localpart = usernameInputFieldLogin.getText();
        char[] password = passwordInputFieldLogin.getText().toCharArray();

        mxClient.auth().login(localpart, password).join();

    }catch(MatrixException matrixException){
        System.out.println("errorcode: " + matrixException.getErrcode());
        System.out.println("status: " + matrixException.getStatus());
    }

}

I have this simple login function but it never catches Matrix Exceptions, it always causes a RuntimeException.
But if I choose to catch that RuntimeException I don't have access to error codes. What am I doing wrong?

16:48:40
@testitest:matrix.btwarch.tktestitestI'm guessing that I have to handle events from the server inside of a sync loop?18:27:42
@ma1uta:ru-matrix.orgma1uta
In reply to @testitest:matrix.btwarch.tk

hey ma1uta, I'm still having trouble understanding how to work with responses / exceptions.

@FXML
private void checkUsernameAndPassword() {

    try {
        String localpart = usernameInputFieldLogin.getText();
        char[] password = passwordInputFieldLogin.getText().toCharArray();

        mxClient.auth().login(localpart, password).join();

    }catch(MatrixException matrixException){
        System.out.println("errorcode: " + matrixException.getErrcode());
        System.out.println("status: " + matrixException.getStatus());
    }

}

I have this simple login function but it never catches Matrix Exceptions, it always causes a RuntimeException.
But if I choose to catch that RuntimeException I don't have access to error codes. What am I doing wrong?

Yes, I see this bug. For workaround you can catch the RuntimeException and invoke the getCause() method to get the Matrix exception. I will change this behaviour in the next release and won't wrap the matrix exception inside the RuntimeException.
20:07:03
@ma1uta:ru-matrix.orgma1uta
In reply to @testitest:matrix.btwarch.tk
I'm guessing that I have to handle events from the server inside of a sync loop?
You can use the https://github.com/ma1uta/jmsdk/blob/master/client-impl/src/main/java/io/github/ma1uta/matrix/client/sync/SyncLoop.java class (see https://github.com/ma1uta/jmsdk/blob/master/client-impl/Readme.md#usage in the section where described the event sync) or implement your-self sync loop.
20:09:24
19 Mar 2020
@testitest:matrix.btwarch.tktestitest
In reply to @ma1uta:ru-matrix.org
You can use the https://github.com/ma1uta/jmsdk/blob/master/client-impl/src/main/java/io/github/ma1uta/matrix/client/sync/SyncLoop.java class (see https://github.com/ma1uta/jmsdk/blob/master/client-impl/Readme.md#usage in the section where described the event sync) or implement your-self sync loop.
Thank you again. Today we will try to understand and implement the syncloop. We have a lot of time to work on the project now that we have to stay at home because of corona
10:25:49
21 Mar 2020
@testitest:matrix.btwarch.tktestitestRedacted or Malformed Event09:12:37
@testitest:matrix.btwarch.tktestitest

hey ma1uta, it's us again with a new problem.
We now have a sync loop that gets the events, which works fine thanks to your example.
Now we are trying to actually get the content of the events (e.g. messages) but I can't figure out how to do that.

For example, to try to get the content of messages we call

SyncResponse.getRooms().get(key).getTimeline().getEvents()

which should be a List of all the timeline events or messages if we understand it right. Now if we loop through the list with

get(i).getContent().toString()

we always get something in the format of io.github.ma1uta.matrix.event.message.Text@6d8e996a rather than the actual message itself.

We see that getContent() return an EventContent object, but we don't know how or if we have to interact with it further.
And this is not just an issue with messages, but rather all kinds of events.
Thank you again!

09:22:37
@ma1uta:ru-matrix.orgma1uta
В ответ на@testitest:matrix.btwarch.tk

hey ma1uta, it's us again with a new problem.
We now have a sync loop that gets the events, which works fine thanks to your example.
Now we are trying to actually get the content of the events (e.g. messages) but I can't figure out how to do that.

For example, to try to get the content of messages we call

SyncResponse.getRooms().get(key).getTimeline().getEvents()

which should be a List of all the timeline events or messages if we understand it right. Now if we loop through the list with

get(i).getContent().toString()

we always get something in the format of io.github.ma1uta.matrix.event.message.Text@6d8e996a rather than the actual message itself.

We see that getContent() return an EventContent object, but we don't know how or if we have to interact with it further.
And this is not just an issue with messages, but rather all kinds of events.
Thank you again!

Hi. Timeline contains all incoming events. There are a lot of types of events. Each event has content and type. Each room has state events (room name, room aliases, permissions, topic, members) and message events (images, text, audio, ...). In this java sdk the core class is https://github.com/ma1uta/jeon/blob/master/common-api/src/main/java/io/github/ma1uta/matrix/event/Event.java There are a few child. Look at the https://github.com/ma1uta/jeon/blob/master/common-api/src/main/java/io/github/ma1uta/matrix/event/RoomEvent.java it is a main class for all room events. It has the room_id, sender.
10:45:22

Show newer messages


Back to Room List