Commit Graph

66 Commits

Author SHA1 Message Date
Philipp Hörist e265514d88 Detect dependencys only on demand
This allows us to import the app module without triggering
dependency detection

Also add is_installed() for checking if a dependency is installed and
disable_dependency() in case we dont want to use a dependency
2018-04-24 19:36:33 +02:00
Philipp Hörist 986898f69d Dont check for OpenSSL we require it on install 2018-04-23 23:47:17 +02:00
Yann Leboulanger c2184aaf8c remove bookmark and close muc when destroying the room. Fixes #8862 2018-03-29 11:01:25 +02:00
Yann Leboulanger f52e8d889c don't traceback on account deletion. Fixes #8960 2018-03-28 11:36:14 +02:00
Philipp Hörist 0fb19c2b1c Show error message on account registration
Prefer the error message text over the error code
2018-03-24 17:55:32 +01:00
Philipp Hörist 4e1a9db6cc Remove conditional code for nbxmpp < 0.6.3 2018-03-24 00:19:27 +01:00
Philipp Hörist b3e6170e57 Remove cacert.pem
Dont ship cacerts, use certifi on Windows
2018-03-24 00:17:34 +01:00
Sebastian Wagner e740d12727 Defer txt record lookup until connection attempt
Don't try to resolve _xmppconnect records for servers before trying to connect.
Prevent warnings from gajim.c.resolver for accounts with "connect on startup" disabled.
2018-03-05 22:55:25 +01:00
Philipp Hörist c6e39309cf Use MessageSentEvent to print to ChatControl
Its later than StanzaMessageOutgoingEvent, this allows encryption
Plugins to not return the encrypted payload immediatly.
For example encrypting may take some time because a password is needed
or the load has to be encrypted in another Thread.
2018-02-26 20:49:01 +01:00
Philipp Hörist 1fbc6a2304 Tag MUC PMs
This gives the server the chance to react accordingly without applying
much logic.
Also it makes it easier for us to recognize MUC PMs in MAM querys
2018-02-21 23:09:30 +01:00
Philipp Hörist 36f23c9cf2 Update httpupload action on discovery 2018-01-27 10:55:25 +01:00
Bronko 3a3be94aa8 integrate httpupload plugin into gajim core
add new config option 'filetransfer_preference'
add drag and drop support for file upload
2018-01-22 17:29:27 +01:00
Philipp Hörist 32e873e6eb Add ALPN Support 2018-01-03 22:11:42 +01:00
Marc Schink 8e09fd9272 Add support for XEP-0368
- Use xmpps-client SRV records
 - Use separate host entry per connection type
 - Replace 'connection_types' with 'allow_plaintext_connection' option
2017-12-20 18:38:01 +01:00
Apromixately b8fe0e20c3 Remove incorrect assert
When a ping reply is received there is probably a connection. Anyway, the
last ping might have been lost and the ids might not match up.
2017-12-16 16:23:44 +01:00
Philipp Hörist f8ddefb6da Fix var reference 2017-12-10 22:56:20 +01:00
Philipp Hörist 7815ce19a5 Dont use callbacks when sending messages
Using a callback to display a sent message inside the ChatControl means
that all messages we send have to be issued from the GUI layer
(send_message()) if we want them to display in the ChatControl.

This replaces the callback and catches the stanza-message-outgoing event
after it was processed by the core.

This is easier to read/understand than dealing with callbacks and lets
the core issue messages without having to care if a ChatControl is open or not
2017-12-10 18:56:29 +01:00
Philipp Hörist 786ef96400 Port InformationEvent handling to new interface 2017-12-09 00:15:26 +01:00
Yann Leboulanger 086eeb3dc8 resolve TXT record only for non-zeroconf accounts. Fixes #8792 2017-12-03 14:55:41 +01:00
Yann Leboulanger 46711e1107 Merge branch 'XEP-156' into 'master'
implement XEP-0156

Closes #5795

See merge request gajim/gajim!154
2017-11-29 14:25:49 +01:00
Yann Leboulanger 149edfe3ef implement XEP-0156. Fixes #5795 2017-11-20 21:31:29 +01:00
Philipp Hörist 1c895e8983 Persist resource across sessions
This was somehow lost once we implemented random resource strings
Although its good that initally a random resource is chosen, it
still should persist across sessions.

This helps to kill zombie client connections on the server because
most servers kill the old session once a new with the same resource
connects

