439 Commits

Author SHA1 Message Date
Neek
1c4eeb4c41 events: Add relates_to field on StickerEventContent 2024-10-19 14:59:29 -04:00
Kévin Commaille
60b92e8e1d events: Stabilize support for marked unread room account data
The unstable `com.famedly.marked_unread` room account data is still
available behind the `unstable-msc2867` cargo feature to be able to
migrate data from the unstable to the stable prefix.
2024-10-19 14:59:15 -04:00
Kévin Commaille
cc1b2144ea chore: Point links to v1.12 of the spec 2024-10-19 14:59:08 -04:00
Kévin Commaille
9abafb284a events: Fix indentation in changelog 2024-10-19 14:58:54 -04:00
Doug
4a5d7d0e7a events: Add filename helper methods for audio, file, image and video messages. 2024-10-19 14:58:49 -04:00
Doug
e0db68241d events: Add helpers for media captions to audio, file, image and video messages 2024-10-19 14:58:46 -04:00
strawberry
9900d06765 Merge remote-tracking branch 'upstream/main' into conduwuit-changes 2024-09-17 17:55:49 -04:00
Timo
1ae98db9c4 changelog: Document device_id type change 2024-09-17 12:07:49 +02:00
Timo
92110cabb5 events: Use DeviceId instead of String. 2024-09-17 12:07:49 +02:00
Timo
1298c1d690 events: Fixing comments for new method. 2024-09-17 12:07:49 +02:00
strawberry
b6f82a72b6 Merge remote-tracking branch 'upstream/main' into conduwuit-changes 2024-09-13 16:35:24 -04:00
Timo
d92404d114
events: introduce custom StateKey type for call member state events 2024-09-12 08:28:06 +02:00
Jonas Platte
1a138ed6c9 Use workspace lint configuration instead of rustflags hack 2024-09-11 07:13:32 +00:00
strawberry
25c6d8b2ad cargo fmt
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-09-09 22:40:40 -04:00
strawberry
11155e576a Merge remote-tracking branch 'upstream/main' into conduwuit-changes 2024-09-07 12:20:19 -04:00
Kévin Commaille
8f288cc1f2 events: Replace deprecated lint in UI test 2024-09-07 17:11:13 +02:00
Kévin Commaille
a56787e506 chore: Fix new clippy lint
The new lint that is handled here is
too_long_first_doc_paragraph.
2024-09-07 17:10:18 +02:00
strawberry
b003338b90 Merge remote-tracking branch 'upstream/main' into conduwuit-changes 2024-09-07 08:18:57 -04:00
Kévin Commaille
88f56b0e00 html: Upgrade html5ever
Requires a complete change of the HTML tree, to have interior mutability
and be able to return borrowed data from a Handle.
It is now a Rc-based tree where each node has a weak reference to
its parent and strong references to its children.

