Commit Graph

40 Commits

Author SHA1 Message Date
Martin Dosch
ce11b65376 Allow localpart as username
If username is not a JID assume it is the local part and append an @
and the server domain.
2020-06-06 12:06:55 +02:00
Martin Dosch
dd4b2a91d1 Look at ~/.config/go-sendxmpp/sendxmpprc for the config.
Also look up the config at ~/.config/go-sendxmpp/sendxmpprc
and prefer it over the legacy path used by perl sendxmpp
(~/.sendxmpprc).
2020-05-23 18:21:42 +02:00
Martin Dosch
ad499e4bc0 Use the library for sending oob message
instead of handcrafting the message
Why I didn't see this option in the first place?
2020-04-11 18:59:32 +02:00
Martin Dosch
828ba165e9 Move handrafting OOB messages in own function. 2020-04-11 16:44:20 +02:00
Martin Dosch
bb150b6954 Use string variables for handcrafted messages. 2020-04-10 11:19:16 +02:00
Martin Dosch
11883b8961 Don't allow usage of http upload and sending a message at the same time. 2020-04-09 17:01:48 +02:00
Martin Dosch
db2ccee50e Send http-upload in OOB message 2020-04-09 16:49:27 +02:00
Martin Dosch
2622081bad Use tlsConfig.ServerName as server for calling httpUpload
The server we connect to might be xmpp.example.org while we have to
disco example.org for user@example.org
2020-04-09 15:47:03 +02:00
Martin Dosch
9fd205f90f Add experimental http-upload 2020-04-09 14:58:03 +02:00
Martin Dosch
e674de5df1 Fix typos 2020-04-05 22:02:09 +02:00
Martin Dosch
21ed1c5ff6 User username instead of server to determine ServerName for TLS
certificate check.
2020-04-05 21:50:28 +02:00
Martin Dosch
f06dff7321 Add --no-tls-verify command line flag. 2020-04-05 21:49:17 +02:00
Martin Dosch
a81835b3d9 Change from MIT to BSD 2-Clause license. 2020-04-04 09:42:09 +02:00
Martin Dosch
55914460bd Revert "Remove MarshalJID function."
This reverts commit a631fa057b.
2020-04-04 09:40:24 +02:00
Martin Dosch
a631fa057b Remove MarshalJID function. 2020-04-03 18:12:58 +02:00
Martin Dosch
c36bd5cb40 Declare tlsConfig properly instead of using xmpp.DefaultConfig. 2020-04-03 14:35:03 +02:00
Martin Dosch
ee7bf1fb71 Instantly quit if it's not possible to read the config file. 2020-04-03 14:28:08 +02:00
Martin Dosch
bf4ec88e00 Update copyright notice. 2020-04-03 14:18:20 +02:00
Martin Dosch
0d55af6c0a Always try to close XMPP connection before quitting. 2020-04-03 14:14:48 +02:00
Martin Dosch
6907535153 Add ALPN support
This should make go-sendxmpp work on servers using ALPN e.g. when
using sslh on port 443 to use a httpd and XMPP over TLS on the
same port.
2020-04-02 19:35:12 +02:00
Martin Dosch
2283a54a33 [golangci-lint] Fixed some comparisons to bool and an ineffective err generation 2020-01-22 19:49:32 +01:00
Martin Dosch
330e15f532 Moved jid package into the main package. 2020-01-22 19:31:31 +01:00
Martin Dosch
ba73e67f88 Merge branch 'master' of https://salsa.debian.org/mdosch-guest/go-sendxmpp 2019-02-21 18:24:59 +01:00
Martin Dosch
359aa28d07 Removed check for file access rights on windows. 2019-02-21 18:20:54 +01:00
Martin Dosch
efc88c94f6 Removed unnecessary deferring of closing file. 2019-02-21 18:15:46 +01:00
Martin Dosch
f0ccc244b8 Moved manual account data override behind reading config. 2019-02-21 18:14:10 +01:00
Martin Dosch
f4357fc51b Changed output for wrong file permissions to also mention 400 as valid access rights. 2019-02-21 13:00:43 +00:00
Martin Dosch
f61c0edda0 Skipped reading of config file if all connection parameters are specified via command line arguments. 2019-02-20 22:23:29 +01:00
Martin Dosch
c845972b1f Added waiting time before closing connection. 2019-02-20 21:22:31 +01:00
Martin Dosch
52f7f534fb [go-lint]: error strings should not be capitalized or end with punctuation or a newline 2019-02-13 18:31:58 +01:00
Martin Dosch
6c29ed7fcd Added closing of XMPP connection 2019-02-13 18:31:14 +01:00
Martin Dosch
cbf5704988 Added linebreaks for long lines. 2018-08-20 13:24:48 +02:00
Martin Dosch
17a4d864bb Moved marshalJid in an own package and mentioned licenses of external packages. 2018-08-15 20:20:02 +02:00
Martin Dosch
6376922712 Removed mucStatus as the return value is not the status code (see https://github.com/mattn/go-xmpp/issues/103 ). 2018-08-13 20:12:06 +02:00
Martin Dosch
d5bd444cd1 Added flag '-i' which makes go-sendxmpp work with 'tail -f'. 2018-08-10 15:03:04 +02:00
Martin Dosch
74f97f6fec Added functionality to read message from an input file (, ) 2018-08-10 13:12:21 +02:00
Martin Dosch
394743ee96 Sendxmpp compatibility 2018-08-10 10:41:13 +00:00
Martin Dosch
b8328a0e3b Sendxmpp compatibility 2018-08-10 10:14:21 +00:00
mdosch
fcfc1085c5 Added license header. 2018-08-04 12:19:32 +02:00
Martin Dosch
1fa114b626 Initial commit 2018-08-04 12:16:28 +02:00