Commit Graph

544 Commits

Author SHA1 Message Date
Maze
4fa44f7510 Add missing environmental variable checks
Encryption keys, themes and general config dir (if used) were stored in
the default directories even if Moment-specific environmental variables
were present.
2022-01-29 22:35:07 +01:00
Maze
8ff6adf2d8 Bump version 2022-01-24 01:15:16 +01:00
Maze
bf76510e8b Handle when server listing is unavailable
This is a bad place to display a huge error because it is a repeating
query. And also this is the first thing people see when opening the app
for the first time and it is a bad impression.
2022-01-15 01:35:56 +01:00
Maze
db9b578bce Add copyright notices for Moment 2022-01-14 22:52:31 +01:00
Maze
106e963573 Add Foliage theme and make it new default
Moment should have a different default theme than Mirage to make it more
visible that it's not the same software.
2022-01-14 21:50:23 +01:00
Maze
2839f83dde Change config dir, offer to migrate
Moment has different default directories and is controlled by
different environment variables. On first startup, Moment
detects Mirage directories and offers to copy them.
It doesn't make sense to migrate logins without migrating encryption
keys, so this is now included in migration. Themes are migrated as well.
Only offer migration is only if both config and data directory are able to be
migrated.
2022-01-14 19:27:59 +00:00
vslg
4cffbaa68d Fix Python 3.10 collections import 2021-11-19 13:12:42 -03:00
miruka
c86c4da7d1 Bump version to 0.7.2 2021-07-26 04:39:58 -04:00
miruka
94bf41dc3e Fix presence loop with unavailable/offline
Yes, again.
Also removes echo presence states to simplify things.
2021-07-26 04:39:58 -04:00
miruka
47cfd7c7b0 Show nio logging warnings 2021-07-26 04:39:58 -04:00
miruka
ba236e2be3 Remove some unused imports 2021-07-26 04:39:58 -04:00
miruka
42b2a040ec MatrixError: include server response content 2021-07-26 04:39:58 -04:00
miruka
6151444c71 MatrixError: include the server's message 2021-07-26 04:39:58 -04:00
Maze
1d3ec44919 Allow apostrophe in URL regex
Apostrophe is a valid URL character.
Example: https://en.wikipedia.org/wiki/Benford's_law
2021-07-26 04:39:58 -04:00
miruka
888b8b32c1 Fix account saved with incorrect presence on login
Saving account with an echo_ presence resulted in error 400 on /sync due
to the server not understanding the presence we're trying to set
2021-07-26 04:39:58 -04:00
miruka
d4b9fc60a4 Fix invisible presence restoration
When we are invisible and restart the client, set ourself to invisible,
not offline, and correctly keep the status message that should be set
whenever we get back to a visible online.
2021-07-26 04:39:58 -04:00
miruka
22bce261d3 Yet another try at fixing presence endless loop 2021-07-26 04:39:58 -04:00
miruka
02b4bddce5 Be invisible on startup, not echo_invisible
If our presence is invisible from the first sync, we'll never receive a
presence event telling us so.
The server just knows from the beginning, so show our local presence as
echo instead of echo_invisible (which causes the half-opacity presence orb)
2021-07-26 04:39:58 -04:00
miruka
c1f5605c1c Ignore offline presence updates for our account
If another client becomes invisible/offline or we stop syncing for some
time (due to e.g. connection issue or debugger freeze), the server will
tell us our presence is offline. Following this update would lead to our
our current connection being terminated, so ignore it.

Side-effect: if we become invisible and another client with this behavior
is using the account at the same time, this will result in us becoming
online/unavailable again a few seconds later, since we follow
updates for these status to avoid conflicts
2021-07-26 04:39:58 -04:00
miruka
3279a1befd Fix missing tail for inline <mx-reply> 2021-07-26 04:39:58 -04:00
miruka
18f742966e Presence fixes and improvements
- Allow using invisible mode on servers not supporting presence, to
  make use of the prevention of sending typing notifications and read
  marker updates

- For servers not supporting presence, display the account's presence
  orb in the left pane with half opacity

- Indicate in the presence orb tooltip when the presence we set hasn't
  yet been noticed by the server/the server doesn't support presence

- When reconnecting after being offline, if the server doesn't indicate
  we have a status message [set from another client], restore any
  previous message we had set in the current client

- Show our status message striked out when we're invisible or offline to
  indicate that it isn't being broadcasted

- Some code style cleanups

- Try to handle cases where we set a presence, but receive a new
  presence event for our account before the server takes notice of that
  new presence we want, which probably resulted in the "account keeps
  switching between online and unavailable every few sec" glitch
2021-07-26 04:39:58 -04:00
miruka
de7e14f9ca Color reply prefix in room delegate last message 2021-07-26 04:39:57 -04:00
miruka
93404559b9 Add ignored users list to account settings 2021-07-26 04:39:57 -04:00
miruka
719938d1db JSONize for QML any Collection, not just list/dict 2021-07-26 04:39:57 -04:00
miruka
dc0ed43f72 Add ignore user options in member context menues 2021-07-26 04:39:57 -04:00
miruka
678a56400a Add ignoring invite sender & fix forgotten rooms
When declining an invite, the popup now offers a checkbox to also add
the sender to the account data m.ignored_user_list event.

This will hide any further invite or message from that user in syncs,
and also immediatly remove the ones we currently have.

