Add recipients to posts.
[Sone.git] / src / main / resources / templates / insert / sone.xml
index 782eccd..4e8cbae 100644 (file)
@@ -1,10 +1,13 @@
 <?xml version="1.0" encoding="utf-8" ?>
 <sone>
 
-       <id><% currentSone.id></id>
-       <name><% currentSone.name|xml></name>
        <time><% currentSone.time></time>
 
+       <client>
+               <name>Sone</name>
+               <version><% version|xml></version>
+       </client>
+
        <profile>
                <first-name><% currentSone.profile.firstName|xml></first-name>
                <middle-name><% currentSone.profile.middleName|xml></middle-name>
@@ -18,6 +21,7 @@
                <%foreach currentSone.posts post>
                <post>
                        <id><% post.id|xml></id>
+                       <recipient><%ifnull !post.recipient><% post.recipient.id|xml><%/if></recipient>
                        <time><% post.time></time>
                        <text><% post.text|xml></text>
                </post>
                <%/foreach>
        </reply-likes>
 
-       <known-sones>
-               <%foreach knownSones sone>
-               <known-sone>
-                       <sone-id><% sone.id|xml></sone-id>
-                       <sone-key><% sone.requestUri|xml></sone-key>
-                       <sone-name><% sone.name|xml></sone-name>
-               </known-sone>
-               <%/foreach>
-       </known-sones>
-
 </sone>