Commit graph

1816 commits

Author SHA1 Message Date
Alejandro Domínguez
219b77803f Remove user_id from Backend 2019-12-29 23:56:49 +01:00
Çağatay Yiğit Şahin
cb3fec53a2 Add Turkish translation 2019-12-27 16:05:50 +00:00
Alejandro Domínguez
5571bb4cb6 AppOp: Store all login-dependent data into an optional field 2019-12-23 01:25:31 +01:00
Daniel García Moreno
28c4ce4100 Merge branch 'Stunkymonkey/fractal-fix-ranges' 2019-12-22 10:11:09 +01:00
Daniel García Moreno
1fc1f3ef2c Merge branch 'Stunkymonkey/fractal-clap-fixes' 2019-12-22 10:07:57 +01:00
Alistair Francis
ba7ec75868 fractal-gtk: room_history: Set header for new messages
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>
2019-12-20 22:55:31 -08:00
Felix Buehler
f2e378448f [fractal-gtk] fix overlapping range 2019-12-20 22:32:25 +01:00
Felix Buehler
7498c8de1f [fractal-gtk] display correct fractal version 2019-12-20 22:28:23 +01:00
Alistair Francis
c95bd28dbe fractal-matrix-api: Handle a redacted message event
Signed-off-by: Alistair Francis <alistair@alistair23.me>
2019-12-19 20:20:14 -08:00
Alistair Francis
386f26c11a fractal-gtk: appop: Allow removing a message
Signed-off-by: Alistair Francis <alistair@alistair23.me>
2019-12-19 20:20:14 -08:00
Alistair Francis
b04127d0c2 fractal-gtk: room_history: Allow removing a message
Signed-off-by: Alistair Francis <alistair@alistair23.me>
2019-12-19 20:20:14 -08:00
Alistair Francis
ef4a8abd9b fractal-gtk: room_history: Don't group messages if redacted
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>
2019-12-19 20:20:14 -08:00
Jordan Petridis
1674e6350f
Flatpak: depend on the ffmpeg-full extension
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.
2019-12-16 22:10:35 +02:00
Anders Jonsson
dac8a72f77 Update Swedish translation 2019-12-15 20:52:25 +00:00
Daniel García Moreno
a5bdd29211 Merge branch 'paysonwallach/fractal-patch-1' 2019-12-10 08:24:32 +01:00
Julian Hofer
0beb9ab262 Switch order of if blocks to increase readability
Several if statements in the code started with the negation
of the boolean condition to check,
which makes it harder to comprehend the code.
2019-12-03 07:21:28 +00:00
sonjita
d78b52a371 Save language chosen for spell check for each room
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.
2019-12-03 07:09:36 +00:00
Daniel García Moreno
1dac3f21d4 New release 4.2.2 2019-11-30 10:51:52 +01:00
Alexandre Franke
65a40d4fb0 Update release notes for 4.2.2 2019-11-27 22:21:53 +01:00
Aurabindo J
0d0d7058f9 Update URL of gnome-nightly flatpak repo 2019-11-23 09:25:57 +00:00
Alejandro Domínguez
15a66e69ab Revert "API: Use UserId from ruma-identifiers for stronger validation"
This reverts commit 7b4937e4bd. Fixes #554.
2019-11-23 01:10:21 +01:00
Payson Wallach
4bce11601c (#431) Check vector length before accessing element 2019-11-14 22:44:14 -06:00
Alejandro Domínguez
9101aa43de Use Url where possible 2019-11-06 22:08:48 +01:00
Alejandro Domínguez
1b183d3469 API: Remove access_token from BackendData 2019-11-06 22:08:48 +01:00
Alex Monday
f0e6e408d3 app.css: Use opacity for .direct-chat icon instead of hardcoded color 2019-11-06 07:22:23 +00:00
Christopher Davis
8d15778c6f api: Properly handle case when thumbnail can't be generated
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.
2019-11-06 07:20:04 +00:00
Federico Mena Quintero
31f177f5c1 Get rid of "warning: cannot borrow *self as mutable"
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
2019-11-05 18:42:03 +00:00
Federico Mena Quintero
03129a931f (#548) - Don't use String::truncate() incorrectly
This was truncating a string at a hardcoded length of 80, which is not
necessarily an UTF-8 character boundary.

Fixes https://gitlab.gnome.org/GNOME/fractal/issues/548
2019-11-05 18:42:03 +00:00
Ufeanei Krystel
1be40acd60 README:fix broken URL 2019-11-01 08:51:12 +00:00
Alexandre Franke
2884fba6c3 Update French translation 2019-10-30 09:06:13 +00:00
Julian Hofer
531790b67c Slightly shorten the command chain in backend_loop
Exchange 'loop' with 'while let Ok(recv)' in order to get rid
of the 'Ok's at the beginning of nearly every pattern
2019-10-27 23:41:28 +01:00
Alejandro Domínguez
7ad56e4f6c API: Use DeviceId 2019-10-26 19:27:08 +00:00
Alejandro Domínguez
78eb03bf34 API: Use RoomId and RoomAliasId for stronger validation 2019-10-26 19:27:08 +00:00
Alejandro Domínguez
7b4937e4bd API: Use UserId from ruma-identifiers for stronger validation 2019-10-26 19:27:08 +00:00
Alejandro Domínguez
0b617adbd1 API: Use AccessToken for the access token
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.
2019-10-26 19:27:08 +00:00
Christopher Davis
d5214a1d5e fractal-gtk: Send redaction events
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
2019-10-26 01:09:42 -07:00
Alexandre Franke
2b9349d224 Update French translation 2019-10-25 10:48:15 +00:00
Rafael Fontenelle
a04fe36293 Update Brazilian Portuguese translation 2019-10-24 14:04:58 +00:00
Piotr Drąg
68d4a4c6fa Update Polish translation 2019-10-24 15:52:19 +02:00
Alejandro Domínguez
09eca65e11 API, BackendData: remove server_url field 2019-10-23 21:08:12 +02:00
Daniel Mustieles
d4bad28fd3 Updated Spanish Translation 2019-10-23 12:16:04 +02:00
sonjita
23285c155b Fixed strings for extraction by gettext 2019-10-21 13:28:01 +02:00
Alejandro Domínguez
9882dd9cd4 API: Merge serializers and deserializers
This allows the use of #[serde(with = "")] macro
attribute for both the serializer and deserializer
instead of specifying each one separately.
2019-10-21 10:36:31 +02:00
Alejandro Domínguez
40b7ef9f0e API: Implement (de)serializers for Url and Host types
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.
2019-10-21 10:36:31 +02:00
sonjita
063e5504a0 Reload settings when verification dialog is closed
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.
2019-10-18 16:48:02 +02:00
sonjita
05ecf239b5 Fix error handling of token request verification
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"
2019-10-18 16:48:02 +02:00
sonjita
aff0d6bcbe Fix deserialization of enum Medium
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.
2019-10-17 18:54:48 +02:00
sonjita
91a1e66a85 Display error when settings can'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.
2019-10-17 18:54:48 +02:00
sonjita
69aa16fe5e Reduce number of typing events sent to server
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.
2019-10-17 16:22:54 +00:00
Piotr Drąg
6580761f5c Update Polish translation 2019-10-14 16:07:55 +02:00