Allow like conditions in activities storage query

Created on 18 April 2025, 6 days ago

Problem/Motivation

Due to the need of proposing actors in text mentions from following/followers while writing, it will be great to add like queries in a way that lets use for example %/alis% or "https://{$domain}%/{$username}%" . Now is not possible because LIKE conditions in storage query are just available if used with the "search" field.

Steps to reproduce

Proposed resolution

As similar to how conditions are processed in ActivityPubActivityStorage.php:getBaseQuery for example in the case of < operator : (strpos($field, '<') !== FALSE), we could allow LIKE conditionals with :

if (strpos($field, 'LIKE') !== FALSE) {                                                                                                                          
 $operator = 'LIKE';                                                                                                                                            
 $field = str_replace('LIKE', '', $field);                                                                                                                      
}
Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇪🇸Spain aleix

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024