14 Commits

Author SHA1 Message Date
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
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
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
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
Benjamin Bouvier
e5a370f7e5 events: don't serialize the rel_type twice for Thread relationships 2024-06-25 11:00:38 +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
Jonas Platte
740f357e97
events: Don't fail event content parsing on invalid relation 2023-11-16 14:12:55 +01:00
Jonas Platte
a3f8c97b33
events: Add a test case for reply to threaded message fallback 2023-10-12 12:47:53 +02:00
Jonas Platte
6dff2f37d1
events: Remove redundant import 2023-10-12 12:36:59 +02:00
Jonas Platte
5c570b1604
events: Change AddMentions::Yes to only mention the original sender 2023-10-09 14:44:35 +02:00
Kévin Commaille
5040aa2a93 events: Allow to build reply to raw events 2023-09-20 12:18:21 +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