projects
/
quix0rs-gnu-social.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e9321a1
)
silenced users can't send direct messages
author
Evan Prodromou
<evan@status.net>
Mon, 16 Nov 2009 18:51:41 +0000
(19:51 +0100)
committer
Evan Prodromou
<evan@status.net>
Mon, 16 Nov 2009 18:51:41 +0000
(19:51 +0100)
classes/Message.php
patch
|
blob
|
history
diff --git
a/classes/Message.php
b/classes/Message.php
index 979e6e87ccbdcb4d79de3c0fec07a19a239a6812..718a9d922a525eccbb5218d9b412c11e4c24a76a 100644
(file)
--- a/
classes/Message.php
+++ b/
classes/Message.php
@@
-39,6
+39,12
@@
class Message extends Memcached_DataObject
static function saveNew($from, $to, $content, $source) {
+ $sender = Profile::staticGet('id', $from);
+
+ if (!$sender->hasRight(Right::NEWMESSAGE)) {
+ throw new ClientException(_('You are banned from sending direct messages.'));
+ }
+
$msg = new Message();
$msg->from_profile = $from;