shuhaib864 / xmpphp

Automatically exported from code.google.com/p/xmpphp
0 stars 0 forks source link

autoSubscribe() set, but it's not authorizing my buddy request #89

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I have a bot that xmpphp is monitoring its account (in a similar way as
cli_longrun_example.php). I have $conn->autoSubscribe() set toward the top,
but when I try to add this bot to my Buddy list on my IM client, it doesn't
do anything and I don't see the bot's current presence status. My IM show
"Not Authorized". 

I am not sure if I am understanding what "autoSubscribe()" does, but how
can I make it automatically authorize requests?

Original issue reported on code.google.com by soichih on 22 Apr 2010 at 7:16

GoogleCodeExporter commented 8 years ago
im seeing the same thing here, just messing around and using prosody as the 
xmpp server... i can see the code that should allow the auth and it does call 
it, but not much else happens...

Original comment by takig...@gmail.com on 18 Jun 2010 at 5:15

GoogleCodeExporter commented 8 years ago
my problem was prosody... its not quite passing messages the way it should for 
some reason... if i logged out and back in with it, that solved my problem, but 
i switched over to ejabberd anyways.

Original comment by takig...@gmail.com on 19 Jun 2010 at 1:27

GoogleCodeExporter commented 8 years ago
$conn = new XMPPHP_XMPP(...);
    $conn->autoSubscribe(true);

        try {
            $conn->connect();

            $conn->processUntil('session_start');

            while(true)
            {

                $conn->presence();
                $conn->processUntil('presence');
                echo ".";
                sleep(3);
            }

        } catch(XMPPHP_Exception $e) {
            die($e->getMessage());
        }

This may help.

Original comment by bolsunov...@gmail.com on 21 Jul 2012 at 12:49