@@ -17,7 +17,7 @@ func GetBoardIDFromName(name string) (BoardID, bool) {
17
17
}
18
18
19
19
func CreateBoard(name string) BoardID {
20
- if !( std.IsOriginCall() || std. PrevRealm().IsUser() ) {
20
+ if !std.PrevRealm().IsUser() {
21
21
panic("invalid non-user call")
22
22
}
23
23
bid := incGetBoardID()
@@ -43,7 +43,7 @@ func checkAnonFee() bool {
43
43
}
44
44
45
45
func CreateThread(bid BoardID, title string, body string) PostID {
46
- if !( std.IsOriginCall() || std. PrevRealm().IsUser() ) {
46
+ if !std.PrevRealm().IsUser() {
47
47
panic("invalid non-user call")
48
48
}
49
49
caller := std.GetOrigCaller()
@@ -61,7 +61,7 @@ func CreateThread(bid BoardID, title string, body string) PostID {
61
61
}
62
62
63
63
func CreateReply(bid BoardID, threadid, postid PostID, body string) PostID {
64
- if !( std.IsOriginCall() || std. PrevRealm().IsUser() ) {
64
+ if !std.PrevRealm().IsUser() {
65
65
panic("invalid non-user call")
66
66
}
67
67
caller := std.GetOrigCaller()
@@ -91,7 +91,7 @@ func CreateReply(bid BoardID, threadid, postid PostID, body string) PostID {
91
91
// If dstBoard is private, does not ping back.
92
92
// If board specified by bid is private, panics.
93
93
func CreateRepost(bid BoardID, postid PostID, title string, body string, dstBoardID BoardID) PostID {
94
- if !( std.IsOriginCall() || std. PrevRealm().IsUser() ) {
94
+ if !std.PrevRealm().IsUser() {
95
95
panic("invalid non-user call")
96
96
}
97
97
caller := std.GetOrigCaller()
@@ -121,7 +121,7 @@ func CreateRepost(bid BoardID, postid PostID, title string, body string, dstBoar
121
121
}
122
122
123
123
func DeletePost(bid BoardID, threadid, postid PostID, reason string) {
124
- if !( std.IsOriginCall() || std. PrevRealm().IsUser() ) {
124
+ if !std.PrevRealm().IsUser() {
125
125
panic("invalid non-user call")
126
126
}
127
127
caller := std.GetOrigCaller()
@@ -153,7 +153,7 @@ func DeletePost(bid BoardID, threadid, postid PostID, reason string) {
153
153
}
154
154
155
155
func EditPost(bid BoardID, threadid, postid PostID, title, body string) {
156
- if !( std.IsOriginCall() || std. PrevRealm().IsUser() ) {
156
+ if !std.PrevRealm().IsUser() {
157
157
panic("invalid non-user call")
158
158
}
159
159
caller := std.GetOrigCaller()
0 commit comments