- if (!$cur ||
- $cur->id != $message->from_profile &&
- $cur->id != $message->to_profile)
- {
- $this->client_error(_('Only the sender and recipient may read this message.'), 404);
+ if ($cur && ($cur->id == $message->from_profile || $cur->id == $message->to_profile)) {
+ $this->show_page($cur, 1);
+ } else {
+ $this->client_error(_('Only the sender and recipient may read this message.'), 403);