Commit Graph

1448 Commits

Author SHA1 Message Date
Magnus Henoch 0b40a35043 Interpret incoming Entity Capabilities information (XEP-0115)
Look for capabilities information in incoming presence stanzas, retrieve
and verify disco info as needed, and plug into "normal" disco info
cache.
2013-11-23 23:31:10 +00:00
Magnus Henoch 74a98f3da6 Add jabber-rtt-send-mode, for sending Real Time Text events 2013-11-14 10:29:27 +00:00
Magnus Henoch d1732df73a Allow local hooks in jabber-chat-send-hooks 2013-11-14 10:29:27 +00:00
Magnus Henoch b5cb0d640e Fix error case in jabber-network-connect-async
The `connection-failed' function didn't have access to the variables
`target' and `remaining-targets', since they weren't lexically bound.
2013-11-12 10:26:13 +00:00
Magnus Henoch ccd6e4a596 XEP-0301: handle wait events 2013-11-05 23:42:57 +00:00
Magnus Henoch 2b55c4ebd0 Initial implementation of XEP-0301: In-Band Real Time Text
We can receive RTT events.  Wait events are not yet supported.
2013-11-05 09:48:20 +00:00
Magnus Henoch 0118504cf7 Catch errors in jabber-network-connect-async
DNS resolution errors from make-network-process are signalled
immediately, and not passed to the sentinel function.  Make sure that
we pass such errors along, so DNS errors aren't buried in the
*fsm-debug* buffer.
2013-11-03 19:12:16 +00:00
Magnus Henoch 8257959a06 Move history files into user-emacs-directory; default to per-contact history
Avoid breaking existing installations: if the global history file
already exists, use it; if the file/directory exists at the old
location, keep using it.
2013-10-18 21:32:01 +01:00
Magnus Henoch 7b4c286b5b Put avatar cache inside user-emacs-directory
Avoid polluting the user's home directory.
2013-10-18 20:16:51 +01:00
Magnus Henoch 993b1d7fbe Accept roster push from server JID
That is what Facebook does.
2013-09-06 10:46:51 +01:00
Magnus Henoch 350ef23aaa Don't require jabber-autoloads
Requiring jabber-autoloads from .emacs or a similar location is the
only supported way to load jabber.el, and it's also the way it gets
done when installing it as a package.
2013-08-27 10:09:56 +01:00
Magnus Henoch de83262ef8 Disable menu items as appropriate
If there are no connections, disable "Disconnect".
If there are no unread messages, disable "Next unread message".

