Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not able to send extra parameters #97

Open
akshgods opened this issue Aug 1, 2018 · 1 comment
Open

not able to send extra parameters #97

akshgods opened this issue Aug 1, 2018 · 1 comment

Comments

@akshgods
Copy link

akshgods commented Aug 1, 2018

using jaxl 3.

I want to send some extra parameters to xmpp server. but not getting those extra parameters in msg.
I'm trying with this method which is inside jaxl.php.

public function send_msg($to,$body,$sender_id,$id,$xmpp_msg_attribute,$thread=null, $subject=null) {
    $msg = new XMPPMsg(
        array(
            'id'=>$id,
            'sender_id'=>$sender_id,
            'type'=>'normal', 
            'to'=>$to, 
            'from'=>$this->full_jid->to_string(),
            'attributes'=> 'extra information',
        ), 
        $body,
        $thread,
        $subject
    );
    $this->send($msg);
}

but output sending without extra parameters:

<message xml:lang='en'
         to='[email protected]'
         from='[email protected]/jaxl#3090b93066351b9a90ebad79bb208745'
         id='5b6137010b0bc'
         xmlns='jabber:client'>
  <body><p>check me</p></body>
</message>

I didn't found attributes , sender_id . i also tried changing attributes -> attrs.
anything i'm doing wrong here?

@portcoweb
Copy link

You also need to modify a constructor inside file named xmpp_msg.php inside xmpp folder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants