Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve search for chat messages #4433

Open
mahibi opened this issue Nov 12, 2024 · 2 comments · May be fixed by #4647
Open

Improve search for chat messages #4433

mahibi opened this issue Nov 12, 2024 · 2 comments · May be fixed by #4647
Assignees
Labels
1. to develop Accepted and waiting to be taken care of (should be only set by nextcloud employees)
Milestone

Comments

@mahibi
Copy link
Collaborator

mahibi commented Nov 12, 2024

The message search was never implemented sufficiently.

A user does not always get the result he is looking for, i.e. the message he is looking for is sometimes not found in the chat.

The overview will show the matched results, but when clicking on a result it depends if the message is available in the adapter.

For older messages this is most likely not the case (one would have to scroll very often upwards before searching to have a chance it's included in the adapter), so only the last messages of the chat are shown instead to show the searched message.

Loading all messages into the adapter at once is not an option for performance reasons. Same for doing it in a loop. (It may differ if the message is found in the database for the latest chatblock. Then it might be an option to load a lot of data into the adapter, as it's quicker than doing online requests in a loop. But this might also have limitations).

Talk iOS seems to have the same challenge. The workaround there is to show a snippet of the chat in a search window. So there the searched message is shown and maybe 30(?) messages are shown before and after it, without being able to scroll further.
For talk android this would mean that chatblocks may be created that are not connected to the latest chatblock. This shouldn't be a problem when there is no option to scroll in the search result window.

We should implement the same for android talk or discuss if there are other ways to solve it.

@mahibi mahibi added the 1. to develop Accepted and waiting to be taken care of (should be only set by nextcloud employees) label Nov 12, 2024
@mahibi
Copy link
Collaborator Author

mahibi commented Dec 11, 2024

@Ivansss @SystemKeeper does iOS use the chatmessages/chatblocks from DB at all for this or is it completely independent (=not persistent)?

@Ivansss
Copy link
Member

Ivansss commented Dec 11, 2024

At this moment on Talk iOS, only global (in all conversations) message search can be done from the conversations list view.
In order to perform this search, there should be an internet connection.
If the user then selects any search result, we get a message context for that message and present it in a chat snippet as you noticed:
https://github.com/nextcloud/talk-ios/blob/6d78cf2cabc967e8e5d02e779acc4f0e312bcf47/NextcloudTalk/RoomsTableViewController.m#L1296
So for this process we do not use anything that is stored in the DB and as mentioned before, user would need an internet connection since everything (search results and message context) is fetched from the server.

@mahibi mahibi added this to the 21.0.0 milestone Dec 16, 2024
@rapterjet2004 rapterjet2004 linked a pull request Jan 23, 2025 that will close this issue
8 tasks
@mahibi mahibi modified the milestones: 21.0.0, 21.1.0 Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of (should be only set by nextcloud employees)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants