Comments (10)
There is an option auto-authorize
that allows you to automatically authorise requests, see https://docs.tigase.net/tigase-server/master-snapshot/Administration_Guide/html/#autoSub (if this link doesn't work yet use this one and scroll a bit down.
However, if you manage roster externally then using Dynamic Rosters seems like a better idea.
from tigase-server.
Hmm I updated the configuration accordingly, but still I am getting a rooster with type="subscribe" in the Tigase UI client I am receiving the popup with question to accept the contact invitation.
from tigase-server.
This is because... there was an error in the documentation :-)
A while back we decided to split presence
plugin into two for efficiency: one responsible for handling subscriptions (presence-subscription
) and state (sharing presence information depending on the state: presence-state
). Old presence
plugin is still there but it's not enabled by default and if you used configuration from the documentation then 'auto-authorize' = 'true'
would not be enabled for correct, active plugin. You should use:
'sess-man' () {
'jabber:iq:roster' {
'auto-authorize' = 'true'
}
'presence-subscription' () {
'auto-authorize' = 'true'
}
}
I just check it and it works as expected:
U1 sends:
<presence type='subscribe' to='tigase2@atlantiscity'/>
U1 recives:
<iq type="set" to="tigase1@atlantiscity/Psi+/2" id="rsttig5">
<query xmlns="jabber:iq:roster" ver="15a2ec55b9eed0485d6da92f487d547a">
<item subscription="both" name="tigase2" jid="tigase2@atlantiscity"/>
</query>
</iq>
<presence from="tigase2@atlantiscity/Psi+" to="tigase1@atlantiscity">
<priority>55</priority>
<c xmlns="http://jabber.org/protocol/caps" node="http://psi-dev.googlecode.com/caps" ver="0.16" ext="cs e-time ep-notify-2 last-act mr sxe whiteboard"/>
</presence>
U2 recives:
<iq type="set" to="tigase2@atlantiscity/Psi+" id="rsttig4">
<query xmlns="jabber:iq:roster" ver="2c801cc687581d9263dea90e5b873cfd">
<item subscription="both" name="tigase1" jid="tigase1@atlantiscity"/>
</query>
</iq>
<presence from="tigase1@atlantiscity/Psi+/2" to="tigase2@atlantiscity">
<priority>64</priority>
<c xmlns="http://jabber.org/protocol/caps" node="http://psi-dev.googlecode.com/caps" ver="0.16" ext="cs e-time ep-notify-2 last-act mr sxe whiteboard"/>
</presence>
from tigase-server.
Hah :) thanks it worked. Should I raise a request to update documentation or that defect is enough ?
from tigase-server.
It was already fixed yesterday af8116e :-)
from tigase-server.
Hi again :)
It works fine when I am sending a stanza like you shown. However We decided to move the connecting the users to Server to be invoked at given scenarios.
In our BE we are trying to send the HTTP request with proper stanza:
So I am sending a request to:
POST /rest/stream/?api-key=our-api-key
with body:
<presence type="subscribe" xmlns="jabber:client" from="[email protected]" to="[email protected]" />
I am receiving 200, and the following happens:
toUser receives rooster with subscription like in your above message, but just after that he receives also rooster but subscription is set to from instead both:
<iq type="set" to="[email protected]" id="rsttig4">
<query xmlns="jabber:iq:roster">
<item subscription="from" name="fromUser" jid="[email protected]"/>
</query>
</iq>
About the fromUser he receives subscription="none"
...
It looks like a stanza I sent through REST is interpreted differently the one I send in the UI client. Should I know anything more about the REST call?
from tigase-server.
REST requests are not processed by fromUser
but are injected on the server-side as if they were received, ie. from the remote server, so fromUser
's roster is not aware of <presence/>
stanza sent by you using REST request and that stanza was delivered only to toUser
.
Due to thatfromUser
in roster has subscription set to none
and toUser
has in roster subsription set to from
.
from tigase-server.
Hmm so how can I manage it? Can I send second stanza setting to="fromUser" ? Do you have any hints?
from tigase-server.
Well, I think that sending presence stanzas to both users (so that both users would be aware of that) could be possible, but it is possible that it may not be possible if some presence sent from the account owner to the server would be required.
However, if both users accounts are on your own server you could check user-roster-management
and user-roster-management-ext
ad-hoc commands as they were designed for manipulation of users roster by the server on the user's behalf.
from tigase-server.
I checked these commands and although the response returns information that operation was successful there is no change in roster list... Fortunately if I run roster-fixer
command it seems to work. I will confirm that
from tigase-server.
Related Issues (20)
- Problems with Tigase after default initialization using Spark connection HOT 3
- is possibile to configure update-login-time-query? HOT 3
- maven build error HOT 7
- upgrade tigase from 7.1.5 to 8.2.2 HOT 29
- Secondary development online and offline messages HOT 6
- 用sprak连接tigase 8.2.2版本服务无法连接
- I tried to connect to tigase using smack and spark, but encountered the following error
- XEP-0485: PubSub Server Information support HOT 5
- Accound Disabled HOT 1
- Readme Quickstart Link broken HOT 1
- The BOSH port denies the connection HOT 5
- Can's access http://my-server-ip:8080/setup/ HOT 5
- 8.3.1 version HOT 1
- Inquiry About Licensing Options for Triplecyber HOT 2
- Cannot link to server HOT 1
- Tigase setup HOT 1
- Tigase.net blog section has a problem HOT 1
- www.tigase.org certificate + redirection without problem (no problem .net) HOT 1
- tigase.im sure.im jabber.today (www vhost problems) HOT 1
- The tigase service runs on an ARM linux server HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tigase-server.