mirror of
https://github.com/schollz/cowyo.git
synced 2023-08-10 21:13:00 +03:00
Self destruct with published messages works
This commit is contained in:
parent
3c53386e08
commit
1720711029
@ -297,7 +297,11 @@ func handlePageRequest(c *gin.Context) {
|
|||||||
if p.IsPrimedForSelfDestruct && !p.IsLocked && !p.IsEncrypted {
|
if p.IsPrimedForSelfDestruct && !p.IsLocked && !p.IsEncrypted {
|
||||||
p.Update("*This page has self-destructed. You can not return to it.*\n\n" + p.Text.GetCurrent())
|
p.Update("*This page has self-destructed. You can not return to it.*\n\n" + p.Text.GetCurrent())
|
||||||
p.Erase()
|
p.Erase()
|
||||||
command = "/view"
|
if p.IsPublished {
|
||||||
|
command = "/read"
|
||||||
|
} else {
|
||||||
|
command = "/view"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if command == "/erase" {
|
if command == "/erase" {
|
||||||
if !p.IsLocked && !p.IsEncrypted {
|
if !p.IsLocked && !p.IsEncrypted {
|
||||||
|
Loading…
Reference in New Issue
Block a user