Commit graph

434 commits

Author SHA1 Message Date
fiaxh d0488401ce Use WeakMap for message caching 2020-11-14 17:05:46 +01:00
fiaxh b8d216a057 Add a WeakMap implementation + tests 2020-11-14 17:00:09 +01:00
fiaxh 10adf716f3 Fix incoming muc voice request notification 2020-11-11 11:27:31 +01:00
fiaxh 1999c97bb9 Improve content_item db table index
fixes #923

Co-authored-by: eta <eta@theta.eu.org>
2020-11-05 17:11:46 +01:00
fiaxh 2e0357877c Fix some compiler warnings 2020-10-27 16:05:30 +01:00
fiaxh edbc8f794d Don't crash on MAM id-time hickup
fixes #886
2020-10-27 12:02:52 +01:00
fiaxh 5954f7764f Fix own message marker marking conversations as read 2020-10-15 19:52:30 +02:00
eta 9cc3382abe service/database: use WAL mode + safe PRAGMA synchronous setting
Setting PRAGMA synchronous = 0 is really unsafe, and leads to database
corruption (which I've personally experienced). This commit uses
SQLite's Write-Ahead Log (WAL) [1] instead, together with synchronous =
NORMAL. According to [1], this trades off performance for durability
(i.e. it's possible that some transactions may not have committed if the
power gets lost), but still guarantees that the database won't corrupt
itself.

Together, these changes should improve reliability whilst either
improving or having no effect on performance.

[1]: https://www.sqlite.org/wal.html
2020-10-06 18:05:25 +02:00
fiaxh 7b58c1596a Fix runtime critical 2020-09-19 11:16:22 +02:00
fiaxh 6325a98cff Fix runtime criticals related to jingle file transfer 2020-09-19 11:16:22 +02:00
Marvin W d32d1b91a1
Compatibility with Vala 0.50.0
Fixes #911
2020-09-17 18:48:30 +02:00
Marvin W a22146fd72
Display placeholder avatar while loading 2020-09-12 12:54:37 +02:00
fiaxh c01d09d519 Improve message resending 2020-09-10 19:35:05 +02:00
fiaxh b60e7da28a Fix message duplication in MUC PMs 2020-09-07 15:29:32 +02:00
fiaxh 2d31d9d470 Cleanup 2020-09-07 15:21:42 +02:00
fiaxh 49bcbdaa51 Fix initial file encryption displaying
fixes #831
2020-09-07 15:14:29 +02:00
fiaxh e327a88898 Don't clear MAM id times on stream negotiated 2020-09-02 16:21:00 +02:00
fiaxh e6a90fc25c Implement MUC self ping 2020-08-31 16:48:20 +02:00
fiaxh b104be4842 Don't create a second message object for each typing notification 2020-07-22 18:36:04 +02:00
fiaxh 7309c6f3ac Visually highlight pending messages, improve resending 2020-07-16 23:31:19 +02:00
fiaxh e159fd2492 Only query entity caps when we need them 2020-07-16 23:31:19 +02:00
fiaxh 74f7fa897f Add queue and resending to stream management 2020-07-15 18:12:19 +02:00
fiaxh 8e3462b1b7 Fix unread bubbles having wrong color on startup 2020-07-15 18:12:19 +02:00
codedust 86420fdef1 Show bubble containing the number of unread messages in the conversation list (#764)
Co-authored-by: codedust <codedust@users.noreply.github.com>
Co-authored-by: fiaxh <git@lightrise.org>
2020-07-06 21:52:33 +02:00
Marvin W 48964bc5cc
Don't strip() at XML layer 2020-06-28 11:53:43 +02:00
fiaxh 0b1fb30a83 fixup Fetch avatars only when they are used 2020-06-23 15:57:26 +02:00
fiaxh 6d41071da1 Recreate avatar database table, fixes unique constraint 2020-06-11 00:03:30 +02:00
fiaxh 0beb592c5a Use sqlite UPSERT 2020-06-10 23:40:00 +02:00
fiaxh 50c55c7f55 Fetch avatars only when they are used 2020-06-10 19:53:56 +02:00
fiaxh 40c66bc584 Fix runtime critical 2020-06-03 21:50:40 +02:00
fiaxh 8fe723bccb Fix cyclic references => let objects be freed 2020-06-03 21:50:40 +02:00
fiaxh a9e6a9c3d5 Code cleanup 2020-06-03 21:50:40 +02:00
fiaxh d01af5b520 Fix compiler warnings 2020-06-03 21:50:40 +02:00
fiaxh 71be2abb6a Store last read content item for conversations
fixes #495
2020-06-03 21:50:40 +02:00
fiaxh b5066e0e2f Check if server supports uid 2020-06-03 21:50:40 +02:00
fiaxh d39128ffd7 Store current resource for sent message (if server didn't give us the resource we asked for)
Some servers give out random resources. Then, we didn't deduplicate own messages afterwards because we saved the wrong resource.
2020-05-24 16:01:03 +02:00
fiaxh bbbd9eda00 Fix crash in clear_all_chat_states (it removed an entry from a HashMap while iterating over it) 2020-05-21 22:04:46 +02:00
fiaxh cd3a119eff Handle incoming own read marker in private MUCs 2020-04-28 23:56:53 +02:00
fiaxh af52c24df7 Fix nick change in MUC, update bookmark accordingly; remove unused code 2020-04-26 00:20:27 +02:00
fiaxh f8f305efe5 xmpp-vala: Use more async 2020-04-24 14:19:42 +02:00
fiaxh 1db94905ae Fix runtime critical from read marker sending (fixup 3a8fef7) 2020-04-24 14:18:24 +02:00
fiaxh e7bc68ad4d Handle entity hash in server features node, make ServiceDiscovery request_info/items async, add caching has_entity_feature 2020-04-24 14:18:24 +02:00
Anmol 2631a9bdba
voice handling in moderated groups (#788) 2020-04-22 20:04:03 +02:00
fiaxh 51a2372869 Add file upload preview
fixes #756
2020-04-22 15:44:12 +02:00
fiaxh 7c4260eed7 Remove features from service discovery module when detaching module from stream
fixes #179
fixes #812
2020-04-21 16:25:21 +02:00
fiaxh 3a8fef7b7b Improve message read markers for MUCs 2020-04-21 16:25:01 +02:00
kmq 2419bf3b15
Update last_activity before received_file signal to keep UI in sync (#811)
Fixes #791 where a signal to update the UI is sent to
late when sending files, resulting in an out of sync
conversations list.
2020-04-18 17:18:25 +02:00
fiaxh 13d3d2aca6 Handle unknown own MUC jid better 2020-04-14 16:33:53 +02:00
fiaxh 5b2683dfa5 Last message correction fixes 2020-04-06 15:33:43 +02:00
fiaxh d091a6c3cd Add keyboard shortcut (up key) to activate last message correction 2020-04-05 16:19:56 +02:00
fiaxh 871ff33ac7 Add support for last message correction 2020-04-03 22:49:59 +02:00
fiaxh 12cd56612d Store entity identity info, use it in conversation list tooltips 2020-03-29 20:24:39 +02:00
fiaxh 1016529c36 Visually mark OMEMO messages from a trusted device as trusted 2020-03-29 20:24:39 +02:00
fiaxh 2eb72d5dad Fix+optimize contact-to-avatar storage and loading 2020-03-10 23:53:11 +01:00
fiaxh 4a08c8061d Fix messages to self being duplicated
fixes #591
2020-03-09 13:37:11 +01:00
fiaxh ed6eda129e Update live whether encryption is possible in MUC (lock icon visible) 2020-03-08 22:21:09 +01:00
fiaxh 013b388896 Make message sending async and set unsent on error 2020-03-05 12:21:43 +01:00
fiaxh b8b3e1c6f5 Improve MUC message resending 2020-03-03 15:14:31 +01:00
fiaxh 420fcb909f Move widget insertion logic from ConversationTitlebar to controller 2020-02-22 03:00:55 +01:00
Alexander Krotov b9125b7e3e Enable secure_delete PRAGMA on SQLite databases (#370)
It is especially important for OMEMO database, as it stores *ephemeral* keys
2020-02-21 20:49:36 +01:00
fiaxh a81af020f3 Preserve unchanged conference data (name) in bookmarks
fixes #748
2020-02-20 17:15:51 +01:00
fiaxh 4c953b5882 Only distinguish between typing or not (incoming)
fixes #739
2020-02-20 17:14:37 +01:00
fiaxh ca264c42ad Correctly set direction in file transfers in MUCs 2020-02-20 16:54:35 +01:00
fiaxh e17c797afb Don't assume Jingle to be available in MUCs 2020-02-11 16:49:15 +01:00
fiaxh 143212b6c8 Don't process message markers on MUC messages 2020-01-27 17:32:02 +01:00
Marvin W 3b0a27e14b
Fix invalid header creation for date separators 2020-01-22 01:24:14 +01:00
Marvin W 8c5957537c
Fix some compiler warnings 2020-01-22 00:09:06 +01:00
fiaxh 4c3800c688 Deactivate MUC conversations with non-autojoin bookmarks 2020-01-17 20:48:29 +01:00
fiaxh 7f21f898e0 Fix ConversationRow closing if animations are disabled 2020-01-17 20:47:33 +01:00
Marvin W 3fc9bdab05
Correctly display names in groupchat pms
Also show "Me" when no local alias is set instead of JID
2020-01-09 14:28:08 +01:00
fiaxh b1bbb9f587 Fix auto-joining bookmark without nick 2020-01-08 19:29:22 +01:00
fiaxh bce709b794 Store MUC passwords in bookmark
fixes #470
2019-12-24 23:31:17 +01:00
fiaxh 33499d076d Only cache fully normalized Jids for reverse lookup 2019-12-24 03:14:11 +01:00
fiaxh f58119f25e Don't show own typing notifications (other devices)
fixes #669
2019-12-24 01:46:01 +01:00
Marvin W cf1c7d3af2
Display correct name on outgoing file transfers in groups
Fixes #248, #643
2019-12-23 23:13:27 +01:00
Marvin W a0a956ee08
Properly check Jids everywhere 2019-12-23 16:58:53 +01:00
fiaxh 1eb01251e8
Don't go through ConnectionManager for initial connection attempt 2019-12-23 16:49:56 +01:00
Marvin W 1bb75f40d2
Add timing to logs, fix issue of silently ignored I/O errors 2019-12-22 19:30:16 +01:00
fiaxh 2938c685a2 Trim ms from local_time when creating messages
Mss are striped when storing in db. Comparing messages with and without ms might lead to wrong orderings. Related: Message duplication in UI when scrolling up.
2019-12-19 15:27:08 +01:00
fiaxh c3532bdf31 Refactor MAM catchup. Fetch from latest to earliest message. 2019-12-18 20:35:04 +01:00
fiaxh 321c3529f3 Add (partial) support for unique stanza ids (XEP-0359) 2019-12-18 20:35:04 +01:00
Marvin W bd45fdf1e1
Add version and adjust some cmake 2019-12-18 00:51:49 +01:00
fiaxh 62be692c02 Fix chat marker sending 2019-12-16 17:13:59 +01:00
fiaxh 890b91ce4d Only send new room config if something was changed
fixes #675
2019-12-16 01:41:04 +01:00
fiaxh 1985fe1d7b Don't continue reading after stream was disconnected, make disconnecting async
fixes #636
2019-11-27 20:01:48 +01:00
fiaxh c4325473fb Don't require window object in notifications
fixes #658
2019-11-26 18:47:30 +01:00
fiaxh b03da2af60 Check window width and hight before (re)storing them 2019-11-26 18:37:23 +01:00
Wiktor Kwapisiewicz 687ec1a159 Add support for HTTP Upload headers
Some services use Authorization header [0] to pass upload credential
data. This avoids the token being exposed in server logs and is allowed
by XEP-0363 since version 0.5.0.

This change adds support for headers allowed in XEP-0363: Authorization,
Expires and Cookie.

[0]: https://xmpp.org/extensions/xep-0363.html#request
2019-11-19 21:24:28 +01:00
fiaxh 41ada4fcc8 Don't attempt DNS SRV lookups in connection fallback 2019-11-18 22:45:18 +01:00
fiaxh fcce176b91 Open new connection to send filled-in registration form
fixes #644
2019-11-18 17:02:59 +01:00
fiaxh 05561dd677 Parse presence delivery errors when joining MUC
fixes #224
2019-11-17 17:53:46 +01:00
fiaxh 8f0fe37402 Don't attempt jingle file transfers in MUCs 2019-11-17 17:33:24 +01:00
fiaxh c032ab00ec Don't send delivery recipts or chat states for own messages
fixes #631
2019-10-22 01:23:08 +02:00
Marvin W e330e60f83
Base avatars and names on conversation, not JID.
Fixes #598
2019-10-18 16:52:29 +02:00
Marvin W fcec78ce27
Use log during IBR 2019-10-18 15:03:09 +02:00
Marvin W 2da8fd6881
Fix critical warning in roster manager when account gets offline 2019-10-18 14:31:23 +02:00
Marvin W 7d561ddfab
Allow to run Dino as background service 2019-10-18 14:10:50 +02:00
fiaxh df3716622a Rework no-open-conversation placeholder 2019-10-01 17:03:24 +02:00
fiaxh 74c29d4df1 Add Bookmarks2 implementation, introduce bookmarks interfaces 2019-09-29 01:53:59 +02:00
fiaxh 1287135ebb Improve conversation unread status detection 2019-09-29 00:47:22 +02:00
Marvin W e899668213
Add JET support 2019-09-16 23:31:11 +02:00
fiaxh bd7fde99af fixup Fix some warnings 2019-09-10 19:36:11 +02:00
hrxi d5d305193c Fix some warnings
Instances of `RegexError` are just asserted as `assert_not_reached` as
they cannot really fail except for allocation failure if the given regex
is valid.
2019-09-10 19:36:11 +02:00
Randy Barlow 48c2e7afa4 Do not mark abstract class contstuctors public
Starting with Vala 0.45.1, it is an error to mark abstract class
constructors public[0,1]. This commit removes three such
declarations.

fixes #609

[0] https://gitlab.gnome.org/GNOME/vala/raw/master/NEWS
[1] https://gitlab.gnome.org/GNOME/vala/issues/766

Signed-off-by: Randy Barlow <randy@electronsweatshop.com>
2019-09-01 21:19:09 +02:00
fiaxh 016ab2c19b Fix message type of chat state notification
fixes #607
2019-08-30 17:11:20 +02:00
Marvin W 9f613d5812
Merge pull request #592 from hrxi/gsoc_1
Add SOCKS5 bytestreams and a couple of other fixes
2019-08-29 00:44:59 +02:00
fiaxh e52a4eacb2 Don't show conversations from account after it was disabled
fixes #277
2019-08-28 13:11:56 +02:00
fiaxh 130965f322 Add incoming mediated invitation support (#162)
Co-authored-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
2019-08-22 16:05:28 +02:00
fiaxh 0521afa3d8 Fix specified size for encrypted file uploads 2019-08-21 22:37:52 +02:00
hrxi 642dac9aa0 Add support for Jingle SOCKS5 bytestreams (XEP-0260) 2019-08-05 20:55:37 +02:00
hrxi 811408fcb5 Fix a warning 2019-08-05 17:17:17 +02:00
hrxi 308d71b703 Close files involved in file transfers explicitly 2019-08-05 17:17:17 +02:00
fiaxh 08a5088c16 Rework encryption enabling logic + UI 2019-08-02 19:20:04 +02:00
fiaxh 9ee9661bf3 Optimizations: Database indices, cache id-Jid instead of id-jid_string, join real_jid on get messages 2019-08-02 18:00:26 +02:00
fiaxh 1853ee8b4f Fix compilation with older valac versions 2019-07-18 03:20:40 +02:00
fiaxh f0abb8aaf9 Refactor file receive/send interfaces and UI 2019-07-18 02:03:42 +02:00
fiaxh 30353e92d6 Merge branch 'gsoc_0' of https://github.com/hrxi/dino into hrxi-gsoc_0 2019-07-16 21:15:47 +02:00
hrxi 4b6fe6bf7f Address pull requests comments, fix a few TODOs 2019-07-12 01:53:28 +02:00
Marvin W c32990dff1
Ensure avatars are not loaded multiple times 2019-07-09 15:25:40 +02:00
hrxi 82e7cf4447 Add file receiving via Jingle
This currently follows the same rules as HTTP file download for
accepting files.
2019-07-09 11:21:40 +02:00
hrxi 877c46628f Implement file sending via Jingle
This is still disabled by default until prioritization is implemented;
otherwise this could be preferred to HTTP uploads.

File sending only works via Jingle In-Band-Bytestreams right now, more
transports are going to be implemented.

To test this, uncomment the line with `JingleFileTransfer` in
libdino/src/application.vala.
2019-07-09 11:21:39 +02:00
fiaxh fa43581ad3 Fix runtime criticals 2019-06-22 00:56:50 +02:00
fiaxh 34f9677c4e
Merge pull request #570 from hrxi/pr_typos
Fix a couple of typos and one network typo
2019-06-06 15:33:35 +02:00
fiaxh 8120203d62 Don't set timeouts on registration connection attempts 2019-06-01 19:03:01 +02:00
fiaxh dd6c860aed Don't change type of a conversation 2019-06-01 18:55:04 +02:00
fiaxh 5456a85777 Remove invalid MUC avatars 2019-06-01 18:55:04 +02:00
hrxi c245f7e34a Fix a couple of typos and double imports 2019-06-01 17:13:33 +02:00
fiaxh 6a1f057de2 Fix date separators 2019-05-26 20:20:09 +02:00
fiaxh e1e36fc98e Fix notifications for servers without MAM using StreamFlag as availability indicator 2019-05-26 20:20:09 +02:00
fiaxh 03f25e1f87 Remove Message.stanza field 2019-05-26 20:20:09 +02:00
fiaxh 32687d731f Revert "Fix notifications for servers without MAM"
This reverts commit 80b946c85c.
2019-05-21 22:10:05 +02:00
fiaxh d3c6e5c62c Enable sending chat state notifications in private rooms 2019-05-16 11:12:14 -06:00
Rahix 7ff99104d2
Disable notification on file in "mention only" groupchat
Signed-off-by: Rahix <rahix@rahix.de>
2019-05-16 09:02:52 +02:00
Rahix 80b946c85c
Fix notifications for servers without MAM
This commit re-adds the change from 4ad07fe:

    Fix messages never being notified from servers without MAM (#432)

Signed-off-by: Rahix <rahix@rahix.de>
2019-05-16 09:02:37 +02:00
fiaxh 9d19cdbf4e Process read marker from other devices for MUCs to adjust read-up-to state 2019-05-11 20:01:20 +02:00
fiaxh 97c59cb8cd Fix compilation with older pixbuf vapi files 2019-04-27 23:05:27 +02:00
fiaxh b6799e59bb Remove avatars with missmatch between supposed and actual sha1 hash on load, make loading async 2019-04-24 23:44:00 +02:00
fiaxh cbe0ff2c1d Don't move opened conversation to the top of the list, scroll along with selected conversation
fixes #544
2019-04-24 23:44:00 +02:00
fiaxh a960740c3e Ensure image data is kept until avatars are written to file 2019-04-24 23:38:07 +02:00
fiaxh 67dbfdd0b0 Fix received mark for own OMEMO encrypted MUC messages 2019-03-16 01:13:49 +01:00
fiaxh 6f6e4b97cb Use glib log functions 2019-03-15 22:01:34 +01:00
fiaxh 952ac95484 Use regex literals, fixes some compiler warnings 2019-03-14 17:39:31 +01:00
fiaxh 73cb6eaa49 Remove Slack message handling 2019-02-17 17:18:34 +01:00
fiaxh d27fb963e7 Have ChatInteraction MessageListener (read-up-to) run only for non-empty messages 2019-02-17 17:18:34 +01:00
Thibaut Girka 6ffa82d622 Do not ignore encrypted messages without a body tag
Fixes #473
2019-02-17 16:44:17 +01:00
fiaxh 736522737f Make file read/write async 2019-02-14 00:04:01 +01:00
fiaxh d668e0158d Fix runtime criticals (and compiler warnings)
fixes #520
2019-02-13 16:14:16 +01:00
fiaxh 5a7ffbc187 Move app menu into window, make conversation details dialog directly accessible, no-CSD option for main window 2019-02-05 11:50:23 -06:00
fiaxh fc1a9a5712 Improve ping timeouts, add debug output for XmlErrors and ping timeouts 2019-01-02 15:59:56 +01:00
Daniel Gultsch d8e0ab406c display groups w/o name by list of members
For members-only, non-anonymous groups that do not have a name set we now
show an automatically generated name that is generated from the list of members
(offline, and online). Only the first name (before the first space) is used
to keep the generated name short.

The term *private room* is coined as a short hand for members only&non-anon group
chats.

This commit also uses the offline members list instead of the online member list
to generate avatar tiles (also only in members-only, non-anon groups.)
2018-12-28 13:42:58 +01:00