ma1uta / jeon Goto Github PK
View Code? Open in Web Editor NEWMatrix API (java)
License: Apache License 2.0
Matrix API (java)
License: Apache License 2.0
Hi,
Thx for this framework!. It was very helpful and saved me a lot of time. Just one small thing I've found:
Currently the unsignedDeviceInfo property in the DeviceKeys model class will be mapped to 'unsignedDeviceInfo' in JSON.
This is wrong according to the Matrix Client-Server API spec. It should be mapped to 'unsigned'.
See https://matrix.org/docs/spec/client_server/latest#post-matrix-client-r0-keys-query
Current:
"device_keys": {
"@userId:homeserver": {
"aDeviceId": {
...
"unsignedDeviceInfo": {
"device_display_name": "whatever"
},
"unsigned": {}
}
}
}
Correct:
"device_keys": {
"@userId:homeserver": {
"aDeviceId": {
...
"unsigned": {
"device_display_name": "whatever"
}
}
}
}
When I try to use your library as Maven dependency in the latest version 0.10.0
, there are bunch of unresolvable transitive dependencies of version 0.9.2-SNAPSHOT
. I noticed in your POM you are using dedicated version properties and you probably forgot to bump them.
What I recommend it to keep the version on a single place (the top most parent POM) and refer to that version. I will create a PR for both jmsdk and jeon repositories.
Hi!
Development seems to be paused right now. Could you please consider bumping the dependencies again and push another release so that the latest version is available via maven?
Thanks and keep it up!
When an event is encrypted using m.olm.v1.curve25519-aes-sha2
it needs to be augmented by a few additional attributes (see second code sample) prior encryption.
For example: to start a new outbound group session one needs to exchange the megolm session details with the room's devices, using a m.room_key
event. Before it is encrypted and subsequently packaged as the ciphertext
payload of a m.room.encrypted
event (see first code sample above), it needs to be augmented like this:
{
"content": {
"algorithm": "m.megolm.v1.aes-sha2",
"room_id": "!Cuyf34gef24t:localhost",
"session_id": "X3lUlvLELLYxeTx4yOVu6UDpasGEVO0Jbu+QFnm0cKQ",
"session_key": "AgAAAADxKHa9uFxcXzwYoNueL5Xqi69IkD4sni8LlfJL7qNBEY..."
},
"type": "m.room_key",
"sender": "<sender_user_id>",
"recipient": "<recipient_user_id>",
"recipient_keys": {
"ed25519": "<their_ed25519_key>"
},
"keys": {
"ed25519": "<our_ed25519_key>"
}
}
Unfortunately the spec isn't as precise about this as it could be. I'm not sure how to implement this in the given event model, and I don't know which payload events (besides m.room_key
) should be covered. I presume all of them. Thus I'd argue that we need a kind of OlmPayloadEvent
that wraps any other Event
, augmenting it with the keys "sender", "recipient", "recipient_keys" and "keys" as illustrated above.
FYI, my current workaround uses a RoomKey
instance, serializes it to JSON, adds the "missing" properties and passes the final string to libolm
's olm_encrypt()
(via my upcoming bindings library).
Thanks
The m.room.redaction
event has a top level redacts
field for the target event being redacted.
https://github.com/ma1uta/jeon/blob/b18e95529d61a1532d0d1351ee34da4f244396c9/common-api/src/main/java/io/github/ma1uta/matrix/event/RoomRedaction.java
https://matrix.org/docs/spec/client_server/latest#m-room-redaction
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.