Commit graph

2994 commits

Author SHA1 Message Date
lymkwi
50cdcc0376
Implement attachment captioning
Starting with Client-Server API v1.10 [0], the `body` field in messages of type `m.image`,
`m.audio`, `m.video` and `m.file` can be used as the caption of the attachment. This is fact the way
that Nheko rends captions on images, for example.

This commit introduces a field in the `UploadHandle`s awaiting upload on the timeline's `InputBar`
which holds a caption taken from the input text area. The decision is as follows:
 - If text bar is empty or full of blanks, send all media with no caption
 - If the text is an incomplete command, fail
 - If there are no pending uploads, proceed as done previously (if there is no command recognized
   send the text, or try and execute the command and if it fails send the text)
 - If there are pending uploads, only accept uploads if nothing resembling a command name is in the
   text area. That text becomes the caption for all pending media. Otherwise, try and execute the
   command, and, if it fails, send it as text.

While this workflow for captioning so far is a bit jank, it is the least effort implementation.

Links:
[0]: https://spec.matrix.org/v1.10/client-server-api/#mimage

Signed-off-by: lymkwi <lymkwi@vulpinecitrus.info>
2024-05-01 13:02:47 +02:00
Integral
c890aebf72
refactor: replace QString constructors with QStringLiteral 2024-04-26 13:34:51 -07:00
NepNep21
4810c2a2bc
Lint 2024-04-23 19:58:14 -03:00
NepNep21
3f05df19a1
Fix image copying on windows 2024-04-09 12:47:02 -03:00
Nicolas Werner
b077596704
Fix lint 2024-04-05 22:47:09 +02:00
Nicolas Werner
a415b39bf9
Color conversion seems to be redundant before the sink (upload too, but removing that breaks stuff) 2024-04-05 04:15:29 +02:00
Nicolas Werner
f1722d5f64
Add some voip debugging hoops 2024-04-05 03:57:28 +02:00
Nicolas Werner
9656304e24
Remove attributes on del tags
There is no use case for those afaik and they do break our replacement
in the frontend. Let's instead strip them out in the sanitization step,
since there are no valid attributes defined for the del tag currenlty.

In theory we could also strip out all attributes here, but that seems
excessive for now.

Fixes https://github.com/Nheko-Reborn/nheko/issues/1693
2024-03-20 21:53:20 +01:00
Nicolas Werner
30ac76e942
Fix presence not being per profile
fixes #1699
2024-03-19 01:55:53 +01:00
Nicolas Werner
aef9617d1e
Make a few headers forward declarations 2024-03-16 11:50:39 +01:00
Nicolas Werner
06927cd3c2
Include moc files for a tiny speedup on incremental builds 2024-03-16 01:34:23 +01:00
Nicolas Werner
9c2d50bb86
Bump supported matrix versions to 1.9 2024-03-08 18:57:50 +01:00
Nicolas Werner
7c2a152cfb
Add support for intentional mentions
This is still a bit flaky around when to remove a mention, but it should
work in most cases. Might add a toggle in the future to disable these
though.
2024-03-08 18:45:18 +01:00
Nicolas Werner
b3c78ea81a
Fix animated images rendering offscreen for the first frame 2024-03-05 21:56:10 +01:00
Nicolas Werner
a9ec130cbe
Fix too many characters are emojis now 2024-03-04 10:28:59 +01:00
Nicolas Werner
e03fb71b08
Force emoji font on a few more characters
Looks a bit better and works around some height weirdness on my systems.
2024-03-03 19:48:50 +01:00
Loren Burkholder
bf89de8c75
Fix ordering of switch statement 2024-03-01 19:47:33 -05:00
Loren Burkholder
21d51d9739
Add a command to gradually glitch text in a message 2024-02-27 13:17:20 -05:00
Loren Burkholder
99bbe26609
Add a glitch text command 2024-02-26 19:05:37 -05:00
Nicolas Werner
8ca0f61cad
Disable optimistic pagination to fetch events edited into the thread before the threadroot
fixes #1661
2024-01-16 04:01:13 +01:00
Nicolas Werner
51236c3260
Fix verification with multiple devices in parallel
Fixes #1125
2024-01-15 02:17:18 +01:00
NepNep21
4058a99c6a
Fix gstreamer deinit 2024-01-14 17:21:44 -05:00
Nicolas Werner
1254ac41ce
Support "fixed" mac method in verification 2024-01-14 06:11:11 +01:00
Nicolas Werner
c130e4cf06
Use constant for sas verification mac 2024-01-14 06:11:11 +01:00
Nicolas Werner
2dea689fa5
Make volume control logarithmic again 2024-01-11 22:32:34 +01:00
Nicolas Werner
eaea788a7f
Use macos define everywhere 2024-01-09 03:17:28 +01:00
Nicolas Werner
7b2d04cdd8
Fix macOS apple silicon build 2024-01-09 03:05:00 +01:00
q234rty
2ced20d755
Use dynamic properties for NhekoFixupPaletteEventFilter
A new window could have the same `QWindow *` value as an already free'ed window,
so using a `QSet<QWindow *>` with potentially free'ed windows might not be reliable.
Use dynamic properties instead.
2024-01-08 17:22:46 +08:00
Nicolas Werner
8214e8dcf2
Make clazy happy 2024-01-08 01:30:12 +01:00
Nicolas Werner
eed23cdf11
Fix lag when media messages are shown and fix media controls 2024-01-08 01:23:55 +01:00
Nicolas Werner
87c063b112
Speedup room switching by forcing a bigger initial item size 2024-01-08 00:21:42 +01:00
Nicolas Werner
392c07adbe
Faster blurhash decode 2024-01-07 21:52:20 +01:00
DeepBlueV7.X
96c4d05730
Merge pull request #1649 from duarm/swipe-toggle
disable swipe motions toggle
2024-01-07 19:52:44 +01:00
DeepBlueV7.X
45cc7ab6f7
Merge pull request #1635 from NepNep21/ignore-command
Add /ignore, fixes #1634
2024-01-06 14:38:45 +00:00
duarm
9715a0ee16 lint 2023-12-31 16:18:46 -03:00
duarm
000681b25e disable swipe motions toggle 2023-12-31 16:15:38 -03:00
NepNep21
c4ab063aec
deleteLater() on failure 2023-12-21 22:05:24 -03:00
DeepBlueV7.X
8049297cd1
Merge pull request #1630 from FallenValkyrie/allow_sticker_pack_removal
Allow sticker pack removal
2023-12-22 01:00:26 +01:00
Nep Nep
a691f5de3c
Merge branch 'Nheko-Reborn:master' into ignore-command 2023-12-20 20:31:48 -03:00
NepNep21
2abd2870e0
Fix memory leak and invite filtering 2023-12-19 23:53:55 -03:00
NepNep21
1295e84020
Other occurences 2023-12-19 21:44:19 -03:00
Nep Nep
7c57292c6d
Improve naming
Co-authored-by: DeepBlueV7.X <nicolas.werner@hotmail.de>
2023-12-19 21:41:48 -03:00
FallenValkyrie
31623000a8
Implement account pack deletion 2023-12-19 16:12:38 +01:00
Nicolas Werner
8d7175b702
Fix backslashes escapes
(And shrug losing arms in replies)
2023-12-19 00:49:41 +01:00
Nep Nep
7dbad2c648
Merge branch 'Nheko-Reborn:master' into ignore-command 2023-12-17 21:35:01 -03:00
NepNep21
bfdf87a92d
Multiple changes
More consistent language with similar description strings
Add manpage entry
Add /unignore
Add ignore & decline button in the invite page
Add invite rejection to all ignore methods
2023-12-17 20:17:43 -03:00
q234rty
d372158dde
Trigger less QEvent::ApplicationPaletteChange
The event seems to be very expensive on certain platform theme plugins.

