Commit Graph

247 Commits

Author SHA1 Message Date
milampi
1411b9cc8b
Add xml attribute support for XMLElement (#136)
* Save attributes of the xml element

* Update unittest to check xml attributes
2022-05-13 17:24:06 +09:00
Martin
99ddfc1aa4
Return all pubsub IQs. (#137)
* Return all pubsub IQs.

This makes other pubsub requests accessible via
client.Recv().

* Fix formatting (gofmt).
2022-04-10 14:46:12 +09:00
Martin
e773596ea0
Provide error replies for IQs. (#135)
This should fix #125.
2022-03-19 22:58:56 +09:00
Polynomdivision
912ba61489
Prevent crash in avatar code (#133)
* Prevent crash on empty urn:xmpp:avatar:* nodes

* Fix issue with errors

* Add a test for empty avatar pubsub items
2021-10-30 00:14:15 +09:00
Josh Martin
3871461df9
Update xmpp_information_query.go (#130)
Fix a typo in the code comments.
2021-07-23 11:55:38 +09:00
tytan652
db1339b3a5
Fix host with anonymous connection (#129) 2021-07-22 23:17:14 +09:00
marzzzello
b40e129499
use ServerName to verify tls hostname (#127) 2021-01-21 17:27:23 +09:00
Steven Santos Erenst
42ee290fc5
Add the ability to customize the connection timeout (#122)
Fixes #116
2021-01-21 17:26:29 +09:00
Steven Santos Erenst
da2b7586cd
Avoid creating copies of locks (#121)
tls.Config contains fields of type sync.Once and sync.RWMutex. My understanding
is that if the copy happens to occur while the lock is in a locked state, the
lock will remain locked indefinitely and cause a deadlock. Instead use
tls.Config.Clone() to create a shallow copy.

Also the lock copy made `go vet` upset:

$ go vet ./...
./xmpp.go:242:17: assignment copies lock value to newconfig: crypto/tls.Config contains sync.Once contains sync.Mutex
./xmpp.go:530:9: assignment copies lock value to *tc: crypto/tls.Config contains sync.Once contains sync.Mutex
2021-01-21 17:25:57 +09:00
Alexander
37fa6ef92f
Implement XEP-0084 (User Avatar) (#120)
* Implement XEP-0084 (User Avatar)

* Fix style with gofmt
2021-01-21 17:24:39 +09:00
Alexander
899ef71e80
Implement a bit of XEP-0060 (PubSub) (#119)
This squashed series of commits implements basic
PubSub functionality like requesting data or
subscribing to a PubSub node.
2020-03-09 18:10:41 +09:00
Qais Patankar
3e4868bd3e
Implement OOB in Send() and add SendOOB() function for messages without body (#117)
Co-authored-by: Qais Patankar <qaisjp@gmail.com>

Co-authored-by: ValdikSS <iam@valdikss.org.ru>
2020-03-09 18:10:06 +09:00
harald-mueller
a86b6abcb3 Proxy handling / additional send method (#95)
* respect enviroment var no_proxy

* add method to send IQ messages without <query> element

* check also for uppercase NO_PROXY  env

* Uppercase NO_PROXY takes precedence over no_proxy as in HTTP_PROXY

* add comments

* revert copyright to the original one
2020-01-29 00:58:07 +09:00
mattn
ac4c216a42
Merge pull request #108 from kjx98/master
implement DNS SRV lookup for NewClient method
2020-01-29 00:56:32 +09:00
mattn
6093f50721
Merge pull request #110 from eaglerayp/feature/noTLS
Fix client no StartTLS & server no required
2019-01-24 18:32:44 +09:00
rayshih
1f614e5b8d Fix client no StartTLS & server no required 2019-01-24 15:48:01 +08:00
Jesse Kuang
ef6a1a617c keep IQ struct unchange 2019-01-15 10:53:08 +08:00
Jesse Kuang
65fd08aee2 mv xmpp_get_info to other repo 2019-01-12 14:46:18 +08:00
Jesse Kuang
a79a0e59ef remove GNUmakefile .gitignore
mv new example.go to other repo
2019-01-11 23:22:15 +08:00
Jesse Kuang
5709ddefa8 move IQ stuff to xmpp_get_info and example 2019-01-11 11:20:54 +08:00
Jesse Kuang
51b558cd2c add urn:xmpp:time; now response jabber GetInfo 2019-01-10 23:36:50 +08:00
Jesse Kuang
66c008d798 add iq:version, iq:last 2019-01-10 22:53:01 +08:00
Jesse Kuang
224305b3ef test with local prosody without conferenc 2019-01-10 20:43:44 +08:00
Jesse Kuang
1e7b50b41c add conference support 2019-01-10 14:46:50 +08:00
Jesse Kuang
c18873b880 fix query roster
process subscription="remove" roster
improve roster process
2019-01-10 10:12:39 +08:00
Jesse Kuang
2c5079ea28 fix param of tlsconn.VerifyHostname 2019-01-09 15:35:32 +08:00
Jesse Kuang
113d9c0420 implement DNS SRV lookup 2019-01-09 13:52:43 +08:00
Yasuhiro Matsumoto
e543ad3fcd
go fmt 2018-05-05 20:33:05 +09:00
Richard Phillips
4fdbee9ac5
Add 'id' to outgoing message using cnonce 2018-05-05 20:32:25 +09:00
mattn
8a5843171f
Merge pull request #97 from frankbraun/debug
introduce DebugWriter
2018-04-23 11:14:11 +09:00
Frank Braun
04ea54f191 introduce DebugWriter
This allows to use a different writer than os.Stderr to write debugging
output to.
2018-04-22 21:35:30 +00:00
Harald Müller
7ec2b8b7de add comments 2018-01-31 17:36:30 +09:00
Harald Müller
43e817cebe Uppercase NO_PROXY takes precedence over no_proxy as in HTTP_PROXY 2018-01-31 17:36:28 +09:00
Harald Müller
66aade104d check also for uppercase NO_PROXY env 2018-01-31 17:36:26 +09:00
Harald Müller
2271ce0aec add method to send IQ messages without <query> element 2018-01-31 17:36:24 +09:00
Harald Müller
fda8e5cb42 respect enviroment var no_proxy 2018-01-31 17:36:22 +09:00
mattn
bd84bf7b04
Merge pull request #90 from WorksSystems/master
Add Subject and Thread for Chat
2018-01-31 10:27:03 +09:00
mattn
44c76a8761
Merge pull request #93 from sshikaree/master
Move to xml.Escape()
2017-11-13 08:53:31 +09:00
sshikaree
3e4f4a3a80 Move to xml.Escape() 2017-11-11 20:56:39 +03:00
mattn
d0cdb99fae
Merge pull request #92 from amia-as/fix/neglected-eof-error
Fix neglected io.EOF handling
2017-11-07 14:16:34 +09:00
Martin Hebnes Pedersen
127e75bc8b Fix neglected io.EOF handling
This was probably catched in most cases after commit 9dd92e1, but was
at best misleading as it suggested that the end of input stream signal
from xml.Decoder was intentionally ignored.

Ref mattn/go-xmpp#28
2017-11-03 13:12:33 +01:00
mattn
e69bd697cb Merge pull request #88 from i5heu/patch-1
Update README.md - Add a link to the Documentation
2017-09-14 15:18:50 +09:00
i5heu
2f138678c0 Update README.md 2017-09-13 22:09:24 +02:00
mattn
e015f92cdf Merge pull request #87 from cooox/master
Fix MUC NoHistory invalid XML
2017-09-11 16:18:41 +09:00
Dominik Pataky
fe382e4805 Reformat fix for MUC NoHistory 2017-09-11 09:13:11 +02:00
Dominik Pataky
7ec8e81ec3 Fix MUC NoHistory invalid XML 2017-09-10 13:15:16 +02:00
K.J. Kao
f3cf3c3b40 Add Subject and Thread for Chat 2017-06-13 18:51:37 +08:00
Yasuhiro Matsumoto
906d9d747d don't modify DefaultConfig 2017-04-23 19:07:54 +09:00
mattn
16b6a7bdba Merge pull request #84 from joyrex2001/master
Add SendKeepAlive method to send "whitespace keepalive"
2017-03-07 00:24:45 +09:00
Vincent van Dam
a74ec7bb2d Add SendKeepAlive method to send "whitespace keepalive" 2017-03-06 15:06:43 +01:00