Skip to content

Commit

Permalink
Fix bug on notification searching
Browse files Browse the repository at this point in the history
  • Loading branch information
RockChinQ committed Aug 15, 2021
1 parent 349648d commit eb2e523
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/service/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ func StoreNoti(noti PackPush, source string) (int, error) {
}

func SendNoti(req PackRequest, h *Handler, crypto bool, token string) error {
rows, err := db.DB.Query("SELECT id,target,time,title,content,source FROM notis WHERE id>=" + strconv.Itoa(req.From) + " AND (target like '%," + h.User.Name + ",%' OR target='_global_') LIMIT 0," + strconv.Itoa(req.Limit))
rows, err := db.DB.Query("SELECT id,target,time,title,content,source FROM notis WHERE id>=" + strconv.Itoa(req.From) + " AND (target like '%," + h.User.Name + ",%' OR target like '%,_global_,%') LIMIT 0," + strconv.Itoa(req.Limit))
if err != nil {
return err
}
Expand Down

0 comments on commit eb2e523

Please sign in to comment.