Opened 10 years ago
Closed 10 years ago
#6580 closed defect (bug) (fixed)
BP_Messages_Thread::$last_message_* not populated by default
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 2.4 | Priority: | normal |
Severity: | normal | Version: | 1.6 |
Component: | Messages | Keywords: | has-patch |
Cc: |
Description
The BP_Messages_Thread
class offers some convenience fields that grant direct access to the data for the last message in the thread:
last_message_id
last_message_date
last_sender_id
last_message_subject
last_message_content
However, these are only populated by BP_Messages_Thread_Template::__construct()
, and were not documented in BP_Message_Thread
until [5999].
This caused me confusion when I was trying to use these fields in a different context. To keep others from spending time chasing this down, I suggest that we do one of the following:
- Add a note to the inline docs for each of these fields stating that they are only populated when using
BP_Messages_Thread_Template
. - Always populate them inside of the
BP_Message_Thread::populate()
method.
I favor the latter.
Attachments (3)
Change History (6)
Note: See
TracTickets for help on using
tickets.
Always populate the fields