Fixes #1639
2023-12-17 01:33:08 +08:00
FallenValkyrie
e8b9d92e8e
Factor out the logic to delete an ImagePack 2023-12-16 15:48:06 +01:00
Nicolas Werner
c67f301f8b
Work around clazy claiming we connect a lambda 2023-12-13 17:20:34 +01:00
Nicolas Werner
d116deedd7
Allow clicking notifications on Windows 2023-12-12 23:53:32 +01:00
NepNep21
4695bbb340
Add /ignore 2023-12-11 22:29:36 -03:00
Nicolas Werner
4142703990
Try to make windows notifications prettier 2023-12-11 03:11:58 +01:00
Nicolas Werner
b4afeada58
Fix urls in widgets being double encoded
See https://bugreports.qt.io/browse/QTBUG-110446
2023-12-04 20:32:29 +01:00
Loren Burkholder
5bd53e9479
Fix profile argument parsing bug 2023-11-29 20:18:17 -05:00
Nicolas Werner
242f61c8a3
Fix state event rendering for join rules and emojis 2023-11-28 16:12:36 +01:00
Nicolas Werner
eb2c87f060
Unset hidden space when space is left 2023-11-27 22:44:44 +01:00
Nicolas Werner
b16b52b40b
Support activation tokens for notifications 2023-11-20 14:05:03 +01:00
Nicolas Werner
234e05eef3
Support window activation on wayland
This is a bit hacky, because we open a window to actually get a valid
activation token, but...
2023-11-20 13:31:51 +01:00
Nicolas Werner
8ea03e41e0
Switch to KDSingleApplication 2023-11-20 02:56:42 +01:00
Nicolas Werner
6f52686162
Automatically increase database limits when hit 2023-11-19 23:44:19 +01:00
Nicolas Werner
ebbd8f3341
Fix some round images being persisted as not round 2023-11-19 20:26:54 +01:00
Nicolas Werner
ff82452816
Upgrade trust of megolm sessions when receiving RoomKey
Before we only did that, when we basically didn't have the key yet. But
since we usually get sent a RoomKey when a new message is sent after we
sign in, we were discarding, that those messages should usually now be
trusted.
2023-11-19 20:11:21 +01:00
Nicolas Werner
c69f0f95a9
Fix Nheko freezing after stopping a call on Wayland 2023-11-09 23:55:42 +01:00
Nicolas Werner
34ebd2b30e
Fix call only ringing the second time 2023-11-09 21:47:03 +01:00
Nicolas Werner
2f98a4475f
Get rid of useless capture 2023-11-09 21:40:46 +01:00
Nicolas Werner
0e0a93914e
Replace mediafiles
fixes #1590
2023-11-09 21:32:19 +01:00
Nicolas Werner
89df4aa150
Fix active user check 2023-11-05 12:09:29 +01:00
Nicolas Werner
67c69fd861
Make clazy happy 2023-11-02 18:33:15 +01:00
Nicolas Werner
3c7c8d66b4
Use sha256 to encode the database name instead of just hex encoding it 2023-11-02 18:27:58 +01:00
Nicolas Werner
64860357c4
Fix gstreamer element names 2023-11-02 00:38:13 +01:00
Nicolas Werner
457f42c9ca
Fix pending reply sizing 2023-11-01 22:28:58 +01:00
Nicolas Werner
bd1cadb6bb
Spaces are now bold 2023-11-01 21:44:21 +01:00
Nicolas Werner
8b39b65d43
Possibly fix pagination in search 2023-11-01 21:31:08 +01:00
Nicolas Werner
81cf29f924
Possibly fix crash when room is cleared on event delegate 2023-11-01 20:57:39 +01:00
Nicolas Werner
7982c2bd75
Fix trailing whitespace 2023-11-01 20:16:20 +01:00
Nicolas Werner
c2d50d52a4
Remove unused function 2023-11-01 16:39:47 +01:00
Nicolas Werner
aeda42111b
Throttle sync processing if the window is unfocused for a while 2023-11-01 16:15:46 +01:00
Nicolas Werner
7823aceb58
Save profile when explicitly specified
Not just when any setting is modified...

fixes #1563
2023-11-01 06:20:44 +01:00
Nicolas Werner
092b12361e
Downgrade self verification status logging to debug
fixes #1560
2023-11-01 06:13:24 +01:00
Nicolas Werner
d44f905801
Fix decrypt notification settings persistent under the wrong key
fixes #1561
2023-11-01 06:10:58 +01:00
Nicolas Werner
7824c77234
Cleanup headers a bit more 2023-10-31 18:47:58 +01:00
Nicolas Werner
4357c47ebe
A few more small speedups 2023-10-31 13:04:39 +01:00
Nicolas Werner
a524524a80
Try to fix notification in packaged app 2023-10-31 13:04:39 +01:00
Nicolas Werner
99a3e8bcf2
Speed up compilation a bit 2023-10-31 13:04:39 +01:00
Nicolas Werner
50bce25838
Fix a few conversions 2023-10-31 13:04:38 +01:00
Nicolas Werner
7c21c41638
fix room name calculation with 3 members
fixes #1598
2023-10-28 13:47:58 +02:00
DeepBlueV7.X
1512810303
Merge pull request #1539 from Nheko-Reborn/issue1410
Add report message functionality
2023-10-26 09:57:47 +02:00
Loren Burkholder
bb971b0575
Add report message functionality 2023-10-25 22:24:40 -04:00
Nicolas Werner
634a247b4c
Fix macos not supporting emplace of aggregates yet 2023-10-26 01:42:01 +02:00
DeepBlueV7.X
a583de297c
Merge pull request #1541 from NepNep21/ignore-users
Support (un)ignoring users (#546)
2023-10-25 23:37:10 +00:00
Nicolas Werner
805282e43a
Add missing include 2023-10-26 00:52:14 +02:00
Nicolas Werner
bbfbba30b0
Allow setting presence state again 2023-10-25 23:22:39 +02:00
Nicolas Werner
51976cf367
Fix linting 2023-10-25 19:41:53 +02:00
Nicolas Werner
465a67bfaf
Properly close cursors before commit and db deletion 2023-10-25 17:41:40 +02:00
mips64-el
caba669e88 Fix double free on commit database migration 2023-10-25 01:30:50 +02:00
NepNep21
0b28e7934d
Move dialog to settings page and add avatar image to delegate 2023-10-24 19:46:04 -03:00
Nicolas Werner
a0a49b6c2a
Cleanup ignore user functionality slightly 2023-10-24 01:12:01 +02:00
Nicolas Werner
fce026725e
Merge branch 'ignore-users' of github.com:NepNep21/nheko into ignore-users 2023-10-23 23:58:53 +02:00
Nicolas Werner
d45dc6c77b
Migrate olm sessions to be stored in one database instead of thousands 2023-10-23 01:40:10 +02:00
Nicolas Werner
724e38e673
hr tags are self closing 2023-10-22 01:02:29 +02:00