Commit Graph

1324 Commits

Author SHA1 Message Date
Magnus Henoch a9238d2b04 Add test for jabber-disco hashing
Use example from XEP-0115.
2015-03-05 01:37:31 +00:00
Magnus Henoch 255f6804af Don't use `features' as a variable
This is already a global variable.  If a module is loaded, it might be
added to our temporary variable instead of the global one.
2015-03-05 01:34:08 +00:00
Adam Sjøgren cc8d30f7e1 Scale avatars if width/height is above a value.
If ImageMagick support is available.
2015-03-04 23:34:27 +00:00
Magnus Henoch d2b369ea01 Fix capabilities hash for Emacs 23
Emacs 23 doesn't have the function secure-hash.  Fall back to the sha1
function.

Thanks to Andres Ramirez Ramos for reporting this bug.
2015-03-04 23:34:27 +00:00
Magnus Henoch 1a46db7f4b Remove unused function
The flet-bound function nonempty is not used anymore.
2015-02-11 21:30:58 +00:00
Magnus Henoch 5d5528b993 Use let instead of labels
In recent Emacs versions, `labels' only provides lexical binding if the
variable lexical-binding is set to t.  Avoid the problem by assigning
the functions to simple variables and passing them to jabber-send-iq.
2015-02-11 21:28:37 +00:00
Magnus Henoch 11f665108d Use contact hint in jabber-chat-with
When asking for account, default to an account that has the provided JID
in its roster, if any.
2015-02-09 10:29:39 +00:00
Magnus Henoch a7ca3f0efa Add contact-hint optional argument to jabber-read-account
If specified, default to an account that has the given JID in its
roster.
2015-02-09 10:28:55 +00:00
Magnus Henoch e2494578ff Merge pull request #4 from Flowdalic/xmpp
Replace jabber(.org) which xmpp(.org)
2015-01-27 15:45:09 +00:00
Florian Schmaus 783dbeeaa2 Replace jabber(.org) which xmpp(.org)
where appropriate. There are still some places left where this could be
done, mostly UI strings where 'Jabber' could be replaced with
'XMPP (Jabber)'.
2015-01-27 16:41:50 +01:00
Magnus Henoch 4d9d890808 Forgot to update error message 2014-12-24 00:24:38 +00:00
Magnus Henoch 3f0c7c842f Handle server not offering session establishment
Session establishment was removed in RFCs 6120 and 6121.  Some servers
still offer it for backwards compatibility, but some don't.  Let's be
compatible with the latter.
2014-12-24 00:15:50 +00:00
Magnus Henoch dd30666bb5 Clarify docstring for fsm-debug-output
Explicitly refer to the variable, not the function provided by distel.
2014-11-21 21:26:12 +00:00
Magnus Henoch 262602e1b7 Allow inhibiting history entries for incoming messages
New variable `jabber-history-inhibit-received-message-functions'
can contain a list of functions.  If any of them returns non-nil, the
given incoming message is not included in the message history.
2014-10-31 18:55:56 +00:00
Magnus Henoch 4891befb7d Display nickname for contacts added to / removed from roster 2014-09-30 20:08:32 +01:00
Magnus Henoch 2ada81d866 Fix error responses to IQs without 'from' or 'id' attributes
If an incoming IQ had no 'from' attribute, and we would try to send an
error response to it, then the response actually sent would have
to='nil', as jabber-sexp2xml converts the 'nil' symbol to an attribute
value, but the XML console would fail to display the response.  Avoid
this by omitting the 'to' attribute in this case.

If the incoming IQ had no 'id' attribute, the same would happen: the
response sent on the wire would have id='nil', and the console would
fail to print it.  Section 8.3.1 of RFC 6120 says that the id attribute
of the response should be empty if the id attribute in the request was
absent, so let's do that here.
2014-09-23 23:35:28 +01:00
Magnus Henoch 7df437d1d8 Support "instant configuration" of MUC rooms 2014-08-29 10:40:30 +01:00
Magnus Henoch 662442143d Add link to room configuration if room is locked 2014-08-29 10:33:02 +01:00
Magnus Henoch e1c008cfb9 Compare nickname as well to find MUC self-presence
Not all MUC servers send 110 status codes.
2014-08-27 10:36:58 +01:00
Adam Sjøgren 0951030fa4 Use avatar from cache in notifications.el notifications
It seems that (get jid 'avatar) has started returning something
different than previously (a binary blob, instead of a plist).
2014-08-14 10:10:40 +01:00
Magnus Henoch 090c983aa3 Require goto-addr before calling goto-address-fontify
goto-address is autoloaded, but goto-address-fontify is not.
2014-08-12 22:17:53 +01:00
Magnus Henoch 6113c37123 Be more clever about identifying self-presence for MUC
Presence stanzas that concern us have status code 110.  This is
particularly important to notice when the server changes our nick for
us (status code 210).
2014-08-11 10:28:44 +01:00
Magnus Henoch 4229a1c8f4 Note if newly created MUC room is locked to others 2014-08-11 10:09:26 +01:00
Magnus Henoch 2303708402 Prepare to observe more than one status code in MUC presence 2014-08-11 10:00:38 +01:00
Magnus Henoch d374ff85ba Clear MUC data on disconnection
Avoid "phantom" participants when we reconnect and rejoin an MUC room.
2014-08-11 09:49:53 +01:00
Magnus Henoch 4b9c46232e Fix prompt and /me messages for private MUC messages
Previously these would be printed with the group's JID.  Now they use
the nick of the person you're chatting with instead.
2014-08-08 18:14:33 +01:00
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