Commit Graph

1448 Commits

Author SHA1 Message Date
Magnus Henoch aedd89f591 Chat prompts are fields; use for goto-address
Give all chat prompts a 'field property.  This changes behaviour,
hopefully to the better.  For example, C-a will now stop at the
beginning of the chat text; use C-b C-a at that point to go to the
beginning of the prompt.

Use the field property to improve jabber-chat-goto-address.  Previously,
we would try to make URLs clickable in the entire buffer, which besides
being wasteful would cease working once the buffer size was past
goto-address-fontify-maximum-size.
2014-08-08 09:33:38 +01:00
Magnus Henoch 3f168ae5c1 Don't print enter function in fsm debug output
Most of the time it's just compiled byte code anyway.
2014-07-10 18:42:28 +01:00
Adam Sjøgren 54907e7b11 Add type="chat" to chatstate notifications.
This improves interoperability with the client Profanity.

Comparing what Pidgin sends to what jabber.el did, the
difference was that Pidgin includes an id- and a type attribute.

Adding just the 'type' was enough to make Profanity recognize
the notifications sent by jabber.el.
2014-07-08 19:09:33 +01:00
Magnus Henoch 9f41bb1ed9 Warn about incorrect return values in fsm-send-sync
Previously we would crash in destructuring-bind, but this produces
rather unhelpful error messages.  Better log it in *fsm-debug*, pointing
to the source of the error.
2014-06-23 10:09:04 +01:00
Evgenii Terechkov 5453338333 Typo in filename fixed 2014-06-20 16:25:23 +08:00
Magnus Henoch 0df441a410 Fix closure data when retrying caps disco request
The closure data used in jabber-process-caps-modern was a three-element
list, while the one used in jabber-caps-try-next was a cons cell.  This
led to crashes in jabber-process-caps-info-error when there were more
than one contact with the same caps hash, all failing to respond.
2014-06-12 20:03:38 +01:00
Magnus Henoch 1ea60b5549 Initialise chat buffer only once
Don't clobber local variables.  This is needed for OTR.
2014-06-11 10:19:44 +01:00
Evgenii Terechkov 15ea34d2d8 Notifications alerts by Adam Sjøgren (asjo@koldfront.dk) 2014-06-07 19:43:56 +08:00
Magnus Henoch b1cb3f7181 Validate additional data from server in SASL authentication
Some SASL mechanisms, e.g. SCRAM-SHA-1, specify that the server should
send additional data along with the success response.  This data needs
to be validated by the client according to the SASL mechanism.
2014-05-23 09:53:43 +01:00
Magnus Henoch b7797f15bb Remove *jabber-authenticated* variable 2014-05-20 01:23:09 +01:00
Magnus Henoch c51557a2e7 Remove *jabber-connection* variable
Obsolete; use jabber-connections instead.
2014-05-20 01:21:07 +01:00
Magnus Henoch b76837bbb6 Remove *jabber-connected* variable
Obsolete; check whether jabber-connections is non-empty.
2014-05-20 01:18:54 +01:00
Magnus Henoch 3aabccc445 Remove "choked" check
This hasn't worked since the switch to multi-account, and apparently
hasn't been missed.
2014-05-20 01:15:28 +01:00
Magnus Henoch 4735e5c16d Fix hook call in jabber-keepalive-timeout
This should be run-hook-with-args, as we now pass an argument to the
jabber-lost-connection-hooks.
2014-05-12 21:44:32 +01:00
Magnus Henoch 7c8c72a17b Remember stream features after authentication
The features reported after authentication are the ones that may be
relevant for the established session.
2014-05-09 01:46:17 +01:00
Magnus Henoch 57594244d3 Reorganise Jabber menu
Put connection-related items first, including changing presence status.
Then come chat-related items, also adding "send subscription request".
2014-05-04 21:31:58 +01:00
Magnus Henoch 1d8ad84343 Add "Chat with" menu item 2014-05-04 01:13:33 +01:00
Magnus Henoch 637cbe4114 Radio buttons for status menu items 2014-05-04 01:10:32 +01:00
Magnus Henoch e726d72a61 Fix reporting of last timestamp
Add missing concat call.
2014-05-03 23:42:06 +01:00
Magnus Henoch 6c85b203ca Fix handling of stream errors
This was overlooked when introducing namespace handling: the namespace
prefix is no longer part of the element name, and the namespace can be
looked up through a fictitious xmlns attribute.
2014-05-03 22:52:18 +01:00
Magnus Henoch 5035b07384 Trim trailing newline from sentinel status messages 2014-05-03 22:51:46 +01:00
Magnus Henoch 00d0567960 Fix argument name
s/js/jc/.  This code happened to work anyway because of dynamic scoping.
2014-04-25 20:01:34 +01:00
Magnus Henoch 0782581252 Handle synchronous errors when connecting asynchronously
In jabber-network-connect-async, the call to make-network-process can
fail in certain cases without creating a connection and without
calling our sentinel function, in particular if DNS resolution fails,
and that error case was not updated for the new error reporting
solution.  This should now work properly.
2014-04-25 20:00:46 +01:00
Magnus Henoch 177ebecdaf Simplify "OS" version in jabber:iq:version
No need to include the entire result of emacs-version; something like
Emacs 24.3 (darwin) is enough.
2014-04-07 22:56:50 +01:00
Magnus Henoch 8429db9105 Don't report nil resource when connection lost
If we didn't get a resource before the connection was lost, don't put
"/nil" in the error message, e.g. "foo@example.com/nil: connection lost".
2014-04-07 22:02:19 +01:00
Magnus Henoch 0c813fc754 Improve error message for connection failure
Ensure that the final message, the one that stays in the echo area,
contains information about where we tried to connect to.  Also
accumulate error messages for all addresses we tried.
2014-04-07 21:59:57 +01:00
Magnus Henoch 2964c95b33 Fix call to jabber-activity-mode-line-update
It doesn't take any arguments anymore.
2014-02-25 09:31:44 +00:00
Magnus Henoch d28b65ee43 Fix "personal" face in jabber-activity
We can't distinguish "personal" vs "non-personal" in
jabber-activity-mode-line-update, since that loops over _all_ entries in
jabber-activity-jids each time, and thus the JIDs will be marked either
all personal or all non-personal.  Instead, let's keep a separate list,
jabber-activity-personal-jids, which is updated when activity is logged
for a JID.
2014-02-07 22:18:01 +00:00
Magnus Henoch 85b8468f5e Run jabber-post-connect-hooks even if initial roster retrieval fails 2014-01-22 21:27:50 +00:00
Magnus Henoch 0adb2a8b39 Handle urn:xmpp:delay (XEP-0203) for message timestamps
Also add `jabber-message-timestamp' in jabber-util, and simplify callers
of `jabber-x-delay'.
2014-01-22 10:14:41 +00:00
Magnus Henoch 818c52e7db Handle {frame,icon}-title-format being t in more cases
Need to check when deactivating jabber-activity-mode as well.
2014-01-10 15:10:45 +00:00
Magnus Henoch dd049eb4b5 Handle frame-title-format and icon-title-format being t
How has this not caused any problems before?..
2014-01-10 14:46:25 +00:00
Magnus Henoch 370a75193c Require cl in fsm.el
The `define-state-machine' macro uses `destructuring-bind' in its
expansion, and thus requires cl to be loaded while modules using
fsm.el are being compiled.  This should be the safest solution.
2014-01-10 09:34:39 +00:00
Evgenii Terechkov 823411b0a3 We need jabber-bookmarks for jabber-muc-autojoin
(via jabber-get-bookmarks and jabber-parse-conference-bookmark)
2014-01-09 23:01:25 +08:00
Magnus Henoch 482a940b26 Conditionally require sha1 in jabber-logon.el
I really don't understand why, but sometimes executing (require 'sha1)
from a byte-compiled file fails in Emacs 24, even though sha1 should be
provided automatically.  Let's hope this fixes the problem...
2014-01-09 01:37:07 +00:00
Magnus Henoch 8b9fb57145 Require cl when compiling jabber-rtt.el
This is needed for setf in Emacs 24.2 and earlier.
2014-01-09 01:36:15 +00:00
Magnus Henoch a4f4e0cab4 Merge remote-tracking branch 'refs/remotes/origin/master' 2013-11-30 12:25:35 +00:00
Magnus Henoch bb8eeb204f Use original JID when choosing which accounts to reconnect
Some Jabber servers (notably Facebook Chat) assign a different JID at
resource binding.  This used to confuse jabber-connect-all, such that it
would establish a new connection although the existing one is perfectly
healthy.

