messenger icon indicating copy to clipboard operation
messenger copied to clipboard

How to search message in Threads by keyword

Open sluxzer opened this issue 9 months ago • 3 comments

Hi @RTippin

Could you please help me with this case? I would like to be able to search text in entire messages.

ex: search keyword "cool" inside entire threads

I'm not sure this is the correct API api/messenger/search/{query?}, because it's only search on user/provider model

If I may give my 2 cents:

  • this package have so many great features, and noobs like me not understand how to use it; perhaps we could improve the documentation

sluxzer avatar Feb 25 '25 17:02 sluxzer

Hi @RTippin

Could you please give me insight with this case?

sluxzer avatar Mar 04 '25 22:03 sluxzer

@sluxzer There is no current way to search threads/messages included (though I would like to add that in the future, including updating the docs)

For now, you would have to create your own endpoint and provide the thread ID to search through its messages via a fuzzy search where the message body contains your search token, which may suffer performance issues if the messages table has a large amount of records.

RTippin avatar Mar 06 '25 18:03 RTippin

Thank you for your confirmation; I thought it's there somehow.

No I don't feel the burden to make it from scratch.

sluxzer avatar Mar 08 '25 13:03 sluxzer