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

can't seem to send message to a groupchat. #8

Open
jacksnodgrass opened this issue Jun 28, 2019 · 7 comments
Open

can't seem to send message to a groupchat. #8

jacksnodgrass opened this issue Jun 28, 2019 · 7 comments

Comments

@jacksnodgrass
Copy link

jacksnodgrass commented Jun 28, 2019

I can do:
$client->message->send($message, $recipient,$msg_type);
where $msg_type = 'chat' and send the specified message to the specified recipient.

changing $msg_type to 'groupchat' does not get the message sent to a chat group.

You have to FIRST do something like:
$client->presence->subscribe("chatroom@conference.chat.server/resource_name");

BUT xmpp-php sends:

<presence from='testuser@spark.example.com' to='groupchat@conference.spark.example.com' 
 type='subscribe' />

and that does not work for my openchat chat server. I don't get an error but when I do the send() I get a 406 error.

<error code="406" type="modify"><not-acceptable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error>

If we send:
<presence from='testuser@spark.example.com' to='groupchat@conference.spark.example.com' />
instead... then the send() to the chat room works.

  • jack
@Norgul
Copy link
Collaborator

Norgul commented Jun 29, 2019

Thanks Jack for these comments and improvements. Do you have a server test account somewhere readily available so I can test it out as well?

@jacksnodgrass
Copy link
Author

I'll see if I can get something setup on Monday that you can access. Do you use docker at all?

@Norgul
Copy link
Collaborator

Norgul commented Jun 30, 2019

Thanks.

Regarding Docker yes, but not here because this is meant to be the core library, and if I would get Docker container it would make much more sense to make a container with Ratchet which runs a WS server which calls the library.

@jacksnodgrass
Copy link
Author

I was asking about docker because I have a pretty good docker-compose setup for openfire ( a xmpp based chat server ) could be used for localized testing. - jack

@Norgul
Copy link
Collaborator

Norgul commented Jun 30, 2019

That would be great!

@Norgul
Copy link
Collaborator

Norgul commented Jul 9, 2019

Hello @jacksnodgrass,
is there anything new in setting me up the access for the server or maybe merging a openfire Docker env?

Thanks

@jacksnodgrass
Copy link
Author

no.. sorry.. busy with work. will try and get something setup soon.

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

No branches or pull requests

2 participants