Show original freemail address in tooltip of link
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 7 Nov 2016 20:54:25 +0000 (21:54 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 7 Nov 2016 20:54:25 +0000 (21:54 +0100)
src/main/java/net/pterodactylus/sone/template/ParserFilter.java
src/test/java/net/pterodactylus/sone/template/ParserFilterTest.java

index c12b36d..e2afb9c 100644 (file)
@@ -283,7 +283,7 @@ public class ParserFilter implements Filter {
                renderLink(writer,
                                "/Freemail/NewMessage?to=" + freemailPart.getIdentityId(),
                                String.format("%s@%s.freemail", freemailPart.getEmailLocalPart(), soneName),
-                               String.format("%s", soneName),
+                               String.format("%s\n%s@%s.freemail", soneName, freemailPart.getEmailLocalPart(), freemailPart.getFreemailId()),
                                "in-sone");
        }
 
index a689ab8..f6275fc 100644 (file)
@@ -65,7 +65,7 @@ public class ParserFilterTest {
                assertThat(linkNode.attributes().asList(), containsInAnyOrder(
                                new Attribute("href", "/Freemail/NewMessage?to=" + SONE_IDENTITY),
                                new Attribute("class", "in-sone"),
-                               new Attribute("title", "Sone")
+                               new Attribute("title", "Sone\n" + SONE_FREEMAIL)
                ));
                assertThat(linkNode.text(), is("sone@Sone.freemail"));
        }