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

[RFE] method to clean up chats #38

Open
Lanchon opened this issue Nov 18, 2024 · 3 comments
Open

[RFE] method to clean up chats #38

Lanchon opened this issue Nov 18, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@Lanchon
Copy link

Lanchon commented Nov 18, 2024

some chat apps keep 2 db tables:

  • a 'threads' table that keeps track of the chat threads, with data like: remote user ID, last chat timestamp, id (or even copy) of last thread chat message (for performance reasons), etc. this table is used to show the threads view.
  • a 'chats' table that holds each chat message, with data like: thread ID/remote user ID, msg type, msg content, timestamp sent, timestamp read, etc.

i don't know if grindr is this way, but assuming it is, there is low hanging fruit:

i'd very much like to eliminate fruitless conversations from the threads list. but unfortunately, to do so you need to either block the person (extreme, and temporary anyway) or delete all messages (which looses history including why the conversation finished).

an ideal solution would be only to remove the conversation from the 'threads' table, but keeping the messages. this lets you "delete" the convo, but if you find the profile again, you can see what the previous convo was about. same if the person messages you again: you get the new message with the old history.

remove the conversation from the 'threads' table

i did this once for some app, i don't remember which. unfortunately, for that i had to relax the SQL relation between the tables, as chats could not exist without a matching thread. i think there was a cascade delete relationship, where deleting the thread automatically deleted the chats.

anyway, with grindr having cloud chat backup, changing the db schema is definitely not recommended. instead, if the threads table has a "last chat timestamp" you could us a specific sentinel timestamp value (in the far past) that means thread deleted. if not, in the threads screen, the threads query must join with the last thread message from the chats table. so you can use a column of the chats table then (like timestamp read or anything else) to signal thread deletion. either of these strategies will automatically unhide the thread if a new message is received.

as a poor man option, if sentinel in "last chat timestamp" field from threads table is used to mark thread deletions, a long past sentinel value will bunch all "deleted" threads in the very past of the threads view, getting them out of sight, even if the threads view code is not modified. not exactly perfect, but good enough.

@Lanchon
Copy link
Author

Lanchon commented Nov 18, 2024

the hide (pseudo-delete) thread option could be triggered by long clicking the trash icon once thread(s) is/are selected.

@soliviantar
Copy link

Scruff does this, hiding the conversation from the list until you go into the chat through the profile or you get new messages from that profile. They call it "archive" and it is indeed very useful, agreed. Would be great to have.

@R0rt1z2
Copy link
Owner

R0rt1z2 commented Nov 18, 2024

I'll need to take a closer look, but it's most likely impossible due to the way the new messaging system works (WS)

@R0rt1z2 R0rt1z2 added the enhancement New feature or request label Nov 18, 2024
@R0rt1z2 R0rt1z2 added this to GPlus Nov 18, 2024
@R0rt1z2 R0rt1z2 moved this to Todo in GPlus Nov 18, 2024
@R0rt1z2 R0rt1z2 self-assigned this Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests

3 participants