As a side-effect, the long-time bug that caused forgotten rooms to
immediatly reappear due to received a "<user> left" event has been
fixed.
2021-07-26 04:39:57 -04:00
miruka
fb84ea41c5 Fix forgetting already left room 2021-07-26 04:39:57 -04:00
miruka
7db0e07281 Fix lock_room_position error when forgetting room 2021-07-26 04:39:57 -04:00
miruka
334065895f Open links keybinds: ignore message mentions
When using the open_links_files(_externally) keybinds on a message,
ignore the URLs that mentions (user ID, username, room ID, room alias)
point to.
2021-07-26 04:39:57 -04:00
miruka
208e08ed2a Shorten reply text for room list last messages
For rooms in the room list, when the last message displayed under the
room name is a reply, change the
"In reply to @foo:example.org: original message... ⏎" text shown
before the actual reply content to just "↩ foo: ".

This lets the user preview the actual interesting part of the message,
instead of a long "In reply to" that takes all the available width.
2021-07-26 04:39:57 -04:00
miruka
e601a378d8 Workaround Qt's lack of support for HTML <hr>
When processing message HTML for the client from python, turn <hr>
tags into <p>──────...</p> em dash lines
2021-07-26 04:39:57 -04:00
miruka
e36fa4eeda Fix config writing failing if parent dir not exist
Problem introduced in ba3e93e658eb8c536a0dd803c8cb5fabbb68fb8f
2021-07-26 04:39:57 -04:00
miruka
59ef2004e1 Fix reply starting with a >quote not being colored
For a message that was a reply to another, and that that started with
a "> ..." quote, the quote wasn't getting highlighted due to regex not
accounting for cases where one is preceded by a </mx-reply> closing tag.
2021-07-26 04:39:57 -04:00
miruka
c4eef71a83 Fix inline >quote regex for quotes after a <tag>
Example, if a room list item subtitle was ">a \n >b", only ">a" was
wrapped with the "quote" class and colored appropriatly due to <a> being
wrapped in a <span> and the regex failing on that
2021-07-26 04:39:57 -04:00
miruka
5828c378be Turn matrix.to links into shorter forms
e.g. if someone posts a message containing
"https://matrix.to/#/@foo:example.org", that link will be turned into a
properly colored "@foo:example.org".
2021-07-26 04:39:57 -04:00
miruka
c8bf607fc2 Fix parsing links with some special characters
Add these characters to the regex allowed list for URL /paths:
non-latin word characters, : ! $ * + ^ @

This also fixes the parsing of matrix.to URLs in messages.
2021-07-26 04:39:57 -04:00
miruka
9fa2816d4b Require a space after # for markdown titles
Lets us types stuff like #room-aliases without having to escape the # or
get a bad surprise
2021-07-26 04:39:57 -04:00
miruka
c948c75d36 Fix ~/qrc: folder created on start in release mode 2021-07-26 04:39:57 -04:00
miruka
2b91fc048c Update mypy dev requirement to 0.812+
Noticable improvement: no longer throws errors when using
aiofiles 0.6+ functions.
2021-07-26 04:39:57 -04:00
miruka
688fdec9d7 Remove callback for nio.UnknownBadEvent
Should this type of event appear, our function to register events won't
find the attributes required to process it that are present on normal
events.
2021-07-26 04:39:57 -04:00
miruka
b07dfa1c01 Update changelog and version for 0.7.1 2021-03-04 22:20:05 -04:00
miruka
7848a2014a Fix custom theme not found when compiled with QRC
If the application was compiled with QRC (i.e. CONFIG+=dev), a theme
setting that wasn't one of the default theme would fail to be read.

Originally commit cf463f24786566c5ec04a6823e9917975ba2b265,
accidentally thrown out before release
2021-03-04 16:41:48 -04:00
miruka
3daeae324b Fix homeserver list for aiohttp <3.7.0 2021-03-04 13:42:00 -04:00
miruka
6febaeeb1b Support the http_proxy environment variable
Overrides General.proxy setting if set
2021-03-03 17:14:57 -04:00
miruka
f6f0a0c1ee Add General.proxy setting, supports HTTP & SOCKS5 2021-03-03 17:14:57 -04:00
miruka
b0d31af3c0 fetch_homeservers: use nio to make aiohttp session
Use a throwaway nio client to make ourself an aiohttp session with proxy
support, that way we don't have to depend on aiohttp and aiohttp-socks
libraries
2021-03-03 17:14:57 -04:00
miruka
902f13ab68 Lock position of the room that's focused in GUI
When the currently shown page is the chat of a certain room,
prevent that room from moving around in the left pane due to new
messages/activity or unread/highlight counters change.

When the user switches to another page/room, the previously held lock is
released and that room completes all the moves it would have done if it
wasn't locked.

This makes navigating a room list with lots of activity easier, and
prevent annoyances like clicking on a room with unread messages and
having it immediatly fly down the list (possibly out of scroll view).
2021-03-03 17:14:57 -04:00
miruka
3f88a2204e errors.py: remove duplicate MatrixBadGateway class 2021-03-03 17:14:56 -04:00
miruka
4bff58c828 model.py: remove leftover debugger call 2021-03-03 17:14:56 -04:00
miruka
a3206501de Fix mypy complaint in MatrixClient.edit_pushrule 2021-03-03 17:14:56 -04:00