Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework RoomMessageEvent content API again #812

Merged
merged 5 commits into from
Oct 22, 2024

Conversation

KitsuneRal
Copy link
Member

It's really straightforward now :) RoomMessageEvent::has<>() - check that it's possible to extract event content of a given type; RoomMessageEvent::get<>() - actually try to get event content of that type. At this point has() is not optimised and in some cases effectively creates a content object any way. Can be tackled sometime later.

It's really straightforward now :) RoomMessageEvent::has<>() - check
that it's possible to extract event content of a given type;
RoomMessageEvent::get<>() - actually try to get event content of that
type. At this point has() is not optimised and in some cases effectively
creates a content object any way. Can be tackled sometime later.
@KitsuneRal KitsuneRal added the regression Something broken since the last release label Oct 18, 2024
Copy link

sonarcloud bot commented Oct 18, 2024

We already have fillJson() for FileSourceInfo, adding a deserialising
function is just logical (and fixes a problem with Thumbnail's EFM
structure never being initialised because EFM had to be supplied as
a separate argument and was forgotten).
Instead of deserialising the FileSourceInfo structure from the event,
updating it and serialising again, just serialise the new structure
and update the content JSON with the result.
Fixes dealing with common attributes being a problem, described in
#812 (comment)
@KitsuneRal KitsuneRal merged commit 6175147 into dev Oct 22, 2024
6 checks passed
@KitsuneRal KitsuneRal deleted the kitsune/fix-rme-filecontent branch October 22, 2024 13:38
kdesysadmin pushed a commit to KDE/neochat that referenced this pull request Oct 23, 2024
kdesysadmin pushed a commit to KDE/neochat that referenced this pull request Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression Something broken since the last release
Projects
Status: 0.9 - Done
Development

Successfully merging this pull request may close these issues.

2 participants