If a user redacts the first message in a group they will cause the
header to be deleted. This makes it impossible to tell who sent the rest
of the messages in the group.
Set the header as true for the next message if this is the case.
In case other messages in the group have already been deleted we loop
over the messages to find the next non-redacted one from our current
sender.
Signed-off-by: Alistair Francis <alistair@alistair23.me>
If the previous message has been redacted don't group the messages.
This fixes an issue where a user can post a single message, resuling in
their name and message appearing. Then a user can redact that message,
removing their name and message. Finally they can post a new message
where only the message but not the name appears.
This commit has the downside that if a user redacts a message in the
middle of multiple messages their name will appear redundantly. These
will be fixed by "refresing" the room, by either swapping rooms or
restarting Fractal.
Signed-off-by: Alistair Francis <alistair@alistair23.me>
This makes available the ffmpeg-related decoders to the gstreamer
instance in the Sdk. This means we can now play more audiofiles
with the audio player, and later on a wider variety of video
files.
Before, when a user changed the language for spell check,
that language was saved by gtk application-wide.
With this commit, the language chosen by the user for spell check gets saved
in the Matrix account data of the particular room the language was chosen in;
and, by syncronizing, it also gets saved in the new field `language` of Room.
When the user enters a room, gspell gets set for the language saved
for that room.
For some images - gifs in particular - thumbnails can't be
generated by Fractal. In such cases `m.extra_content` would
be `None`. In `attach_message()`, however, we unwrapped
`extra_content` assuming it would never be `None`. This
caused a crash when uploading gifs.
This commit makes sure that we handle the case of missing
`extra_content` by making `extra_content` in `attach_file()`
an `Option<ExtraContent>`, then setting the thumbnail url
appropriately.
Incidentally, this commit also seems to fix an issue where images would show broken thumbnails after a user
uploaded them.
warning: cannot borrow `*self` as mutable because it is also borrowed as immutable
--> fractal-gtk/src/appop/room.rs:137:17
|
136 | if let Some(ref active_room) = self.active_room {
| --------------- immutable borrow occurs here
137 | self.set_active_room_by_id(active_room.clone());
| ^^^^ ----------- immutable borrow later used here
| |
| mutable borrow occurs here
Previously we used a `String` for this purpose, which
made it harder to trace when and where we were passing
access tokens. In the future, when it is used everywhere,
it won't be possible to create tokens from within the app
to avoid using non-existent tokens.
When moving our architecture to using GAction, the delete
action was forgotten. This meant that while "Delete Message"
showed in the UI, the button did nothing.
Fixes#515
This guarantees that the (de)serialized structs which
contain URLs in any of their fields will always have
a valid URL string and not just a generic one.
When a user wants to add a phone number or email addess, a verifikation token is sent to them and a dialog is opened to enter it.
Before the commit, after closing the verification dialog, the settings dialog was not refreshed.
Therefore the added <phone number / email adress> would stay in the input
with a spinner spinning next to it until another action was taken.
With this commit, closing the verification dialog refreshes the settings window.
Same situation for email token request verification and phone token request verification:
Before, the user was always shown the error message "Couldn’t add the <email address / phone number.>",
also when the error was due to the fact that the <email / phone> was already in use.
With this commit, that bug is fixed: when the <email / phone> is already in use,
the user is shown the error message "<Email / Phone number> is already in use"
Before, "Medium" was renamed to "lowercase".
With this commit, "Email" and "MsIsdn" are renamed to "email" and "msisdn", respectively.
This commit fixes the bug due to which account settings wouldn't load.
Before, when an error occurred trying to load account settings,
the user would see a spinner until pressing the "go back" button manually.
With this commit, when an error occurs trying to load account settings,
an error dialog opens. Furthermore the "go back" button is activated automatically.
In particular, when the user closes the error dialog,
they find themselves back in the state they came from.
Before, a typing event was sent to the server on every single key release.
A lot of sent typing events were redundant due to the timeout functionality
implemented in the matrix propocol for typing events.
With this commit, this overload of events sent to the server gets avoided by
only sending a new typing event, if the last one was sent more than three seconds ago.