blob: 8e15e13617dee49ff12065a30d1866c353129e32 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
class EmailProcessor
attr_reader :email
def initialize(email)
@email = email
end
def process
tokens = email.to.map { |x| x[:token] }.uniq
User.find(tokens).each do |user|
user.add_to_inbox(email)
end
end
end
|