Skip to content

Commit 16782a7

Browse files
author
Josh
committed
Fix ineligible titles
1 parent 2a5bc26 commit 16782a7

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

app/v1/self.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -201,35 +201,35 @@ func getEligibleTitles(md common.MethodData, privileges uint64) ([]eligibleTitle
201201
titles = append(titles, eligibleTitle{ID: "bot", Title: "CHAT BOT"})
202202
}
203203

204-
if userPrivs&9437183 > 0 {
204+
if userPrivs&9437183 == 9437183 {
205205
titles = append(titles, eligibleTitle{ID: "product_manager", Title: "PRODUCT MANAGER"})
206206
}
207207

208-
if userPrivs&10743327 > 0 {
208+
if userPrivs&10743327 == 10743327 {
209209
titles = append(titles, eligibleTitle{ID: "developer", Title: "PRODUCT DEVELOPER"})
210210
}
211211

212212
if hasDesign {
213213
titles = append(titles, eligibleTitle{ID: "designer", Title: "PRODUCT DESIGNER"})
214214
}
215215

216-
if userPrivs&9425151 > 0 {
216+
if userPrivs&9425151 == 9425151 {
217217
titles = append(titles, eligibleTitle{ID: "community_manager", Title: "COMMUNITY MANAGER"})
218218
}
219219

220-
if userPrivs&9212159 > 0 || userPrivs&9175111 > 0 {
220+
if userPrivs&9212159 == 9212159 || userPrivs&9175111 == 9175111 {
221221
titles = append(titles, eligibleTitle{ID: "community_support", Title: "COMMUNITY SUPPORT"})
222222
}
223223

224-
if userPrivs&10485767 > 0 {
224+
if userPrivs&10485767 == 10485767 {
225225
titles = append(titles, eligibleTitle{ID: "event_manager", Title: "EVENT MANAGER"})
226226
}
227227

228-
if userPrivs&33554432 > 0 {
228+
if userPrivs&33554432 == 33554432 {
229229
titles = append(titles, eligibleTitle{ID: "nqa", Title: "NOMINATION QUALITY ASSURANCE"})
230230
}
231231

232-
if userPrivs&8388871 > 0 {
232+
if userPrivs&8388871 == 8388871 {
233233
titles = append(titles, eligibleTitle{ID: "nominator", Title: "BEATMAP NOMINATOR"})
234234
}
235235

@@ -241,11 +241,11 @@ func getEligibleTitles(md common.MethodData, privileges uint64) ([]eligibleTitle
241241
titles = append(titles, eligibleTitle{ID: "champion", Title: "AKATSUKI CHAMPION"})
242242
}
243243

244-
if userPrivs&common.UserPrivilegePremium > 0 {
244+
if userPrivs&common.UserPrivilegePremium == common.UserPrivilegePremium {
245245
titles = append(titles, eligibleTitle{ID: "premium", Title: "AKATSUKI+"})
246246
}
247247

248-
if userPrivs&common.UserPrivilegeDonor > 0 {
248+
if userPrivs&common.UserPrivilegeDonor == common.UserPrivilegeDonor {
249249
titles = append(titles, eligibleTitle{ID: "donor", Title: "SUPPORTER"})
250250
}
251251

0 commit comments

Comments
 (0)