From: David ‘Bombe’ Roden Date: Mon, 7 Nov 2016 20:54:25 +0000 (+0100) Subject: Show original freemail address in tooltip of link X-Git-Tag: 0.9.7^2~465 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=429b99e1930f7bc4a02027b93f7a8985d6c1bc8a;p=Sone.git Show original freemail address in tooltip of link --- diff --git a/src/main/java/net/pterodactylus/sone/template/ParserFilter.java b/src/main/java/net/pterodactylus/sone/template/ParserFilter.java index c12b36d..e2afb9c 100644 --- a/src/main/java/net/pterodactylus/sone/template/ParserFilter.java +++ b/src/main/java/net/pterodactylus/sone/template/ParserFilter.java @@ -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"); } diff --git a/src/test/java/net/pterodactylus/sone/template/ParserFilterTest.java b/src/test/java/net/pterodactylus/sone/template/ParserFilterTest.java index a689ab8..f6275fc 100644 --- a/src/test/java/net/pterodactylus/sone/template/ParserFilterTest.java +++ b/src/test/java/net/pterodactylus/sone/template/ParserFilterTest.java @@ -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")); }