[buddypress-trac] [BuddyPress Trac] #3083: Create message meta table and appropriate meta functions
buddypress-trac
noreply at wordpress.org
Tue Nov 25 20:36:04 UTC 2014
#3083: Create message meta table and appropriate meta functions
-------------------------+-----------------------
Reporter: r-a-y | Owner: r-a-y
Type: enhancement | Status: assigned
Priority: normal | Milestone: 2.2
Component: Messaging | Version: 1.5
Severity: normal | Resolution:
Keywords: has-patch |
-------------------------+-----------------------
Comment (by r-a-y):
Thanks for the feedback, boonebgorges.
`02.patch` is refreshed for trunk and adds unit tests.
To reply to a few of your points:
> You set 'update_meta_cache' to false in the inbox, with a note asking
for feedback. My feedback: Don't :) I have no idea if anyone will actually
use messagemeta in the inbox, but it's such a minor bit of overhead that I
see no reason why we shouldn't prefetch it for every display loop.
If a BP install is not using an object cache, this adds an extra query to
each thread in the inbox, for a maximum of 10 extra DB queries when on the
inbox page.
I would suggest that we leave it `false` here. If a plugin really needs
it, they can fetch the message meta then and it will be added to the
cache.
> passing an array of message_ids to 'messages_thread_deleted_thread'
might break things.
I've done what you suggested here.
I also noticed that the `'messages_thread_deleted_thread'` hook was
removed in r9165, so I've added it back in, but I would be happy to remove
it.
Also from r9165, I have renamed the `'bp_messages_thread_before_delete'`
hook to `'bp_messages_thread_before_mark_delete'` and moved
`'bp_messages_thread_before_delete'` to when a message is really deleted.
This is due to the way the `BP_Messages_Thread::delete()` method works.
Let me know what you think.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/3083#comment:9>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list