Friends / Block List Integration

Chat can be configured to import existing friends/block list from the website it integrates into. Refer to "Basic integration" -> "Login handlers" where we left 2 nodes empty < friends > and < blocks >. Now we need to populate those nodes with data. Below is the full profile xml for authorized user:

<login result="OK"> 
<userData>
  <id>2012</id>
  <name><![CDATA[David]]></name>
  <gender>0</gender>
  <location>London, UK</location>
  <age>22</age>
  <photo><![CDATA[http://yourdomain/photos/david_big.png]]></photo>
  <thumbnail><![CDATA[http://yourdomain/photos/david_small.png]]></thumbnail>
  <details>Hello :) I am David</details>
  <level>regular</level>
  <profileUrl>http://yourdomain/profile/David</profileUrl> 
</userData>

<friends>
  <friend id="1111" name="Tom" thumbnail="http://yourdomain/photos/tom_small.png"/>
</friends>

<blocks> 
  <block id="2222" name="Paul" thumbnail="http://yourdomain/photos/paul_small.png"/>
</blocks> 

</login>