
Quote from Phil78 on March 9, 2022, 1:15 pmGood morning @Luishp
I try to use 2 channels inside my chat app but I have a problem with neoPusherSend for the 2nd channel, I do not receive the message. I wonder if there is a conflict with neo functions and the configuration of index.php ?
?php
header("Access-Control-Allow-Origin: *");
require __DIR__ . '/vendor/autoload.php';$options = array(
'cluster' => 'eu',
'useTLS' => true
);
$pusher = new Pusher\Pusher(
'key1',
'key2',
'key3',
$options
);$pusherB = new Pusher\Pusher(
'key4',
'key5',
'key6',
$options
);$input_data = $_POST;
$theChannel = $_POST['channel'];
$theEvent = $_POST['event'];$pusher->trigger($theChannel, $theEvent, $input_data);
$pusherB->trigger($theChannel, $theEvent, $input_data);
?>initialization pusher :
neoPusherInitialize "key1" "eu" "[url]" true
neoPusherSubscribe "lpg78" "new-message" "parsedata"
IfEx [Groupe] == "admin" or [Groupe] == "bureau"
SetVar [Channel] "B"
neoPusherInitialize "key4" "eu" "[url]" true
neoPusherSubscribe "lpg78B" "new-message" "parsedata"
GotoPage "reseau"
Else
SetVar [Channel] "C"
GotoPage "sms"
Endifpushbutton send :
If [Channel] == "C"
neoPusherSend "lpg78" "new-message" [clientData] "" ""
Else
neoPusherSend "lpg78B" "new-message" [clientData] "" ""
Endif
Good morning @Luishp
I try to use 2 channels inside my chat app but I have a problem with neoPusherSend for the 2nd channel, I do not receive the message. I wonder if there is a conflict with neo functions and the configuration of index.php ?
?php
header("Access-Control-Allow-Origin: *");
require __DIR__ . '/vendor/autoload.php';
$options = array(
'cluster' => 'eu',
'useTLS' => true
);
$pusher = new Pusher\Pusher(
'key1',
'key2',
'key3',
$options
);
$pusherB = new Pusher\Pusher(
'key4',
'key5',
'key6',
$options
);
$input_data = $_POST;
$theChannel = $_POST['channel'];
$theEvent = $_POST['event'];
$pusher->trigger($theChannel, $theEvent, $input_data);
$pusherB->trigger($theChannel, $theEvent, $input_data);
?>
initialization pusher :
neoPusherInitialize "key1" "eu" "[url]" true
neoPusherSubscribe "lpg78" "new-message" "parsedata"
IfEx [Groupe] == "admin" or [Groupe] == "bureau"
SetVar [Channel] "B"
neoPusherInitialize "key4" "eu" "[url]" true
neoPusherSubscribe "lpg78B" "new-message" "parsedata"
GotoPage "reseau"
Else
SetVar [Channel] "C"
GotoPage "sms"
Endif
pushbutton send :
If [Channel] == "C"
neoPusherSend "lpg78" "new-message" [clientData] "" ""
Else
neoPusherSend "lpg78B" "new-message" [clientData] "" ""
Endif

Quote from Phil78 on March 9, 2022, 1:27 pmadditional precision, when I examine the debug console of pusher, I see the messages sent whatever the channel in the 2 channels.
additional precision, when I examine the debug console of pusher, I see the messages sent whatever the channel in the 2 channels.

Quote from luishp on March 9, 2022, 7:18 pmHi @phil78, attached is neoPusher plugin source code.
As you can see it's really simple and it follows Pusher API instructions.
I do really have no time to look into this, but I hope the source code will help you to understand what's happening in your project.Best regards,
Hi @phil78, attached is neoPusher plugin source code.
As you can see it's really simple and it follows Pusher API instructions.
I do really have no time to look into this, but I hope the source code will help you to understand what's happening in your project.
Best regards,
Uploaded files:

Quote from Phil78 on March 12, 2022, 4:14 pmthanks @luishp, I had misunderstood how channels and apps are related. After a contact with pusher support it is clear now, I do not need 2 channels but 2 messages name.
Best regards.
thanks @luishp, I had misunderstood how channels and apps are related. After a contact with pusher support it is clear now, I do not need 2 channels but 2 messages name.
Best regards.