This results ina few breaking changes to the public API.
2024-09-07 09:56:02 +02:00
strawberry
c8a2d06e24 Merge remote-tracking branch 'upstream/main' into conduwuit-changes
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-09-06 21:10:32 -04:00
Kévin Commaille
dac38e4e17 events: Improve markdown syntax detection
We also detect backslash escapes and entity references.
2024-09-06 09:59:47 +02:00
Kévin Commaille
0ea496b138 events: Upgrade pulldown-cmark 2024-09-06 09:59:47 +02:00
morguldir
8dd8aab29d
accountdata: add an enum to allow returning both global and room accountdata 2024-08-30 09:18:49 +02:00
Timo
642c981f99
MatrixRTC: fix call member parsing by using the correct focus_active format. (#1888)
`focus_select` -> `focus_selection`
2024-08-21 17:51:12 +02:00
strawberry
69b2bc4b8c Merge remote-tracking branch 'upstream/main' into conduwuit-changes 2024-08-14 01:47:43 -04:00
Andrew Ferrazzutti
82417e3940
events: Loosen type of call member event state keys
Allow MSC3401-style call membership state events to have state keys that
are arbitrary strings, and not just pure MXIDs.

This allows for state keys that are suffixed with the sender's device
ID, as well as ones prefixed by an underscore to bypass auth rules over
state keys that start with a `@` but do not strictly equal an MXID.
2024-08-10 09:41:46 +02:00
Kévin Commaille
04654f8833 chore: Fix new clippy warnings 2024-07-29 20:03:44 +02:00
torrybr
7f562fe67e
events: use web-time instead of std::time for BeaconInfoEventContent 2024-07-08 10:18:03 +02:00
strawberry
9a5bfad849 Merge remote-tracking branch 'upstream/main' into conduwuit-changes 2024-06-30 11:54:39 -04:00
Matthias Ahouansou
c37843e9be events: make allow field for restricted rooms optional
In the spec, it doesn't state that it is a required field, even for restricted rooms
2024-06-27 18:26:34 +00:00
Kévin Commaille
f17de39ed4 events: More relation serde fixes
It seems that we cant count on serde_json::to_value to detect
duplicates,
because it swallows them instead of returning an error.
The only solution then is to serialize to string and try to deserialize
again.
2024-06-25 14:10:11 +02:00
Benjamin Bouvier
e5a370f7e5 events: don't serialize the rel_type twice for Thread relationships 2024-06-25 11:00:38 +02:00
Benjamin Bouvier
fec2152d87
events: allow deserializing an event content with a type (#1850)
This allows deserializing all the `*EventContent` types into a parent `Any{...}EventContent`, assuming we know the type of the underlying event.

Required for serializing/deserializing the content of events we'd like to send, across application restarts, as in https://github.com/matrix-org/matrix-rust-sdk/issues/3361 for the Rust SDK.

---

* events: add deserialize_with_type to all the *EventContent types

* events: add smoke test for deserializing an event content with a type

* events: add a test for deserializing a secret storage key event content

* events: add fix for correctly matching events with a type fragment

* Address review comments.
2024-06-24 10:55:12 +02:00
Kévin Commaille
3eb0248cf8 events: Stabilize support for muting in VoIP calls
According to Matrix 1.11
2024-06-22 10:56:58 +02:00
Kévin Commaille
00a17dbe9d events: Fix deserialization of AnyGlobalAccountDataEvent for variants with type fragment 2024-06-21 18:10:31 +02:00
Kévin Commaille
b8e4d5b6a2 misc: Update spec links to latest version 2024-06-21 18:10:14 +02:00
Kévin Commaille
6347f547c1 events: Upgrade pulldown-cmark crate 2024-06-18 12:21:42 +02:00
Kévin Commaille
b367e42bd0 events: Remove unwanted pulldown-cmark cargo feature 2024-06-18 12:21:42 +02:00
Timo
c218174369
events: Support new matrixRTC membership format 2024-06-13 10:58:50 +02:00
torrybr
f60c79727a
events: Unstable support for MSC 3489 live location sharing 2024-06-10 23:45:42 +02:00
strawberry
fd686e7795 Merge remote-tracking branch 'upstream/main' into conduwuit-changes 2024-06-10 16:57:10 -04:00
Jonas Platte
d91e6d7e63
Simplify docsrs feature usage
- Don't instruct docs.rs to set it, it does so by default now:
  https://github.com/rust-lang/docs.rs/pull/2390
- Because of that, check-cfg also recognizes it and does not need
  extra configuration either.
2024-05-30 10:35:07 +02:00
Marco Antonio Alvarez
6cd3af9b86
events: Add support for encrypted stickers 2024-05-23 15:49:15 +02:00
strawberry
042444dc1d Merge remote-tracking branch 'upstream/main' into conduwuit-changes 2024-05-21 21:31:00 -04:00
Damir Jelić
b7b9816314 Make the url crate a workspace dependency 2024-05-14 18:18:15 +02:00
Kévin Commaille
4ec2d68fc0
Release ruma-events 0.28.1 2024-05-13 15:18:09 +02:00
Kévin Commaille
0f38daacef
events: Handle existing mentions in make_replacement
Allows to use add_mentions before calling it.
Deprecates set_mentions.
2024-05-13 15:07:26 +02:00
strawberry
62aca1e976 feat: add undocumented org.matrix.room.preview_urls room state event
this is an undocumented room state event that at least Element uses to
disable/enable URL previews by default for the entire room. we'd like
to use this to disable URL previews in the conduwuit admin room where we
have large message blocks with some text that clients may render as URLs,
or a list of domains from the server config output.

also see https://github.com/matrix-org/matrix-spec/issues/394

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-12 17:12:19 -04:00
Kévin Commaille
42bec95cdc events: Move all methods to construct a relation to RoomMessageEventContentWithoutRelation 2024-05-12 19:53:27 +02:00
Kévin Commaille
d6c4533b7d chore: Fix new warnings 2024-05-12 15:49:28 +02:00