This also ensures that the functions are loaded when the user might
try to activate the menu item.
2013-08-25 23:56:13 +01:00
Magnus Henoch bdae54a9c1 Reorder menu items; add separator
I put commands used to connect or while connected first, and
meta-commands (Customize and Help) in a second section.
2013-08-25 23:40:12 +01:00
Magnus Henoch a50b9f4902 Display menu by default if user installed the package
If the user installed the package into `package-user-dir' (as opposed
to a system-wide installation), it should be fine to display a Jabber
menu by default (which still can be turned off).
2013-08-25 15:49:06 +01:00
Magnus Henoch c335fc5b6a configure.ac to read version number from jabber-ourversion.el
...instead of the other way around.  This should make it possible to
build an ELPA-style package straight out of Git without running
autoconf, while we'd still be able to build tarballs through automake.
2013-07-27 20:00:50 +01:00
Magnus Henoch c38945c00e * jabber-keepalive.el (jabber-whitespace-ping-do): Ignore errors.
Sometimes this fails because the connection is closed.  Not sure
exactly why this happens, but the sentinel function should discover
the lost connection anyway, and having an error signalled in a timer
function doesn't help anyone.
2013-07-27 19:10:49 +01:00
Evgenii Terechkov c6c3af7f96 Fix for autoaway presense spamming. Thanks to lioka@altlinux for bugreport. 2013-07-10 23:04:50 +08:00
Magnus Henoch 05340c6ad7 Perform asynchronous connection if possible
When using native GnuTLS, we can now connect asynchronously, without
blocking Emacs if the remote server is slow to accept the connection
(or just times out).

Such connections are now identical to "network" (i.e. TLS-less)
connections, so I reverted jabber-starttls-connect to its previous
state: it is now used exclusively to connect using gnutls-cli external
processes.
2013-06-30 18:15:49 +01:00
Magnus Henoch 2999f58619 Version 0.8.92 2013-05-08 01:23:31 +01:00
Magnus Henoch b5fbebdc33 Remove most autoload cookies for defcustoms
They shouldn't be used just to have them listed in Customize; see
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14247 .  Besides, they
should be loaded by the requires in jabber.el anyway.

I left jabber-account-list and jabber-display-menu in for now, as they
are involved in a complicated dance regarding whether to display the
Jabber menu by default.  Need to solve this somehow and get rid of
those two autoload cookies as well.
2013-05-08 00:59:16 +01:00
Magnus Henoch 022ce34c46 If Emacs is running in Nextstep, we're a "GUI client" 2013-05-07 23:22:28 +01:00
Magnus Henoch 27ef29a7a2 Copy the string received from auth-source
The SASL library likes to erase the string, so make sure it doesn't
erase the cached string.
2013-04-11 13:50:04 +01:00
Evgenii Terechkov c98be9e194 assoc.el is absoleted since 24.3. Dont use it. 2013-04-07 10:34:56 +08:00
Magnus Henoch 52368dc342 Add .nosearch file in jabber-fallback-lib
This directory should never be added to any load path, since
jabber-muc-nick-coloring.el explicitly specifies the directory when
referencing hexrgb.  We wouldn't want to override any newer,
separately installed, hexrgb.el.

Adding this file should make life easier for emacsmirror.
2013-04-02 03:46:47 +01:00
Magnus Henoch 5c7d80f3aa Use auth-source to read passwords from .netrc/.authinfo files
Specify a line like:

machine example.com login username password s3cret port xmpp

(port should always be xmpp, regardless of the actual port)
2013-04-02 03:23:21 +01:00
Magnus Henoch 28e10a0f4e Update TLS/SSL section in README; rename to "Encrypted connections" 2013-03-09 16:13:59 +00:00
Magnus Henoch 2ac3550da7 Bump Automake required version to 1.11 for dist-xz option 2013-02-26 23:58:49 +00:00
Magnus Henoch 60ef84029b Improve treatment of hexrgb for ELPA package
Include hexrgb.el in jabber-fallback-lib subdirectory, in order not to
override any already installed version.
2013-02-26 10:48:07 +00:00
Magnus Henoch 523f5265a2 jabber-newdisco: Don't leave stray nulls in attribute lists
While jabber-sexp2xml has no problems with them, xml-print (used by
jabber-console) doesn't like them.  This causes truncated stanzas in
the XML log and error messages like these:

Couldn't write XML log: Wrong type argument: char-or-string-p, nil
2013-02-09 12:29:08 +00:00
Magnus Henoch ec3b2ee6be Don't require jabber-console in defcustom of jabber-debug-log-xml
That makes it impossible to run Emacs if jabber-debug-log-xml has been
customized, but jabber-console.el is not in the load path for some
reason.  Instead add an autoload cookie for jabber-process-console to
ensure that it gets loaded when needed.  Also remove duplicate
definition of jabber-buffer-connection.
2013-02-03 11:36:43 +00:00
Magnus Henoch 2171eb029a Remove sha1.el and hex-util.el; fix hexrgb compilation
sha1.el was included in Emacs 22.1 (released in 2007) and has since
been replaced by native functions; there's no point in us including it
anymore.  hex-util.el was only used by sha1.el.

Newer versions of Automake (since 1.13) treat Emacs Lisp files in
subdirectories differently, which causes problems with hexrgb.el.  I
made it copy hexrgb.el into the top directory, and it seems to work
for me.

Update README.  New minimum version is 23.1, which is when dns.el
started supporting SRV queries.  (Still need to update TLS section.)
2013-01-28 01:34:04 +00:00
Magnus Henoch d8f07cacc1 jabber-ping.el: require jabber-disco
Needed for jabber-advertised-features.
2013-01-28 01:27:22 +00:00
Magnus Henoch 506e6de9f4 Use LOG_COMPILER instead of TESTS_ENVIRONMENT in tests/Makefile.am
TESTS_ENVIRONMENT is no longer a safe place to put an Emacs
invocation.  However, LOG_COMPILER was introduced in Automake 1.12 for
such things.

Tested with Automake 1.13.1.
2013-01-28 01:26:49 +00:00
Magnus Henoch c03c1f8d89 jabber-ping.el: require jabber-menu
Needs jabber-jid-info-menu.
2013-01-28 00:59:51 +00:00
Magnus Henoch 422cf215b6 "Authentication succeeded" message to mention which account 2013-01-28 00:59:51 +00:00
Magnus Henoch c05eefdf5f Update docstring for how to hide offline contacts permanently 2013-01-28 00:59:51 +00:00
Magnus Henoch 58cc4ecc28 jabber-disconnect: Display "Already disconnected" if that is the case 2013-01-28 00:59:50 +00:00
Alex Ott 2810cac378 guard create-image with error handler 2012-12-08 00:56:44 +08:00
Evgenii Terechkov 3bf076485b Typo fixed. According to xep-0202 "query" from xep-0012 replaced by "time" 2012-09-30 17:16:44 +08:00
Evgenii Terechkov a7823c0e8b Merge branch 'upstream' into store-groups
# By Magnus Henoch (18) and others
# Via Magnus Henoch
* upstream: (31 commits)
  Ensure that jabber-bookmarks is loaded in jabber-jid-bookmarkname
  Fix :get function for jabber-roster-default-group-name
  If all accounts are already connected in jabber-connect-all, say so
  Make nick coloring work in Emacs24
  Don't display "added to roster" messages for initial roster population
  Don't add extra newline when using STARTTLS
  Fix reporting of STARTTLS negotiation errors
  Fix error handling for old-style SSL/TLS connections
  Support native GnuTLS for STARTTLS
  s/screen/tmux/ in jabber-tmux.el
  Mention tmux alerts in the documentation
  Add tmux alerts
  Fix build with automake > 1.11.4
  Avoid groupchat buffer on RET in roster if we're not 100% sure it's a groupchat (bug 3483380)
  Version 0.8.91
  * jabberd.el (jabberd-handle): Update for new namespace handling.
  Use namespace prefixes declared on stream root element
  jabber-core: Fix header parsing
  Fix :get function for jabber-roster-default-group-name
  Use xml-parse-region to parse stream header
  ...

Conflicts:
	jabber-roster.el
	jabber.texi
2012-09-29 22:46:50 +08:00
Magnus Henoch e940e2deaa Ensure that jabber-bookmarks is loaded in jabber-jid-bookmarkname 2012-07-27 09:05:40 +01:00
Magnus Henoch edf1ec5da1 Fix :get function for jabber-roster-default-group-name
Because of an improperly nested `if', it would sometimes return nil
instead of a string.
2012-07-27 09:05:40 +01:00
Magnus Henoch 32df62fd02 If all accounts are already connected in jabber-connect-all, say so 2012-07-27 09:05:39 +01:00
Evgenii Terechkov b0416214a3 Make nick coloring work in Emacs24 2012-06-15 01:15:38 +08:00
Magnus Henoch 6afec47075 Don't display "added to roster" messages for initial roster population
It's not really useful information, and it takes time to display all
those messages... We should be better off without this message.
2012-06-02 11:59:44 +01:00
Magnus Henoch c382ddead8 Don't add extra newline when using STARTTLS
Apparently sending an extra newline after each stanza was necessary
with the OpenSSL client, but it seems to be messing up native STARTTLS
negotiation more often than not (I suspect it's a race condition), and
removing it seems not to hurt when using STARTTLS with gnutls-cli.
2012-06-02 11:56:00 +01:00
Magnus Henoch 1dca591d17 Fix reporting of STARTTLS negotiation errors
jabber-starttls-process-input now signals an error on negotiation
failure, as gnutls-negotiate already does.  Catch errors in
jabber-core, and put them as disconnection reason in the state data,
to get fewer and less confusing messages in the echo area.
2012-05-19 15:01:05 +01:00
magnus.henoch@gmail.com 5c7c52b066 Fix error handling for old-style SSL/TLS connections
When connecting to a Jabber server over SSL/TLS without STARTTLS
(the legacy "port 5223" method), any connection error would
cause the state machine to be stuck in the :connecting state,
unable to go back or forward.  Fix this by catching and reporting
errors in jabber-ssl-connect.
2012-05-16 17:27:58 +01:00
Magnus Henoch f54c1b54b3 Support native GnuTLS for STARTTLS
Emacs 24 supports linking to the GnuTLS library.  Let's use it when
available.

Also add a customisable variable for ignoring invalid certificates.
We should now be validating certificates against the XMPP server name,
not the hostname from DNS SRV, so there should be less need for this
now, but there's always the occasional basement server with a
self-signed certificate...
2012-05-15 22:39:43 +01:00
Magnus Henoch c3c8963e89 s/screen/tmux/ in jabber-tmux.el
Too much copy & paste can be a bad thing...
2012-04-15 20:45:01 +01:00