invited user spam faker

This commit is contained in:
Seth Call 2020-05-09 09:17:00 -05:00
parent 9446de49d4
commit cd05d269bd
4 changed files with 23 additions and 11 deletions

View File

@ -3,8 +3,17 @@ module JamRuby
observe JamRuby::InvitedUser
@@log = Logging.logger[InvitedUserObserver]
def after_create(invited_user)
if invited_user.note
# lie to spammer and say it worked. drop on floor
@@log.info("dropping spammer " + invited_user.sender_id)
# make spammer think we are sending email
sleep (1)
return
end
if invited_user.sender.nil?
InvitedUserMailer.welcome_betauser(invited_user).deliver_now
else

View File

@ -1,6 +1,6 @@
.invitation-overlay {
width:384px;
height:344px;
width:420px;
height:294px;
padding:8px;
background-color:#787878;
position:fixed;
@ -15,12 +15,12 @@
-webkit-box-shadow: inset 2px 2px 3px 0px #888;
box-shadow: inset 2px 2px 3px 0px #888;
color:#666;
height:75px;
width:300px;
height: 179px;
width: 393px;
}
.invitation-inner {
height:300px;
height:250px;
overflow:auto;
background-color:#262626;
}

View File

@ -27,7 +27,11 @@ class ApiInvitedUsersController < ApiController
return
end
# remove due to spammers
msg = params[:note].blank? ? nil : params[:note].strip
@invited_users = emails.collect do |ee|
iu = InvitedUser.new
iu.sender = current_user
@ -58,4 +62,4 @@ class ApiInvitedUsersController < ApiController
end
end
end
end

View File

@ -5,17 +5,16 @@
<label for="txt-emails">Enter email address(es). If multiple addresses, separate with commas.</label><br />
<textarea id="txt-emails"></textarea>
</div>
<div style="margin-left:10px; margin-top:20px;">
<div style="margin-left:10px; margin-top:20px;display:none">
<label for="txt-message">Enter a personal message to the person(s) you are inviting.</label><br />
<textarea id="txt-message"></textarea>
<textarea id="txt-message" disabled="disabled" style="display:none"></textarea>
</div>
</div>
<div class="invitation-inner" id="invitation-checkbox-container">
<div class="invitation-inner" id="invitation-checkbox-container" style="display:none">
<div style="margin-left:10px; margin-top:10px;">
<label>Click the checkbox next to the email of each person you'd like to invite.</label><br />
<label class="email-filter" for="email-filter">Filter Results: <input text="text" name="email-filter" /></label><br />
<label class="email-filter" for="email-filter">Filter Results: <input text="text" name="email-filter" disabled="disabled"/></label><br />
<div id="invitation-checkboxes">
</div>
</div>
</div>