Also dont notify the user about resource conflicts if no custom
resource is set. We should not expect users to know about resources
and what they are used for as long as possible.
2017-11-20 18:10:51 +01:00
Philipp Hörist 95357361bf Save account_id in logs table 2017-11-19 19:36:25 +01:00
Philipp Hörist 536a504f69 Remove Support for mam:0 2017-11-19 19:36:25 +01:00
Philipp Hörist 75b1d54b4c Add MAM for MUCs 2017-11-19 19:36:20 +01:00
Philipp Hörist 8c8b491846 ServerInfo: Show if features are disabled by user
- Show new Symbol if a feature is available but not enabled
- Add this info to the tooltip
2017-11-06 23:04:49 +01:00
Philipp Hörist 970d6f8c3f New style for ChatControl
- Move ActionBar into HeaderMenu
- Make Design of ChatControl look cleaner
- Hide the Roster in Groupchats per default
- Add Button to hide/show Roster in Groupchats
- Move Groupchat topic into popover
- Display Avatars on the right side of the ChatControl and status on the
left
- Add a default Avatar for contacts that have none
2017-10-26 22:52:20 +02:00
Philipp Hörist 1c7369229e MUC: Save last message time after each message 2017-10-22 20:12:25 +02:00
Philipp Hörist f234722456 Correctly pass authentication mechs to nbxmpp 2017-10-16 17:04:35 +02:00
Philipp Hörist ed764789f1 Show blocked contacts as offline 2017-10-15 21:34:42 +02:00
Philipp Hörist 29cf416da4 Send Presence probe on unblock 2017-10-15 21:34:32 +02:00
Philipp Hörist 2446c7e3ed Refactor Blocking List
Fixes #8762
2017-10-15 18:03:41 +02:00
Philipp Hörist 2e9de7702f Remove discovery of generic pubsub support
We use PubSub only on our account jid, this use case is what PEP
was made for. If PEP is discovered we know that certain PubSub
features are supported, see: https://xmpp.org/extensions/xep-0163.html#defaults

The current check for <feature var='http://jabber.org/protocol/pubsub'/>
is pretty useless, as it just tells us that there is a PubSub implementation
but not much about the features. Only `publish` and `subscribe` are MUST
in XEP-0060 which is not enough for our needs.

If there is ever need to discover a generic PubSub implementation
that is not PEP we should check for all the PubSub features we need
instead of only for <feature var='http://jabber.org/protocol/pubsub'/>
2017-10-15 01:56:52 +02:00
Philipp Hörist 64d3bf63cf Discover PEP on the account jid
see: https://xmpp.org/extensions/xep-0163.html#support
2017-10-15 00:52:34 +02:00
Philipp Hörist fcf15fcaf2 Bookmarks: Remove invalid publish option 2017-10-14 00:13:19 +02:00
Philipp Hörist dd4a80054d Discover PublishOptions also if PubSub is not discovered
PEP supports a subset of PubSub and can also support publish options
2017-10-14 00:13:19 +02:00
Philipp Hörist ac281533f5 Get Pubsub bookmarks also if PEP is supported 2017-10-14 00:13:19 +02:00
Philipp Hörist e79af35e9c Refactor store_bookmarks()
- Add logging
- Move Node building code into own methods
2017-10-14 00:13:13 +02:00
Philipp Hörist a01cdbf271 Refactor Avatars
- Add support for Pubsub Avatars
- Dont poll for vCard Updates, only use XEP-0153
- Dont cache vCards
- Store the avatar SHA of roster contacts in the DB
- Store the current SHA of each contact in the Contacts Object
- Move some code into the ConnectionVcard Class
2017-10-08 11:26:28 +02:00
Philipp Hörist 69248b2fe7 Fix pylint/pep8 errors 2017-09-29 00:11:29 +02:00
Philipp Hörist 3e764c3d35 Fix some logging calls
- Add logging domain to some modules
- Log to module domain instead of generic 'gajim'
2017-09-26 07:14:01 +02:00
Yann Leboulanger a378152a9c Remove Gmail special options 2017-09-19 15:44:58 +02:00
Yann Leboulanger 152be4473b Fix some strings for a better translation 2017-09-19 12:45:02 +02:00
Philipp Hörist b93098a379 Dont use Resolver when using a proxy
This leaks the DNS request
2017-09-17 14:02:01 +02:00
Philipp Hörist 1a0b7ee163 Dont lose own JID from bind
_registered_name is None on a smacks resume.

Gajim creates on every connection attempt a new nbxmpp.NonBlockingClient
instance. This is why _registered_name is None when we go through a
smacks resume, because there is no bind event, and the new NonBlockingClient
instance has no knowledge of the previous successful bind.
2017-09-06 21:26:40 +02:00
Philipp Hörist 8bc2ab096e Add more log output in case we drop carbons 2017-09-03 22:35:56 +02:00
Yann Leboulanger ce719a8317 No need to have one sleepy instance per connection object 2017-08-22 21:55:18 +02:00
André Apitzsch 89c7eb6e6a Rename gajim.common.gajim to avoid name conflicts 2017-08-18 20:03:20 +02:00
André Apitzsch efec098aef Use absolute imports 2017-08-18 19:48:48 +02:00
Philipp Hörist a2e2fb2ed1 Remove useless code
Simplify whats left
2017-08-02 23:40:55 +02:00