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

Deleting viewer copy of individual messages #38

Open
dawgbone opened this issue Feb 20, 2015 · 4 comments
Open

Deleting viewer copy of individual messages #38

dawgbone opened this issue Feb 20, 2015 · 4 comments

Comments

@dawgbone
Copy link

Any plans on implementing this?

Basically, if you have a conversation, I should be able to delete (set the status to 0) either a message I've sent or received so that I no longer see it, but the other person (or people if it's a group) still do.

I've created a function for this outside your core library, but the one downside is if you delete the last message (set the status to 0 for the user), that conversation won't return when you call TBMsg::getUserConversations(userID), because it only checks the last created message in a conversation for a status that isn't either deleted or archived.

@tzookb
Copy link
Owner

tzookb commented Feb 21, 2015

Yes of course this is a must!
I would try to do it soon, could you elaborate of the problem you found please

@dawgbone
Copy link
Author

It's not really a problem, more of a missing feature.

You can delete a conversation, but you can't delete a message. I made a work around myself, which just sets the message_status.status = 0 for that userID & msg_id.

This works out fine, except when you delete the last message in a conversation. If you try and retrieve that conversation, it only looks for the very last message created and because the status is set to 0, it thinks you've deleted the entire conversation instead of just the last message.

Once there is a new message in the conversation, TBMsg::getUserConversations can find it again because the last message isn't archived or deleted.

@tzookb
Copy link
Owner

tzookb commented Feb 21, 2015

OK now I understand, yes the get conversations was quite hard.

OK I'll recheck that when let message is deleted

@tzookb
Copy link
Owner

tzookb commented May 14, 2016

thanks for the great feedback, Im working on version 3, and I'll keep that situation in my mind!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants