Tests[SearchMessageFTSSimple]
This commit is contained in:
@@ -1184,6 +1184,10 @@ func (h APIHandler) ListMessages(g *gin.Context) ginresp.HTTPResponse {
|
||||
ConfirmedSubscriptionBy: langext.Ptr(userid),
|
||||
}
|
||||
|
||||
if q.Filter != nil && strings.TrimSpace(*q.Filter) != "" {
|
||||
filter.SearchString = langext.Ptr([]string{strings.TrimSpace(*q.Filter)})
|
||||
}
|
||||
|
||||
messages, npt, err := h.database.ListMessages(ctx, filter, pageSize, tok)
|
||||
if err != nil {
|
||||
return ginresp.APIError(g, 500, apierr.DATABASE_ERROR, "Failed to query messages", err)
|
||||
|
@@ -201,7 +201,7 @@ func (h CompatHandler) Info(g *gin.Context) ginresp.HTTPResponse {
|
||||
return ginresp.CompatAPIError(0, "Failed to query clients")
|
||||
}
|
||||
|
||||
fcmSet := langext.ArrAny(clients, func(i int) bool { return clients[i].FCMToken != nil })
|
||||
fcmSet := langext.ArrAny(clients, func(c models.Client) bool { return c.FCMToken != nil })
|
||||
|
||||
return ctx.FinishSuccess(ginresp.JSON(http.StatusOK, response{
|
||||
Success: true,
|
||||
|
Reference in New Issue
Block a user