In the build.rs we're looking for the FRACTAL_LOCALEDIR env variable
that is written by the cargo.sh script ran by meson but if we want to
run this for development we can't use cargo run because that env doesn't
exists so we'll use fractal-gtk/po as default.
This adds the definition of the text domain used by gettext to
translate the strings of the user interface. gettext will search for
a package named "fractal" in the directory "./fractal-gtk/po". Thus
MO files containing the translations must be found in
"./fractal-gtk/po/[LANG]/LC_MESSAGES/fractal.mo".
Closes https://gitlab.gnome.org/World/fractal/issues/89
When there's no connection multiple calls to sync makes the Fractal
process to consume all the CPU because the long polling timeout isn't
working so we need to wait here to avoid this problem.
Fix#139
Gold is for admins (100 PL) and Silver is for moderators (50PL).
Currently the badge is drawn with a DrawingArea and attached to the
avatar with a GtkOverlay.
Making full set Categories=GNOME;GTK;Network;InstantMessaging;
Some distros mandate full usage of the freedesktop spec.
Alternative to using InstantMessaging here would be Chat
This patch fix the problem that causes the elimination of member events
from the initial sync.
To calculate 1:1 rooms we use the members in that rooms so if we don't
have that information we should ask to the matrix server.
I've just move some code to the fractal-gtk to calculate the room name
when we receive the list of member in a room. Meantime we'll show a
"..." that I suppose that any user will understand as "loading".
This loading is done in the background so the initial sync works faster
and if we've rooms without name we'll ask to the server about the
members and then we'll change the room name according to the number of
members.
This change speedup the initial sync because we're removing a lot of
events that we don't need at the moment. We're getting the list of
members just when we enters clicks in a room.
This gives a manual implementation of the PartialOrd trait for Message
which is a chronological order. We first check that the messages are
not the same in order to be sure that no time offset could make the
comparison erroneous, then we simply compare the dates and times of
the messages.
This gives a manual implementation of the PartialEq trait for Message
because deriving this trait can give false negatives. So it fixes the
issue of the "New messages" divider not showing at startup.
See https://gitlab.gnome.org/World/fractal/issues/133
New features:
* Make "Start chat" buttons insensitive
* Notify for direct messages
Fixes:
* Update initial_sync notification message
* Use Pango for room with no avatars
* Revert "Don't send markdown in the body when parsed"
* api: Use md5 as unique message id instead of i32
* markdown: Remove P tag that wraps the html
The Comrak lib that we're using wraps each parsed markdown with a
`<p>...</p>\n` so we need to remove to avoid the modification of the
real message.
See #210
We were using an integer for the message id when we were sending a
message. This id was incremented with each message sent.
Reading the matrix server documentation I've discovered that this id
should be unique:
> Clients should generate an ID unique across requests with the same
> access token; it will be used by the server to ensure idempotency of
> requests.
So this was a problem. I think that this is because some messages never
got sent to the server and we don't get any error back.
To fix that now we generate an unique id for each message using the room
id, the message body and the message date, we concatenate that and make
an md5 sum, so this should be unique.
https://matrix.org/docs/spec/client_server/r0.3.0.html#put-matrix-client-r0-rooms-roomid-send-eventtype-txnid
See #201