Commit Graph

1448 Commits

Author SHA1 Message Date
Magnus Henoch 7fb313c259 Assume that password-cache.el is available
It was introduced in Emacs 23.1, which is our minimum requirement.

Remove conditional require of password.el, which used to be part of
Gnus.

Remove some fboundp calls.
2018-09-28 00:25:34 +01:00
Magnus Henoch 3de7fb40ab Merge pull request #9 from wasamasa/bugfix-menu-bar
Don't display menu bar indicator when installed
2017-04-23 13:13:53 +01:00
Magnus Henoch 98dc8e429b Extract jabber-xml-parse-next-stanza, and test it
Move the functionality of reading the next complete stanza into a
separate function, and add some test cases for it.  I'd like to get rid
of jabber-xml-skip-tag-forward at some point, so a good first step
towards that should be moving calls to it into a function that's easy to
test in isolation.
2016-01-24 13:52:22 +00:00
David Edmondson d4d7782741 jabber-xml-skip-tag-forward: improve the match regexp
Improvements to the scanning of XML tags and properties:
- Allow for white space after the parameter assignment sign (=).
- Don't allow a closing angle bracket (>) in parameter names.
- Skip trailing white space before looking for node termination (> or
  />).
- Match syntax table white space rather than enumerating the white space
  characters inline.
2016-01-23 16:23:03 +00:00
Magnus Henoch d5bfa1c62e Prefer fsm.el from ELPA
fsm.el is now in GNU ELPA, so let's use it if it's installed.  Also,
let the jabber package depend on it.

Keep a copy in jabber-fallback-lib directory, and use it if necessary.
Notably, this one is still compatible with Emacs 23.
2015-10-25 23:04:12 +00:00
Magnus Henoch 92106a961f FSMs are symbols, not proplists
Instead of FSMs being proplists, make them uninterned symbols, storing
their properties in the proplist slot.  This makes debugging much more
pleasant, as backtraces no longer display the entire state data multiple
times.
2015-10-25 22:47:02 +00:00
Magnus Henoch f2aaf7919d Check entered JID in jabber-connect
Without this check, we would connect as "nil@nil" when given empty
input for the JID.
2015-10-25 22:32:34 +00:00
Magnus Henoch 20663ad928 jabber-read-account: find live connection if possible
If the current buffer is associated with a dead connection, and there is
a live connection for the same bare JID, suggest that as the default
when prompting for which account to use.
2015-10-24 14:23:09 +01:00
Magnus Henoch a1835deb5c Clearer docstring for jabber-account-list 2015-07-13 09:09:33 +01:00
Magnus Henoch 1f858cc4f3 Don't signal error for chat states on dead connection
If there is a chat buffer with chat state notifications enabled, and the
connection being used has been lost, and the user has reconnected, and
started typing a message in the chat buffer, then we would try to send
the "typing" notification to the old dead connection, causing an error.
Avoid that by ignoring errors when sending notifications.
2015-06-27 18:06:23 +01:00
Magnus Henoch 23c46a69e1 Comment about srv--nslookup being Windows-specific 2015-06-27 18:05:45 +01:00
Magnus Henoch 4616a9ea91 jabber-encode-time should use its argument
Incidentally this hasn't mattered much, since most of the time we use it
to encode the current time anyway.
2015-06-27 18:04:31 +01:00
Magnus Henoch 2c6156a92c Fix time stamp retrieval in jabber-maybe-print-rare-time 2015-06-27 18:03:26 +01:00
Vasilij Schneidermann 562e503274 Don't display menu bar indicator when installed
See "(elisp) Coding Conventions".  Displaying a menu bar indicator if
the package was installed violates its first convention, asides from
that this check yields a truthy value in nearly all cases for people
using this package and therefore makes the other possible branch (is
this mode actually in use?) unused.
2015-05-07 11:03:41 +02:00
Magnus Henoch d9bbe9ba02 Don't look for query-dns
The function query-dns was renamed to dns-query before the Emacs 23
release, so there is no point in checking for it.
2015-03-31 22:34:07 +01:00
Magnus Henoch 787d3bdba7 Merge branch 'travis'
Compile and run tests automatically using Travis CI.
2015-03-05 10:50:48 +00:00
Magnus Henoch 5b65c87dc0 Don't assume jabber-account-list is bound in menu test
Just in case jabber-menu.el gets loaded without jabber.el or
jabber-autoloads.el.
2015-03-05 10:48:35 +00:00
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
Magnus Henoch 04a683d8b2 Use Automake 1.12 for Travis
"make check" doesn't work for Automake 1.11 or earlier.  Let's get a
newer version from a PPA.
2015-03-05 01:06:15 +00:00
Magnus Henoch fd80b92552 Use "make all check" for Travis
"make distcheck" requires TeX to be installed.  Let's not bother with
that.
2015-03-05 00:22:44 +00:00
Magnus Henoch 1f5bc9548e Need to install texinfo for Travis build to succeed 2015-03-05 00:11:16 +00:00
Magnus Henoch ad667999ee Call configure before make for Travis 2015-03-05 00:04:37 +00:00
Magnus Henoch e33a361a0f Need PPA to install Emacs 24 for Travis 2015-03-05 00:03:23 +00:00
Magnus Henoch bc212947ff Forgot to call autoreconf in .travis.yml 2015-03-05 00:01:22 +00:00
Magnus Henoch 38ee56392b Initial attempt at .travis.yml file
Adapted from https://github.com/abo-abo/tiny/blob/master/.travis.yml
2015-03-04 23:54:38 +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