ssafronova (ssafronova) wrote in changelog,
ssafronova
ssafronova
changelog

[livejournal] r17598: LJSUP-7217: Grant for i_jet_media accoun...

Committer: ssafronova
LJSUP-7217: Grant for i_jet_media account permission to send many personal messages (whitelist of limitless accounts)
U   trunk/cgi-bin/LJ/Message.pm
Modified: trunk/cgi-bin/LJ/Message.pm
===================================================================
--- trunk/cgi-bin/LJ/Message.pm	2010-10-25 04:16:58 UTC (rev 17597)
+++ trunk/cgi-bin/LJ/Message.pm	2010-10-25 06:49:41 UTC (rev 17598)
@@ -57,7 +57,9 @@
     # Send message by writing to DB and triggering event
     if ($self->save_to_db) {
         $self->_send_msg_event;
-        $self->_orig_u->rate_log('usermessage', $self->rate_multiple) if !$opts->{'nocheck'} and $self->rate_multiple;
+        $self->_orig_u->rate_log('usermessage', $self->rate_multiple) if !$opts->{'nocheck'}
+                                                                         and not $LJ::WHITELIST_SEND_INBOX_MESSAGES{$self->_orig_u->user}
+                                                                         and $self->rate_multiple;
         return 1;
     } else {
         return 0;
@@ -405,7 +407,8 @@
     }
 
     # Will this message put sender over rate limit
-    unless ($self->rate_multiple && $ou->rate_check('usermessage', $self->rate_multiple)) {
+    unless ($LJ::WHITELIST_SEND_INBOX_MESSAGES{$ou->user}
+            || $self->rate_multiple && $ou->rate_check('usermessage', $self->rate_multiple) ) {
         my $up;
         $up = LJ::run_hook('upgrade_message', $ou, 'message');
         $up = "<br />$up" if ($up);

Tags: livejournal, pm, ssafronova
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments