-
Notifications
You must be signed in to change notification settings - Fork 39
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
Is there is a way to check if a member already messaged another member? #455
Comments
No endpoint performs this specific check, but I think you can use https://developer.buddypress.org/bp-rest-api/reference/private-messaging/#list-messages-threads to get a user list of thread messages and compare it against this other user. |
Thank you for the answer, |
Could you elaborate more on ,what, and how, you are trying to do? If you have an app, for example, that lists the threads of a user, why would you need to check if a thread/message was already created for another specific user unrelated to the current user?
It'd be good to know what problem this is solving. We definitely can't add new endpoints to support specific features for everyone. A first look tells me this is something you should create yourself instead of bundling into BuddyPress but I'm curious about what and how you are trying to do it. |
Normal case
Second case but before I load the messaging layout I would like to check if I messaged this person before or not, if never messaged him before ill show blank layout and a text field where I can write my first message I hope my explanation is clear thank you |
It looks like you want a new field on the member schema, similar to the |
Since you would: get the activities and the user related to the activity (including this new field with the "status" of the user, meaning if they have a thread with the current logged-in user.) |
To my understanding it looks more like a "filter by recipient's user ID" messages need. This means, we'd need to edit |
If you guys approved this and implement it please let us know, thanks |
Related ticket: https://buddypress.trac.wordpress.org/ticket/9157 |
Using REST API endpoint Is there is a way to check if a member already messaged another member? Or they never messaged each other?
We already check the documentation, but we can't find a special endpoint for it
thanks
The text was updated successfully, but these errors were encountered: