try fixing frontend function of model
This commit is contained in:
1 parent
1f1dc6a63b
commit
c2c2146ad3
1 file changed
+3
-3
@@ -420,11 +420,11 @@ func (self *post) MessageID() string {
|
||||
}
|
||||
|
||||
func (self *post) Frontend() string {
|
||||
idx := strings.LastIndex(self.MessagePath, "!")
|
||||
idx := strings.LastIndex(self.MessagePath, "@")
|
||||
if idx == -1 {
|
||||
return self.MessagePath
|
||||
return "malformed"
|
||||
}
|
||||
return self.MessagePath[idx+1:]
|
||||
return self.MessagePath[idx : len(self.MessagePath)-2]
|
||||
}
|
||||
|
||||
func (self *post) Board() string {
|
||||
|
||||
Reference in new issue
Block a user