From 741ded66943d0e53c91b1bd438780af32694d42b Mon Sep 17 00:00:00 2001 From: Jeff Date: Sun, 30 Jul 2017 18:20:14 -0400 Subject: [PATCH] fix pubkey tripcode --- contrib/backends/srndv2/src/srnd/model.go | 1 + contrib/backends/srndv2/src/srnd/model_mem.go | 4 ++++ contrib/templates/placebo/post.mustache | 4 ++-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/contrib/backends/srndv2/src/srnd/model.go b/contrib/backends/srndv2/src/srnd/model.go index 6800086..844cb64 100644 --- a/contrib/backends/srndv2/src/srnd/model.go +++ b/contrib/backends/srndv2/src/srnd/model.go @@ -57,6 +57,7 @@ type PostModel interface { Board() string Sage() bool Pubkey() string + PubkeyHex() string Reference() string ReferenceHash() string diff --git a/contrib/backends/srndv2/src/srnd/model_mem.go b/contrib/backends/srndv2/src/srnd/model_mem.go index 9a3b408..3c567e6 100644 --- a/contrib/backends/srndv2/src/srnd/model_mem.go +++ b/contrib/backends/srndv2/src/srnd/model_mem.go @@ -376,6 +376,10 @@ func (self *post) ShortHash() string { return ShortHashMessageID(self.MessageID()) } +func (self *post) PubkeyHex() string { + return self.Key +} + func (self *post) Pubkey() string { if len(self.Key) > 0 { return fmt.Sprintf("", self.Key, makeTripcode(self.Key)) diff --git a/contrib/templates/placebo/post.mustache b/contrib/templates/placebo/post.mustache index 358c7cd..ed34b0a 100644 --- a/contrib/templates/placebo/post.mustache +++ b/contrib/templates/placebo/post.mustache @@ -12,7 +12,7 @@ data-msgidhash="{{post.PostHash}}" data-rootmsgid="{{post.Reference}}" data-rootmsgidhash="{{post.ReferenceHash}}" - data-pubkey="{{post.Pubkey}}" + data-pubkey="{{post.PubkeyHex}}" {{#post.Sage}} data-sage="1" {{/post.Sage}} @@ -29,7 +29,7 @@ {{#post.Attachments}} {{/post.Attachments}} - {{post.Subject}} {{post.Name}} {{post.Date}} {{post.Pubkey}} + {{post.Subject}} {{post.Name}} {{post.Date}} {{{post.Pubkey}}} {{post.ShortHash}}