221 Commits

Author SHA1 Message Date
Sergei
6c0bb895d9 Add config for glangci-lint, lint, handle "wire" errors fo auth procedure 2023-09-24 14:12:17 -07:00
Sergei
af169899cd Implement IQ responses Service Unavailable and Feature not Implemented 2023-08-18 13:31:49 -07:00
Sergei
3d611c2991 Properly pass errors in xmpp_pubsub.go 2023-08-18 13:29:48 -07:00
Sergei
2696ef2a9d Implement IQ responses to version, last activity, client time
* Implement IqVersionResponse(), XEP-0092
* Implement JabberIqLastResponse(), XEP-0012
* Implement UrnXmppTimeResponse(), XEP-0202
* Fix function descriptions
2023-08-18 13:28:00 -07:00
Sergei
d1f8a0defa Implement ping response according to xep-0199 2023-08-18 13:21:57 -07:00
Sergei
84bd84a051 Fix field name in Presence struct 2023-07-29 22:39:38 -07:00
Sergei
a21cf6d866 Extend Presence struct with real jid, affiliation and role info
This enables client to get full info about jids from MUCs presence
notifications, if this feature enabled in MUC
2023-07-23 15:13:44 -07:00
Sergei
b88ebc5f25 Update README.md, LICENSE, clean up
* Add missing persons who took part in developing of this lib in the the past
* Update README.md with a bits of info
* Remove settngs for travis ci since i don't use it anyway
2023-07-23 15:01:27 -07:00
eleksir
e096bfe29f Do not send node attribute in query tag in DiscoInfo() 2023-06-24 16:44:33 +03:00
eleksir
5a1c0b9e09 Extend DiscoResult type with ID, From and To fields 2023-06-24 15:45:21 +03:00
eleksir
66f98df60e Add DiscoverInfo() as thin wrapper around RawInformation() 2023-06-24 13:44:19 +03:00
eleksir
c6c2a88f51 Merge branch 'extend_SendPresence' 2023-06-18 16:15:44 +03:00
eleksir
f9fb151cfd add missing closing angle bracket 2023-06-18 16:13:52 +03:00
eleksir
49e9b353e8 Create go module out of this heap 2023-06-18 16:03:57 +03:00
eleksir
c721f798e4 Add IQTypeError 2023-06-18 15:34:07 +03:00
eleksir
b043074b77 Extend SendPresence() stub func to allow send useful statuses 2023-06-17 19:38:59 +03:00
Martin
bef3e549f7 add scram auth (#147)
* Fix syntax errors.

* gofmt

* Add SCRAM-SHA-1, SCRAM-SHA-256 and SCRAM-SHA-512 auth
2023-05-21 16:26:59 +09:00
Martin
9129a110df fix syntax errors (#145)
* Fix syntax errors.

* gofmt
2023-03-03 00:20:58 +09:00
PapaTutuWawa
d72a0f3154 Implement Disco queries against other entities (#124)
* Improve support for XEP-0030

This commit allows the user to query information about the server
or a node belonging to the server as per XEP-0030.

* Fix broken PubSub functionality
2023-03-02 13:23:29 +09:00
Martin
9fc0b1236c Print sent stanzas in debug mode. (#141)
* Print sent stanzas in debug mode.

* Remove unnecessary newline.
2023-03-02 13:22:44 +09:00
Martin
05cd75074a success msg (#144)
* Remove unnecessary newline.

* Make success content available.

Closes #142.
2023-03-02 13:20:49 +09:00
vakalmikov
369824c83a Update xmpp_subscription.go (#131)
https://www.rfc-editor.org/rfc/rfc6121.html#section-3.3.1
2023-03-02 10:32:52 +09:00
Martin
2eb234970c Remove unnecessary newline. (#140) 2022-07-13 07:17:24 +09:00
Martin
3b26f73300 [codespell] Fix typo. (#139) 2022-07-11 02:58:21 +09:00
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