Commit Graph

14333 Commits

Author SHA1 Message Date
André Apitzsch 15d834025c use 'reverse DNS' convention for desktop and icon files
see https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s02.html
2017-04-18 21:19:15 +02:00
Philipp Hörist 86e29fb7f4 LegacyArchiving Event does not have a type 2017-04-18 18:58:06 +02:00
Philipp Hörist d7a6b6ab0b Register new MAM Events 2017-04-18 18:56:57 +02:00
Philipp Hörist 09512065d4 Fix wrong inclusion check 2017-04-18 18:26:06 +02:00
Philipp Hörist b42c21d3e0 Use new MAM Events and use chosen MAM namespace 2017-04-18 17:52:17 +02:00
Philipp Hörist 6b75f4ab35 Choose MAM namespace and save it 2017-04-18 17:50:15 +02:00
Philipp Hörist f8a028b553 Add/Modify Events to handle all MAM namespaces 2017-04-18 17:48:58 +02:00
Philipp Hörist 1d2320b0bb Add aesgcm to valid uri schemes 2017-04-15 12:02:44 +02:00
Philipp Hörist a1565040bd Merge branch 'muc-chatstate' into 'master'
Implement chatstate in MUC, as defined in XEP-0085 §5.5

See merge request !11
2017-04-14 18:39:08 +02:00
Emmanuel Gil Peyrot f6739730af Implement chatstate in MUC, as defined in XEP-0085 §5.5. 2017-04-14 16:58:04 +01:00
Philipp Hörist 78b562f7a5 Make PGP encoding configurable
python-gnupg uses latin1 as default encoding because GPG itself uses
latin1 as default.
We should not override this default with getpreferredencoding, because
getpreferredencoding maybe returns something else than what GPG is configured
on that system.

Example: On Windows
GPG is run in default mode with 'latin1'
getpreferredencoding returns 'cp1252'

The approach would be now to default to latin1 as it is GPGs default.
And if the User sets a different ecoding for GPG he has to set it in
Gajim aswell.
2017-04-12 22:50:02 +02:00
Philipp Hörist a2785ba396 Add version check for python-gnupg 2017-04-12 22:39:55 +02:00
Philipp Hörist a51ea32dc6 Refactor exception handling for logger
- Handle exceptions inside write() instead of propagating the
    exception
- Add error message to exception
- Add dispatch() method in logger
2017-04-12 22:30:55 +02:00
Philipp Hörist 54eb1cbbb8 Simplify log_message()
- Pass EventObj instead of variables
- decrease indent level
- check all conditions inside log_message() not before calling
- fixed bug where gc private messages where not logged with the correct jid
2017-04-12 22:30:28 +02:00
Philipp Hörist 8a789763a2 Merge branch 'master' into 'master'
Sending Message Refactoring

See merge request !80
2017-04-08 18:38:55 +02:00
Philipp Hörist bbb5c0f50d Simplify sending message
- Dont use callbacks, they have no gain in that situation and make the code hard to read
- pass the whole object to a new Event instead of many vars
2017-04-06 23:21:19 +02:00
Philipp Hörist 298ba4d939 Fix Last Message Correction for PGP messages 2017-04-04 23:21:11 +02:00
Philipp Hörist caba5e1723 Rename _on_continue_message()
_build_message_stanza is a better fitting name
2017-04-04 21:55:16 +02:00
Philipp Hörist 28a3a58ea9 Refactor encrypting PGP Message
- Add a _encrypt_message() and _finished_encrypt() method
- Handle Fallback body text in _on_continue_message() where we build the Stanza
2017-04-04 21:31:00 +02:00
Philipp Hörist d344c24a2a Pass EventObject around instead of many vars
This makes it much easier to read and modify
2017-04-04 21:30:48 +02:00
Philipp Hörist 1a5d6fbf30 Merge branch 'various-cleanups' into 'master'
Various small cleanups, with focus on logger and history window

See merge request !77
2017-03-31 16:44:32 +02:00
Markus Böhme 21d15dec29 Use the same named tuple for related methods for conversation loading
Both methods get_conversation_for_date and search_log in the logger
module are related to the loading of conversations and both return a
list of messages from the log. Therefore, it makes sense that both of
them have the same return type.

Remove the named tuple type specific to search_log and convert the
method to return tuples of type Message instead. As a side effect of
this change, search_log now also returns values from the additional_data
column in the log database.
2017-03-30 22:19:40 +02:00
Markus Böhme e735bfe7ab Make conversation loading in the history window use named tuples
The logger method get_conversation_for_date has previously been
converted to return a list of named tuples. Now pass these tuples on to
the method that actually inserts the conversation's messages into the
textbuffer. Also rename two related methods in the history window:
  -  _add_lines_for_date => _load_conversation
  -  _add_new_line => _add_message
2017-03-30 21:57:44 +02:00
Markus Böhme 65e926c181 Convert get_conversation_for_date to return named tuples
The get_conversation_for_date method in the logger module returns a
list of bare tuples. Knowledge of how to pack and unpack the many
individual components of the tuples is split between the caller and
the callee, making the method hard to maintain and ugly to use.
Therefore, convert the method to return named tuple instead.
2017-03-30 21:24:31 +02:00
Markus Böhme 08f4e17158 Rename method get_search_results_for_query to search_log 2017-03-30 21:23:03 +02:00
Markus Böhme d612e80a47 Convert get_search_results_for_query to return named tuples
The get_search_results_for_query method in the logger module returns a
list of bare tuples. Knowledge of how to pack and unpack the many
indidual components of the tuples is scattered across both the callers
and the callee, making the method hard to maintain and ugly to use.
Therefore, convert the method to return named tuples instead.
2017-03-30 21:23:03 +02:00
Philipp Hörist 2f1cad1c81 Merge branch 'allow-ibb-to-bare-jid' into 'master'
Allow IBB FT to bare JIDs again

