Store the client name and version in the inserted Sone.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 14 Nov 2010 10:07:32 +0000 (11:07 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 14 Nov 2010 10:07:32 +0000 (11:07 +0100)
src/main/java/net/pterodactylus/sone/core/SoneInserter.java
src/main/resources/templates/insert/sone.xml

index 86ea92a..e23d1a9 100644 (file)
@@ -32,6 +32,7 @@ import net.pterodactylus.sone.data.Post;
 import net.pterodactylus.sone.data.Reply;
 import net.pterodactylus.sone.data.Sone;
 import net.pterodactylus.sone.freenet.StringBucket;
+import net.pterodactylus.sone.main.SonePlugin;
 import net.pterodactylus.util.io.Closer;
 import net.pterodactylus.util.logging.Logging;
 import net.pterodactylus.util.service.AbstractService;
@@ -314,6 +315,7 @@ public class SoneInserter extends AbstractService {
                        }
 
                        template.set("currentSone", soneProperties);
+                       template.set("version", SonePlugin.VERSION);
                        StringWriter writer = new StringWriter();
                        StringBucket bucket = null;
                        try {
index b947dc4..d6dd643 100644 (file)
@@ -3,6 +3,11 @@
 
        <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>