Check correctly for recipient ID.
[Sone.git] / src / main / resources / templates / insert / sone.xml
index fbacd19..14cb8a4 100644 (file)
@@ -16,6 +16,7 @@
                <birth-day><% currentSone.profile.birthDay|xml></birth-day>
                <birth-month><% currentSone.profile.birthMonth|xml></birth-month>
                <birth-year><% currentSone.profile.birthYear|xml></birth-year>
+               <avatar><%currentSone.profile.avatar|xml></avatar>
                <fields>
                        <%foreach currentSone.profile.fields field>
                        <field>
                        </field>
                        <%/foreach>
                </fields>
-               <avatar><%currentSone.avatar|xml></avatar>
        </profile>
 
        <posts>
                <%foreach currentSone.posts post>
                <post>
                        <id><% post.id|xml></id>
-                       <recipient><%ifnull !post.recipient><% post.recipient.id|xml><%/if></recipient>
+                       <recipient><%if post.recipientId.present><% post.recipientId.get|xml><%/if></recipient>
                        <time><% post.time></time>
                        <text><% post.text|xml></text>
                </post>