Don’t store Sone ID in the reply, it’s always the Sone being parsed!
[Sone.git] / src / main / resources / templates / insert / sone.xml
index b6668d6..e2446c0 100644 (file)
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="utf-8" ?>
 <sone>
 
+       <id><% currentSone.id></id>
        <name><% currentSone.name|html></name>
 
        <profile>
        </profile>
 
        <posts>
-               <%foreach posts post>
-                       <post>
-                               <time><% post.time></time>
-                               <text><% post.text|html></text>
-                       </post>
+               <%foreach currentSone.posts post>
+               <post>
+                       <id><% post.id></id>
+                       <time><% post.time></time>
+                       <text><% post.text|html></text>
+               </post>
                <%/foreach>
        </posts>
 
+       <replies>
+               <%foreach currentSone.replies reply>
+               <reply>
+                       <id><% reply.id></id>
+                       <post-id><% reply.post.id></post-id>
+                       <time><% reply.time></time>
+                       <text><% reply.text></text>
+               </reply>
+               <%/foreach>
+       </replies>
+
+       <friends>
+               <%foreach currentSone.friends friend>
+               <friend>
+                       <sone-id><% friend.id|html></sone-id>
+                       <sone-key><% friend.requestUri|html></sone-key>
+                       <sone-name><% friend.name|html></sone-name>
+               </friend>
+               <%/foreach>
+       </friends>
+
+       <known-sones>
+               <%foreach knownSones sone>
+               <known-sone>
+                       <sone-id><% sone.id|html></sone-id>
+                       <sone-key><% sone.requestUri|html></sone-key>
+                       <sone-name><% sone.name|html></sone-name>
+               </known-sone>
+               <%/foreach>
+       </known-sones>
+
 </sone>