Closes #8581

See merge request !71
2017-03-29 15:29:08 +02:00
Markus Böhme 167cf02afd Fix typo across codebase (change "tupple" to "tuple") 2017-03-29 10:56:31 +02:00
Markus Böhme 8df8486def Add @unique decorator to all enumerations
Currently, there are no enumerations using the enum module which reuse
values/need aliases. Add the @unique decorator to all enum classes as a
safety net for future modifications.
2017-03-29 10:56:31 +02:00
Stephen Paul Weber c110d8af60 Allow IBB FT to bare JIDs again
Currently works on released gajim, but not on nightly.

This explicit check for resource in the to-jid just returns if there is no
resource. It doesn't even cancel the file transfer or anything, it just
stops... which looks to the user like a file transfer hang.  Removing
the check makes Gajim work as expected.

Closes #8581
2017-03-28 19:11:18 -05:00
Philipp Hörist 5cc92efcb6 Drop messages from invalid JIDs silently 2017-03-27 20:35:14 +02:00
Philipp Hörist f11135877c Update Makefile.am 2017-03-27 09:53:16 +02:00
Philipp Hörist 7d204b37c9 Add extension point for hyperlink handling 2017-03-26 21:06:00 +02:00
Philipp Hörist 6b34ea957e Merge branch 'fix-additional_data-loading' into 'master'
Fix loading of additional_data column from log database

See merge request !72
2017-03-25 22:19:29 +01:00
Markus Böhme d9ab39b03f Fix loading of additional_data column from log database
Currently, the additional_data column is not correctly loaded from the
log database in the logger module's methods get_last_conversation_lines
and get_conversation_for_date. While the JSON data in the column is
parsed, the parsed value is not saved, because the code assumes that
changes to a loop variable are reflected in the list that is iterated
over. Instead, the unparsed JSON string is returned. Fix this by building
a separate list with the JSON string replaced by the parsed JSON object.
2017-03-25 18:58:35 +01:00
Philipp Hörist fbb19c5c50 Merge branch 'issue-8548-master' into 'master'
Fix issue #8548 on master: Do not close chat window on ESC key when roster filtering is active

Closes #8548

See merge request !74
2017-03-25 17:23:51 +01:00
Markus Böhme c8e990f85e Do not close chat window on ESC key when roster filtering is active
When the roster window active it can be filtered by starting to type.
If the window behavior "single window for everything" is selected,
trying to abort the filtering by pressing the ESC key also closes a chat
window. Fix this behavior by stopping event propagation in case the ESC
key is pressed while roster filtering is active.

Fixes issue #8548.
2017-03-25 14:24:30 +01:00
Philipp Hörist ba0408855c Fix regression from ad9370af 2017-03-24 23:35:08 +01:00
Philipp Hörist 49a5bb631c Merge branch 'master' into 'master'
Fix Privacy Lists

Closes #8476

See merge request !68
2017-03-14 22:39:42 +01:00
Philipp Hörist 1e33af7053 Fix KeyError when privacy list is received 2017-03-14 22:32:28 +01:00
Philipp Hörist a0a036f3eb Decline active list when going visible
Declining the active list will switch us to the default list
2017-03-14 22:32:05 +01:00
Philipp Hörist 2c23b36ac3 Remove redundant method 2017-03-14 22:31:43 +01:00
Philipp Hörist 9f5c13b5bb Dont set default list active on block
There could be another list active (eg. invisible)
If we block someone while invisible, setting the default list
active would make us visible again
2017-03-14 22:31:23 +01:00
Philipp Hörist 25b933e294 Dont try to set empty privacy default list
This will result in a conflict stanza because an active
default list cant be deleted

Decline the use of default list first, then delete the list
2017-03-14 22:31:07 +01:00
Philipp Hörist 63335357be Use push event to query privacy list after edit 2017-03-14 22:30:52 +01:00
Philipp Hörist 18e29ebc55 Add blocked contacts always to the default list 2017-03-14 22:30:16 +01:00
Philipp Hörist 5377fc82f7 Dont block contacts only partially
This is needed for better interop with XEP-0191.
The Server doesnt deliver a partial blocked contact as blocked
to a XEP-0191 Client.
2017-03-14 22:29:50 +01:00
Philipp Hörist 4966b4bf06 Remove notifications on receiving own sent carbon copies
Notifications for a JID are removed when we see activity
in the form of a sent carbon copie from one of our other devices.

If we receive such carbon copies we can conclude that the message
we received earlier was answered from one of our other devices.
2017-03-14 22:17:48 +01:00
Philipp Hörist 142f2214ea Dont notify on own sent carbon copies 2017-03-14 22:17:16 +01:00
Philipp Hörist 69022ab100 Dont treat MAM results as unread messages
Fixes #8544
2017-03-13 23:21:33 +01:00