summaryrefslogtreecommitdiff
path: root/classes/Message.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-12-15 10:31:25 -0500
committerEvan Prodromou <evan@status.net>2009-12-15 10:31:25 -0500
commit797a0d79fbf4e105ee4ccdce093c1595c1f08a4a (patch)
treed144137e9607e6ee1144dae4e993b4f22335fa0b /classes/Message.php
parent19bb9a04d171fe2a8d87a51c0267c5670cb0f5bf (diff)
create a method for notification for new messages, and use it
Diffstat (limited to 'classes/Message.php')
-rw-r--r--classes/Message.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/classes/Message.php b/classes/Message.php
index 718a9d922..16d0c60b3 100644
--- a/classes/Message.php
+++ b/classes/Message.php
@@ -89,4 +89,12 @@ class Message extends Memcached_DataObject
$contentlimit = self::maxContent();
return ($contentlimit > 0 && !empty($content) && (mb_strlen($content) > $contentlimit));
}
+
+ function notify()
+ {
+ $from = User::staticGet('id', $this->from_profile);
+ $to = User::staticGet('id', $this->to_profile);
+
+ mail_notify_message($this, $from, $to);
+ }
}