Compare commits

..

1 Commits

Author SHA1 Message Date
genofire fdf9687dc9 docs(gateway): add service discovery (XEP 0030) to README
continuous-integration/drone the build was successful Details
2021-09-17 19:51:04 +02:00
2 changed files with 19 additions and 1 deletions

View File

@ -113,7 +113,7 @@ func (s *XMPPService) message(msgHead stanza.Message, t xmlstream.TokenReadEncod
return nil
}
from := msgHead.From.String()
if settings := strings.Split(conn.Settings, ":"); !(len(settings) > 1 && settings[0] == from) {
if settings := strings.Split(conn.Settings, ":"); len(settings) > 1 && settings[0] == from {
log.WithField("from", from).Info("message not from gateway, that is no notification")
return nil
}

View File

@ -11,6 +11,24 @@ So the XMPP-Address could be readed by Application-Server, Application and Distr
The XMPP Component implements [XEP-0225](https://xmpp.org/extensions/xep-0225.html) it could be plugged in at every common server (like [ejabberd](https://docs.ejabberd.im/admin/configuration/listen/#ejabberd-service) or [Prosody](https://prosody.im/doc/components)) with an Secret and domain name.
## XMPP Specials
### Service Discovery XEP-0030
As Part of the XMPP-Component we implement the following result of an Service Discovery:
```xml
<iq type='result'
from='up.chat.sum7.eu'
id='iq-disco-request'>
<query xmlns='http://jabber.org/protocol/disco#info'>
<identity
category='pubsub'
type='push'
name='Unified Push over XMPP'/>
<feature var='unifiedpush.org'/>
</query>
</iq
```
## Install
How to configure this gateway take a look into the [config_example.toml](config_example.toml), we prefer it place it under `/etc/up-gateway.conf`