From 381f7d4287da514688451e6d1bb89ed9b74fe839 Mon Sep 17 00:00:00 2001 From: a-kuroki-gs Date: Fri, 9 Feb 2024 10:56:25 +0900 Subject: [PATCH 1/6] =?UTF-8?q?=E5=95=8F=E3=81=84=E5=90=88=E3=82=8F?= =?UTF-8?q?=E3=81=9B=E3=81=8C=E6=9D=A5=E3=81=9F=E3=82=89=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E8=80=85=E3=81=AB=E5=AF=BE=E3=81=97=E3=81=A6=E3=83=94=E3=83=A8?= =?UTF-8?q?=E3=83=AB=E3=83=89=E3=81=8B=E3=82=89=E9=80=9A=E7=9F=A5=E3=82=92?= =?UTF-8?q?=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E3=81=97=E3=81=9F?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/inquiries_controller.rb | 11 ++++++++- app/models/notification.rb | 27 ++-------------------- app/notifiers/activity_notifier.rb | 16 +++++++++++++ db/fixtures/discord_profiles.yml | 2 +- db/fixtures/files/users/avatars/pjord.jpg | Bin 0 -> 4100 bytes test/fixtures/users.yml | 18 +++++++++++++++ test/notifiers/activity_notifier_test.rb | 17 ++++++++++++++ 7 files changed, 64 insertions(+), 27 deletions(-) create mode 100644 db/fixtures/files/users/avatars/pjord.jpg diff --git a/app/controllers/inquiries_controller.rb b/app/controllers/inquiries_controller.rb index ceac6676435..6cc0da406fc 100644 --- a/app/controllers/inquiries_controller.rb +++ b/app/controllers/inquiries_controller.rb @@ -10,9 +10,10 @@ def new def create @inquiry = Inquiry.new(inquiry_params) - result = valid_recaptcha?('inquiry') + if result && @inquiry.save + notify_inquiry InquiryMailer.incoming(@inquiry).deliver_later redirect_to new_inquiry_url, notice: 'お問い合わせを送信しました。' else @@ -26,4 +27,12 @@ def create def inquiry_params params.require(:inquiry).permit(:name, :email, :body, :privacy_policy) end + + def notify_inquiry + sender = User.find_by(login_name: 'pjord') + + User.admins.each do |receiver| + ActivityDelivery.with(inquiry: @inquiry, receiver:, sender:).notify(:came_inquiry) + end + end end diff --git a/app/models/notification.rb b/app/models/notification.rb index 6d6b615cd24..ad21fcb7b99 100644 --- a/app/models/notification.rb +++ b/app/models/notification.rb @@ -41,7 +41,8 @@ class Notification < ApplicationRecord no_correct_answer: 22, comebacked: 23, create_article: 24, - added_work: 25 + added_work: 25, + came_inquiry: 26 } scope :unreads, -> { where(read: false) } @@ -60,30 +61,6 @@ class Notification < ApplicationRecord after_update NotificationCallbacks.new after_destroy NotificationCallbacks.new - class << self - def checked(check) - Notification.create!( - kind: kinds[:checked], - user: check.receiver, - sender: check.sender, - link: Rails.application.routes.url_helpers.polymorphic_path(check.checkable), - message: "#{check.sender.login_name}さんが#{check.checkable.title}を確認しました。", - read: false - ) - end - - def came_answer(answer) - Notification.create!( - kind: kinds[:answered], - user: answer.receiver, - sender: answer.sender, - link: Rails.application.routes.url_helpers.polymorphic_path(answer.question), - message: "#{answer.user.login_name}さんから回答がありました。", - read: false - ) - end - end - def unread? !read end diff --git a/app/notifiers/activity_notifier.rb b/app/notifiers/activity_notifier.rb index e2e19a02937..0ab2e4df326 100644 --- a/app/notifiers/activity_notifier.rb +++ b/app/notifiers/activity_notifier.rb @@ -383,4 +383,20 @@ def added_work(params = {}) read: false ) end + + def came_inquiry(params = {}) + params.merge!(@params) + inquiry = params[:inquiry] + sender = params[:sender] + receiver = params[:receiver] + + notification( + body: "#{inquiry.name}さんから問い合わせがありました。", + kind: :came_inquiry, + receiver:, + sender:, + link: Rails.application.routes.url_helpers.admin_inquiry_path(inquiry), + read: false + ) + end end diff --git a/db/fixtures/discord_profiles.yml b/db/fixtures/discord_profiles.yml index aaf9581f370..19d25b16257 100644 --- a/db/fixtures/discord_profiles.yml +++ b/db/fixtures/discord_profiles.yml @@ -286,7 +286,7 @@ discord_profile_nagai-kyuukai: times_url: https://discord.com/channels/1079802367970656257/1224708078847397908 times_id: 1224708078847397908 -discord_profire_pjord: +discord_profile_pjord: user: pjord account_name: times_url: diff --git a/db/fixtures/files/users/avatars/pjord.jpg b/db/fixtures/files/users/avatars/pjord.jpg new file mode 100644 index 0000000000000000000000000000000000000000..7ecce2f41ff80a3520b593d6818002c38e0e4a86 GIT binary patch literal 4100 zcmZ{nXEYlC*T-YUC?(X6(HONGt5)sUTVgA*YlIpRT51zYQ`H)^N^4b7wQA2&vxvQS zQG%j2Z{IJ^InRgZ!@a-rzvukU{c^wDcw<8?8Y(s_002OvqYX3tN6Y^&ihm7&xc1rn z2VzG(Eg0Y?4mZ&HFOdi67-*1hl8{l+u^B7)hV~c!NcUw5jzJ>GfUnuswShNuf-TmG56uAg6d-CL&r|^@@&# zb5T-F)Nh%2cb(F8FzlkO(3)*WLGX7C+%4gq2q{3HIrWZQptZmz^N*bt)q3L=!c_k2 z?TRE$b&7%K%d4x>$N@U$wI)ses+jj2@8lGd4-6%9WO|OI=*}$P%EvJ4CtPj@{t06! zDt}=3y|fb$-VWVGo+0q(io)t-z`I*zjoDYH?A<>GoXq2!KHdt!_-%5|pk!gM@11s0 zU@O%vyylx8heMw9UML=^pHo#@F_2=_mFpT5=2^+nQ~lCkkwcle(wF0cqA!JZ@^$Bu zIbL8VskY;>X(*%isWM6Wivfl9TNjibENKgOhvH>9D5*1wvqQC3{FXRo(&U3Wzc?6h zA}`3>S)R`=Og}-<^RK17tz#JBAI}O%PHNPq2mM09D+4JrpBW9^367_=pnF97b7vp0 zN97<%6@O@GkkGw!!r|QPyYXi|x@0m9_7mL^YYaKF@TW9A(ZJU-;a z%Q4`l*XR6AT5yyPt?MPs8P5YWmrf>74x8vi*?WDOdw)V_iox5!mbd%b3~8HmOc;|s zEeBIU9ZsaqQ<@YBs~`K?;>JPQS-B@FD}pPqJ)V}2!C5T;B=Se+GAtBb#ov z|MLx_(IO8-Xov4>dS{ZGX@sw9e$S>j?Ok+0Du~Vbp4Wsx@PGU?v9@pNxp5<>i z`z1yeRFtLN^f>K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O=grGV@^0 zsirQ$npPprur0WhU!RV-qHiZYjCV-xUPH5S{IUfWe(@sV6-n2+QKp!?Ed=H=8=`lE zze+xLAUP=alrE`o%`LzZS3F`*8x7v}P>F^Y5cF?+2Nlw_2^z%A@>_p0oQ( zRNxbS%DkEsY0Qk&_6SzE!*hE&WZU0ufy)$D3^`9?%S>h}C93{_L4ZJv_Ys0=6X$Q5 zz9Nf4!@@|*ME0|(?*BXTHY6FKFkaXG3eDjgpVc#(;rmDu6I9ynjB#}g&ZMx`9fxEXrf?8H+qr>1R1-5F!xsq)6l&m zv$&S9?&64Kwp`@LiLWmfpW8<)7>VrgD4Y{574}f!cyr~C)cK?;drNwoJCc9}ZCHhw zffMgvznIKSRBi^WbRsWZ{{p`FFB4Fu4$Wx7Z0TEb6(8yckB<{=K5uN8zaV{75y!>B zNWfGRUvp`!@@p$TSvnk#vG93gE-fP~3xL*4ct7>pUwZR}ocb^A1}`wLz1*49K&|6W zNli&!dHuY{$Y!lW@+XuoQb}wt<0F41e(ZPQ zR`Z^kIb|cX5_fpD`nKJ}z5^AIy_3ZKjip6VWx2-5%Fd)b{&uvvFC|HY3?G&9&aYni zYwm(5puf$QmjP&ht340`9D6)tV1ovj{SxI{$suX4a)#$ zhX5COCqI{e07yV3q(q^TqEKmsI8dF6h$_tZ^|2Y614MSMD8Zz?#005DlU;qFB literal 0 HcmV?d00001 diff --git a/test/fixtures/users.yml b/test/fixtures/users.yml index ea3075c80b6..b18d35d2994 100644 --- a/test/fixtures/users.yml +++ b/test/fixtures/users.yml @@ -1018,3 +1018,21 @@ harikirio: #必修でないプラクティスも修了しているユーザー created_at: "2020-01-01 00:00:12" sent_student_followup_message: true last_activity_at: "2020-01-01 00:00:12" + +pjord: + login_name: pjord + email: pjord@fjord.jp + crypted_password: $2a$10$n/xv4/1luueN6plzm2OyDezWlZFyGHjQEf4hwAW1r3k.lCm0frPK. # testtest + salt: zW3kQ9ubsxQQtzzzs4ap + name: ピヨルド + name_kana: ピヨルド + company: company1 + description: "管理者のピヨルドです。バイキングの末裔です。" + course: course1 + job: office_worker + os: 回答なし + admin: true + adviser: true + updated_at: "2014-01-01 00:00:01" + created_at: "2014-01-01 00:00:01" + last_activity_at: "2014-01-01 00:00:01" diff --git a/test/notifiers/activity_notifier_test.rb b/test/notifiers/activity_notifier_test.rb index fa082caa190..c0dc34b3950 100644 --- a/test/notifiers/activity_notifier_test.rb +++ b/test/notifiers/activity_notifier_test.rb @@ -144,4 +144,21 @@ class ActivityNotifierTest < ActiveSupport::TestCase notification.notify_later end end + + test '#came_inquiry' do + params = { + inquiry: Inquiry.first, + sender: users(:pjord), + receiver: users(:komagata) + } + notification = ActivityNotifier.with(params).came_inquiry + + assert_difference -> { AbstractNotifier::Testing::Driver.deliveries.count }, 1 do + notification.notify_now + end + + assert_difference -> { AbstractNotifier::Testing::Driver.enqueued_deliveries.count }, 1 do + notification.notify_later + end + end end From 446cc7baef501b5ebd439e7a8d46be0327ba1316 Mon Sep 17 00:00:00 2001 From: goruchan Date: Tue, 2 Apr 2024 23:46:47 +0900 Subject: [PATCH 2/6] =?UTF-8?q?=E3=83=94=E3=83=A8=E3=83=AB=E3=83=89?= =?UTF-8?q?=E3=81=A7=E3=83=AD=E3=82=B0=E3=82=A4=E3=83=B3=E3=81=97=E3=81=9F?= =?UTF-8?q?=E9=9A=9B=E3=81=AB=E7=9B=B8=E8=AB=87=E9=83=A8=E5=B1=8B=E3=81=8C?= =?UTF-8?q?=E3=81=AA=E3=81=84=E3=81=93=E3=81=A8=E3=81=A7=E3=83=AA=E3=83=B3?= =?UTF-8?q?=E3=82=AF=E3=82=A8=E3=83=A9=E3=83=BC=E3=81=97=E3=81=A6=E3=81=84?= =?UTF-8?q?=E3=81=9F=E3=81=93=E3=81=A8=E3=81=B8=E3=81=AE=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/fixtures/talks.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/fixtures/talks.yml b/db/fixtures/talks.yml index 6c67800518a..2bc7096adfe 100644 --- a/db/fixtures/talks.yml +++ b/db/fixtures/talks.yml @@ -228,6 +228,6 @@ talk_kensyu-not-setting-end-date: user: kensyu-not-setting-end-date action_completed: true -talk_harikirio: - user: harikirio +talk_pjord: + user: pjord action_completed: true From 0d0d3f6c93cd57a7a40154cd7124f834139f177d Mon Sep 17 00:00:00 2001 From: goruchan Date: Wed, 3 Apr 2024 00:06:56 +0900 Subject: [PATCH 3/6] =?UTF-8?q?=E3=83=94=E3=83=A8=E3=83=AB=E3=83=89?= =?UTF-8?q?=E3=81=AE=E3=82=A2=E3=82=A4=E3=82=B3=E3=83=B3=E8=A8=AD=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit アイコン設定は attach_mentor_profile_image にて実施。メンター条件が必要。また、プロフィール表示にメールアドレスも必要だった --- db/fixtures/users.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/fixtures/users.yml b/db/fixtures/users.yml index e0dca5c87cd..457a9bf76ac 100644 --- a/db/fixtures/users.yml +++ b/db/fixtures/users.yml @@ -1405,7 +1405,7 @@ paginataion-jirou: pjord: login_name: pjord - email: + email: pjord@fjord.jp crypted_password: $2a$10$n/xv4/1luueN6plzm2OyDezWlZFyGHjQEf4hwAW1r3k.lCm0frPK. # testtest salt: zW3kQ9ubsxQQtzzzs4ap name: ピヨルド @@ -1418,7 +1418,7 @@ pjord: course: course1 company: company1 admin: true - mentor: false + mentor: true unsubscribe_email_token: Xw-T0PjrO2LTkCx1C8KA9w updated_at: "2024-03-09 00:00:30" created_at: "2024-03-05 00:00:30" From 63a96a183f82d9c6e46888a26d1875120c3d355c Mon Sep 17 00:00:00 2001 From: goruchan Date: Wed, 3 Apr 2024 21:57:52 +0900 Subject: [PATCH 4/6] =?UTF-8?q?=E5=95=8F=E3=81=84=E5=90=88=E3=82=8F?= =?UTF-8?q?=E3=81=9B=E9=80=9A=E7=9F=A5=E3=81=AB=20Newspaper=20=E3=82=92?= =?UTF-8?q?=E9=81=A9=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/inquiries_controller.rb | 10 +--------- app/models/inquiry_notifier.rb | 13 +++++++++++++ config/initializers/newspaper.rb | 2 ++ 3 files changed, 16 insertions(+), 9 deletions(-) create mode 100644 app/models/inquiry_notifier.rb diff --git a/app/controllers/inquiries_controller.rb b/app/controllers/inquiries_controller.rb index 6cc0da406fc..f0bd71c7ec3 100644 --- a/app/controllers/inquiries_controller.rb +++ b/app/controllers/inquiries_controller.rb @@ -13,7 +13,7 @@ def create result = valid_recaptcha?('inquiry') if result && @inquiry.save - notify_inquiry + Newspaper.publish(:came_inquiry, { inquiry: @inquiry }) InquiryMailer.incoming(@inquiry).deliver_later redirect_to new_inquiry_url, notice: 'お問い合わせを送信しました。' else @@ -27,12 +27,4 @@ def create def inquiry_params params.require(:inquiry).permit(:name, :email, :body, :privacy_policy) end - - def notify_inquiry - sender = User.find_by(login_name: 'pjord') - - User.admins.each do |receiver| - ActivityDelivery.with(inquiry: @inquiry, receiver:, sender:).notify(:came_inquiry) - end - end end diff --git a/app/models/inquiry_notifier.rb b/app/models/inquiry_notifier.rb new file mode 100644 index 00000000000..ca13c209e62 --- /dev/null +++ b/app/models/inquiry_notifier.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +class InquiryNotifier + def call(payload) + inquiry = payload[:inquiry] + return if inquiry.nil? + + sender = User.find_by(login_name: 'pjord') + User.admins.each do |receiver| + ActivityDelivery.with(inquiry:, receiver:, sender:).notify(:came_inquiry) + end + end +end diff --git a/config/initializers/newspaper.rb b/config/initializers/newspaper.rb index 9f72148d637..f8df39bc4f1 100644 --- a/config/initializers/newspaper.rb +++ b/config/initializers/newspaper.rb @@ -76,4 +76,6 @@ Newspaper.subscribe(:work_create, WorkNotifier.new) Newspaper.subscribe(:work_destroy, WorkNotificationDestroyer.new) + + Newspaper.subscribe(:came_inquiry, InquiryNotifier.new) end From 897ce2356dcfd8963c6395cd0eb620379d9bd235 Mon Sep 17 00:00:00 2001 From: goruchan Date: Tue, 16 Apr 2024 22:49:31 +0900 Subject: [PATCH 5/6] =?UTF-8?q?=E9=80=9A=E7=9F=A5=E9=80=81=E4=BF=A1?= =?UTF-8?q?=E8=80=85=E3=81=AE=E5=90=8D=E5=89=8D=E3=82=92=E5=AE=9A=E6=95=B0?= =?UTF-8?q?=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/inquiry_notifier.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/models/inquiry_notifier.rb b/app/models/inquiry_notifier.rb index ca13c209e62..fc51872db3a 100644 --- a/app/models/inquiry_notifier.rb +++ b/app/models/inquiry_notifier.rb @@ -1,11 +1,13 @@ # frozen_string_literal: true class InquiryNotifier + NOTIFICATION_SENDER_NAME = 'pjord' + def call(payload) inquiry = payload[:inquiry] return if inquiry.nil? - sender = User.find_by(login_name: 'pjord') + sender = User.find_by(login_name: NOTIFICATION_SENDER_NAME) User.admins.each do |receiver| ActivityDelivery.with(inquiry:, receiver:, sender:).notify(:came_inquiry) end From 62ff6c804bc6cc6dcce2214da6e3a745c90d40bd Mon Sep 17 00:00:00 2001 From: goruchan Date: Wed, 3 Jul 2024 23:09:48 +0900 Subject: [PATCH 6/6] =?UTF-8?q?=E3=83=86=E3=82=B9=E3=83=88=E7=94=A8=20fixt?= =?UTF-8?q?ure=20=E3=81=AB=E3=82=A2=E3=83=89=E3=83=90=E3=82=A4=E3=82=B6=20?= =?UTF-8?q?pjord=20=E3=82=92=E8=BF=BD=E5=8A=A0=E3=81=97=E3=81=9F=E3=81=9F?= =?UTF-8?q?=E3=82=81=E3=83=86=E3=82=B9=E3=83=88=E3=81=AE=E6=9C=9F=E5=BE=85?= =?UTF-8?q?=E5=80=A4=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/models/generation_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/models/generation_test.rb b/test/models/generation_test.rb index b954aa57ecf..ea3ec9883ce 100644 --- a/test/models/generation_test.rb +++ b/test/models/generation_test.rb @@ -35,7 +35,7 @@ class GenerationTest < ActiveSupport::TestCase assert_equal 3, Generation.new(5).count_classmates_by_target(:trainees) assert_equal 1, Generation.new(5).count_classmates_by_target(:hibernated) assert_equal 2, Generation.new(5).count_classmates_by_target(:graduated) - assert_equal 2, Generation.new(5).count_classmates_by_target(:advisers) + assert_equal 3, Generation.new(5).count_classmates_by_target(:advisers) assert_equal 2, Generation.new(5).count_classmates_by_target(:retired) end end