From 0a18055292c439606e5a8b29ae30884256524bb1 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Mon, 4 Apr 2022 23:24:19 +0900 Subject: [PATCH 1/3] =?UTF-8?q?change:=20=E3=83=A1=E3=83=BC=E3=83=AB?= =?UTF-8?q?=E9=80=81=E4=BF=A1=E3=81=AE=E3=82=AD=E3=83=A5=E3=83=BC=E3=81=AB?= =?UTF-8?q?=E7=99=BB=E9=8C=B2=E3=81=99=E3=82=8B=E5=87=A6=E7=90=86=E3=81=AB?= =?UTF-8?q?=E3=83=A1=E3=83=BC=E3=83=AB=E9=80=81=E4=BF=A1=E3=83=91=E3=83=BC?= =?UTF-8?q?=E3=83=9F=E3=83=83=E3=82=B7=E3=83=A7=E3=83=B3(mail=5Fcontent=5F?= =?UTF-8?q?receivable)=E3=82=92=E3=82=AB=E3=82=B9=E3=82=BF=E3=83=9E?= =?UTF-8?q?=E3=82=A4=E3=82=BA=E3=81=A7=E3=81=8D=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB=E4=BF=AE=E6=AD=A3=E3=80=82=E3=81=9F=E3=81=A0=E3=81=97?= =?UTF-8?q?=E3=80=81=E6=97=A2=E5=AD=98=E3=83=97=E3=83=A9=E3=82=B0=E3=82=A4?= =?UTF-8?q?=E3=83=B3=E3=81=AB=E3=81=AF=E5=BD=B1=E9=9F=BF=E3=81=AA=E3=81=84?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Model/Behavior/MailQueueBehavior.php | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/Model/Behavior/MailQueueBehavior.php b/Model/Behavior/MailQueueBehavior.php index 790bf7d..ed841c0 100644 --- a/Model/Behavior/MailQueueBehavior.php +++ b/Model/Behavior/MailQueueBehavior.php @@ -529,10 +529,12 @@ private function __getSettingPluginKey(Model $model) { * @param Model $model モデル * @param array $sendTimes メール送信日時 配列 * @param string $typeKey メールの種類 + * @param string $sendRoomPermission 送信するルームの役割。ルームでないときは無視される * @return void */ public function saveQueue(Model $model, $sendTimes = null, - $typeKey = MailSettingFixedPhrase::DEFAULT_TYPE) { + $typeKey = MailSettingFixedPhrase::DEFAULT_TYPE, + $sendRoomPermission = null) { $model->Behaviors->load('Mails.IsMailSend', $this->settings[$model->alias]); $languageId = Current::read('Language.id'); @@ -568,7 +570,7 @@ public function saveQueue(Model $model, $sendTimes = null, // 投稿メール - ルーム配信 $this->saveQueuePostMail($model, $languageId, $sendTimes, $userIds, $toAddresses, - $roomId, $typeKey); + $roomId, $typeKey, $sendRoomPermission); } else { //$workflowType == self::MAIL_QUEUE_WORKFLOW_TYPE_NONE || @@ -580,7 +582,7 @@ public function saveQueue(Model $model, $sendTimes = null, // メールキューSave $this->saveQueuePostMail($model, $languageId, $sendTimes, $userIds, $toAddresses, - $roomId, $typeKey); + $roomId, $typeKey, $sendRoomPermission); } } @@ -595,11 +597,13 @@ public function saveQueue(Model $model, $sendTimes = null, * @param array $toAddresses 送信先メールアドレス 配列 * @param int $roomId ルームID * @param string $typeKey メールの種類 + * @param string $sendRoomPermission 送信するルームの役割。$roomIdとセットに使用する * @return void * @throws InternalErrorException */ public function saveQueuePostMail(Model $model, $languageId, $sendTimes = null, $userIds = null, - $toAddresses = null, $roomId = null, $typeKey = MailSettingFixedPhrase::DEFAULT_TYPE) { + $toAddresses = null, $roomId = null, $typeKey = MailSettingFixedPhrase::DEFAULT_TYPE, + $sendRoomPermission = null) { $model->Behaviors->load('Mails.IsMailSend', $this->settings[$model->alias]); if ($sendTimes === null) { $sendTimes[] = $model->MailQueue->getSaveSendTime(); @@ -681,7 +685,9 @@ public function saveQueuePostMail(Model $model, $languageId, $sendTimes = null, // ルーム配信で送るパーミッション /** @see MailQueueUser::getSendRoomPermission() */ - $sendRoomPermission = $model->MailQueueUser->getSendRoomPermission($typeKey); + if (! isset($sendRoomPermission)) { + $sendRoomPermission = $model->MailQueueUser->getSendRoomPermission($typeKey); + } // ルーム配信 /** @see MailQueueUser::addMailQueueUserInRoom() */ From 01fabd8e4b8e43d71f7eb573fb0348e1ee73fa13 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Mon, 4 Apr 2022 23:43:54 +0900 Subject: [PATCH 2/3] =?UTF-8?q?test:=20docker-compose=E3=81=AE=E3=83=90?= =?UTF-8?q?=E3=83=BC=E3=82=B8=E3=83=A7=E3=83=B3=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1477ea2..44f5e44 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -58,7 +58,7 @@ jobs: - name: docker-compose install run: | - curl -L https://github.com/docker/compose/releases/download/1.11.2/docker-compose-`uname -s`-`uname -m` > ~/docker-compose + curl -L https://github.com/docker/compose/releases/download/1.29.2/docker-compose-`uname -s`-`uname -m` > ~/docker-compose chmod +x ~/docker-compose sudo mv ~/docker-compose /usr/local/bin/docker-compose docker-compose --version From f1e0a5041c70c63d6d8eb83dfb688314e254ef1b Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Mon, 4 Apr 2022 23:50:48 +0900 Subject: [PATCH 3/3] =?UTF-8?q?test:=20github=20actions=E3=81=AE=E3=82=A8?= =?UTF-8?q?=E3=83=A9=E3=83=BC=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/tests.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 44f5e44..9501566 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -48,6 +48,9 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Fix up git URLs + run: echo -e '[url "https://github.com/"]\n insteadOf = "git://github.com/"' >> ~/.gitconfig + - name: environment run: | echo "GITHUB_WORKSPACE=${GITHUB_WORKSPACE}"