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,8 +297,12 @@ 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()
|
||||||
|
if p.IsPublished {
|
||||||
|
command = "/read"
|
||||||
|
} else {
|
||||||
command = "/view"
|
command = "/view"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if command == "/erase" {
|
if command == "/erase" {
|
||||||
if !p.IsLocked && !p.IsEncrypted {
|
if !p.IsLocked && !p.IsEncrypted {
|
||||||
p.Erase()
|
p.Erase()
|
||||||
|
Loading…
Reference in New Issue
Block a user