Kévin Commaille
3321286242
events: Do not generate reply fallbacks anymore
...
According to MSC2781.
The helper methods for the relevant relations have been simplified to
only take the necessary data.
2025-01-02 18:42:26 -05:00
Kévin Commaille
f753a2f326
events: Improve markdown parsing code
...
Loop through the events only once to detect both whether there is
markdown and whether the markdown is inline.
Fix more cases of false negatives in markdown detection, like
whitespaces that are removed or the string beginning by a backslash
escape.
2024-11-07 18:59:47 -05:00
Benjamin Kampmann
01ffae2ac2
events: Implement url previews as per MSC4095
2024-11-07 18:55:43 -05:00
Kévin Commaille
278a45aec8
events: Remove p tag around inline markdown
...
As recommended by the spec.
2024-11-07 18:52:56 -05:00
Doug
e0db68241d
events: Add helpers for media captions to audio, file, image and video messages
2024-10-19 14:58:46 -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
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
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
Jonas Platte
2a6d31a023
Upgrade pulldown-cmark from 0.9 to 0.10
2024-04-28 22:50:39 +02:00
Jonas Platte
e8bc589e52
Transition to type privacy lints
2023-11-09 09:50:04 +01:00
Jonas Platte
e7ed90ad0f
events: Add RoomMessageEventContentWithoutRelation::add_mentions
2023-10-10 09:54:11 +02:00
Jonas Platte
440a563355
event: Add reply-making methods to RoomMessageEventWithoutRelation
2023-10-10 09:54:11 +02:00
Jonas Platte
0f023c5222
events: Move RoomMessageEventContentWithoutRelation into separate module
2023-10-09 16:00:28 +02:00
Jonas Platte
25d0b3ce59
events: Move message relation types into separate module
2023-10-09 15:59:49 +02:00
Jonas Platte
cf59d6ecb1
events: Re-group imports, re-exports in room::message
2023-10-09 15:55:08 +02:00
Jonas Platte
9b1f7363a0
events: Move replacement body text generation to MessageType
...
… from RoomMessageEventContent.
2023-10-09 15:26:27 +02:00
Jonas Platte
9b94117bf2
events: Move reply fallback generation to MessageType
...
… from RoomMessageEventContent.
2023-10-09 15:12:52 +02:00
Jonas Platte
5c570b1604
events: Change AddMentions::Yes to only mention the original sender
2023-10-09 14:44:35 +02:00
Jonas Platte
935ac70e28
events: Add missing track_caller attribute
...
Without this one, the `#[track_caller]` in `make_reply_to` and
`make_reply_to_raw` were pointless.
2023-10-09 13:57:31 +02:00
Kévin Commaille
5040aa2a93
events: Allow to build reply to raw events
2023-09-20 12:18:21 +02:00
Jonas Platte
bc48eb2162
events: Ensure that all public items are documented
2023-09-20 11:52:25 +02:00
Jonas Platte
5907544166
events: Add ReplacementMetadata
...
… to allow creating replacements without having the full original event.
2023-09-20 11:37:39 +02:00
Kévin Commaille
18195e0a6e
events: Allow replacement unstable poll start events to have no fallback
2023-09-15 13:19:22 +02:00
Jonas Platte
dad3c70d9d
events: Fix missing re-export of new unstable types
2023-09-12 15:53:07 +02:00
Kévin Commaille
b4853aa8fa
events: Add method on RoomMessageEventContent to apply a replacement
2023-09-04 14:11:33 +02:00
Jonas Platte
31331f3165
Bring back ruma-events
...
Co-authored-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-08-28 10:23:54 +02:00
Kévin Commaille
c3f9a3cb70
common: Merge ruma-events into ruma-common
2022-03-04 11:45:07 +00:00
Kévin Commaille
f2dca60fc7
macros: Rename ruma-events-macros to ruma-macros
2022-02-27 13:54:17 +01:00
Kévin Commaille
771f437d9e
events: Rename MessageEvent to MessageLikeEvent
2022-02-22 20:06:36 +01:00
Jonathan de Jong
936bb64e84
Update links to spec.matrix.org/v1.2
2022-02-18 19:45:04 +01:00
Kévin Commaille
cdf383cc45
events: Move MSCs to per-msc features
2022-02-11 10:18:07 +01:00
Jonas Platte
89ae41166d
events: Move new verification events out of unstable-pre-spec
...
… since they were stabilized with v1.1.
2022-01-31 20:43:38 +01:00
Jonas Platte
ee977b48f0
Make the inner type of _Custom enum variants unusable
...
The variant itself would be private if possible, this is the solution
closest to that.
2022-01-13 11:38:48 +01:00
homersimpsons
2d3816d72c
ruma-events: Add links to specs in modules docs
2021-12-28 14:36:34 +00:00
Jonas Platte
3ce578f384
identifiers: Make UserId a DST
2021-11-26 00:40:40 +01:00
Jonas Platte
ec605a0959
identifiers: Make MxcUri a DST
2021-11-26 00:04:28 +01:00
Jonas Platte
52608cc72c
identifiers: Make EventId a DST
2021-11-25 22:34:40 +01:00
Jonas Platte
438efee143
identifiers: Remove Box<$id> aliases
2021-11-25 21:07:14 +01:00
Jonas Platte
1e9f846722
events: Add accessor methods for RoomMessageEventContent
2021-11-23 10:50:14 +01:00
Jonas Platte
897146e369
events: Fix some docs being on wrong constructor
2021-11-19 10:49:11 +01:00
Jonas Platte
49e5d45ac9
events: Improve usability and docs of m.room.message
reply constructors
2021-11-18 22:51:58 +01:00
Jonas Platte
824ef40bd9
events: Move message reply helper functions into a separate module
2021-11-18 20:20:43 +01:00
Jonas Platte
3959ec4abb
events: Fix a typo
2021-11-18 19:32:02 +01:00
Jonas Platte
b7334edaf7
events: Update reply ctor argument types
2021-11-18 19:12:08 +01:00
Tilo Spannagel
8fcd58c8de
events: Add markdown constructors to RoomMessageEventContent
2021-10-11 09:31:30 +02:00
Jonas Platte
aa5fdf9d22
Merge serde attributes and improve docs
2021-10-08 12:49:13 +02:00
Jonas Platte
271491732e
Remove now-redundant doc(cfg) attributes
...
They are now implied:
https://github.com/rust-lang/rust/pull/89596
2021-10-08 11:52:18 +02:00
Jonas Platte
04080085f9
events: Include all event type segments in Rust type names
2021-10-02 21:25:21 +02:00
Jonas Platte
edbd5a696c
events: Use inline code blocks instead of emphasis for type strings
2021-10-01 18:35:01 +02:00