Weizhi
Weizhi

Reputation: 172

XMPPFramework - Sending Group Chat Message in iOS Failed

I am using XMPPFramework in iOS. I send a message like so:

<message type="groupchat" to="[email protected]">
  <x xmlns="jabber:x:event">
    <offline/>
    <delivered/>
    <displayed/>
    <composing/>
  </x>
  <body>&lt;Message FontName='宋体' FontSize='200' FontColr='0' FontBold='0'&gt;asdf&lt;/Message&gt;</body>
</message>

But I get the following error result:

<message xmlns="jabber:client" type="error" to="[email protected]/1e840910" from="[email protected]">
  <x xmlns="jabber:x:event">
    <offline/>
    <delivered/>
    <displayed/>
    <composing/>
  </x>
  <body>&lt;Message FontName='宋体' FontSize='200' FontColr='0' FontBold='0'&gt;asdf&lt;/Message&gt;</body>
  <error code="406" type="modify">
    <not-acceptable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"></not-acceptable>
  </error>
</message>

Upvotes: 2

Views: 1936

Answers (1)

Weizhi
Weizhi

Reputation: 172

I've solved this problem by myself .

You have to send XMPPPresence to that chatroom first .

Upvotes: 2

Related Questions