With this change, we save the JID that we originally connected with, and
use that to avoid duplicate connections.
2013-11-30 12:23:06 +00:00
Magnus Henoch 45ca35f79c Include JID in authentication failure message 2013-11-30 12:19:00 +00:00
Magnus Henoch bd57058747 Suppress superfluous <active/> chat state after sending message 2013-11-30 12:18:01 +00:00
Magnus Henoch a5b70ebd83 Suppress message when writing avatar to cache 2013-11-30 12:17:26 +00:00
Magnus Henoch 0eb94afdee Merge branch 'rtt' 2013-11-30 11:13:42 +00:00
Magnus Henoch f22c8656ea Ensure no duplicates in `jabber-advertised-features'
jabber-disco-advertise-features now checks whether the feature is
already listed, to avoid duplicate entries if a module is reloaded.
Duplicate entries can cause invalid Entity Capabilities entries.
2013-11-28 10:41:32 +00:00
Magnus Henoch efeab97bc1 Fix jabber-rtt autoloads
Use `eval-after-load' to change jabber-message-chain.
Autoload jabber-rtt-send-mode.
2013-11-27 10:30:56 +00:00
Magnus Henoch ebce8529c3 Add jabber-rtt to Makefile.am 2013-11-26 20:09:48 +00:00
Magnus Henoch 71d66edb4c Advertise RTT feature 2013-11-26 20:07:56 +00:00
Magnus Henoch cf89a44b68 Send Entity Capabilities in outgoing presence stanzas
Also changed the disco info feature "plugin" system - now a module that
wants to advertise a feature needs to call the function
`jabber-disco-advertise-feature'.  This ensures that caps are
recalculated as needed.
2013-11-26 01:18:06 +00:00
Magnus Henoch b0e517f270 Look for caps only on "available" presence 2013-11-26 01:13:44 +00:00
Magnus Henoch 3fc9296286 Merge jabber-newdisco into jabber-disco
The functionality is about to start overlapping.  Also, there wasn't
much sense in separating the two to begin with.
2013-11-25 23:36:12 +00:00
Magnus Henoch d11bda5e65 srv.el: call nslookup if UDP sockets not supported
dns.el requires support for UDP sockets, which is not present on
Windows.  Check whether UDP sockets are supported, and if not, parse
the output of nslookup.
2013-11-24 23:33:03 +00:00