mentions: send dmails from DanbooruBot.
This commit is contained in:
@@ -50,18 +50,7 @@ module Mentionable
|
|||||||
end
|
end
|
||||||
|
|
||||||
bodies.each do |name, text|
|
bodies.each do |name, text|
|
||||||
user = User.find_by_name(name)
|
Dmail.create_automated(to_name: name, title: title, body: body)
|
||||||
|
|
||||||
if user
|
|
||||||
dmail = Dmail.new(
|
|
||||||
from_id: from_id,
|
|
||||||
to_id: user.id,
|
|
||||||
title: title,
|
|
||||||
body: text
|
|
||||||
)
|
|
||||||
dmail.owner_id = user.id
|
|
||||||
dmail.save
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user