Skip to content

Commit

Permalink
Merge branch 'master' of github.com:freescout-helpdesk/freescout into…
Browse files Browse the repository at this point in the history
… dist
  • Loading branch information
freescout-help-desk committed Mar 29, 2024
2 parents 70cc044 + a1602fa commit 2c39ba9
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 25 deletions.
26 changes: 19 additions & 7 deletions app/Http/Controllers/ConversationsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -1697,7 +1697,7 @@ public function ajax(Request $request)
$attachments = [];
foreach ($thread->attachments as $attachment) {
$attachments[] = [
'id' => $attachment->id,
'id' => encrypt($attachment->id),
'name' => $attachment->file_name,
'size' => $attachment->size,
'url' => $attachment->url(),
Expand Down Expand Up @@ -2774,7 +2774,7 @@ public function upload(Request $request)
if ($attachment) {
$response['status'] = 'success';
$response['url'] = $attachment->url();
$response['attachment_id'] = $attachment->id;
$response['attachment_id'] = encrypt($attachment->id);
} else {
$response['msg'] = __('Error occurred uploading file');
}
Expand Down Expand Up @@ -3126,17 +3126,20 @@ public function processReplyAttachments($request)
$attachments = [];
if (!empty($request->attachments_all)) {
$embeds = [];
$attachments_all = $this->decodeAttachmentsIds($request->attachments_all);
if (!empty($request->attachments)) {
$attachments = $request->attachments;
$attachments = $this->decodeAttachmentsIds($request->attachments);
}
if (!empty($request->embeds)) {
$embeds = $request->embeds;
$embeds = $this->decodeAttachmentsIds($request->embeds);
}
if (count($attachments) != count($embeds)) {
$attachments_to_remove = array_diff($attachments_all, $attachments);
$attachments_to_remove = array_diff($attachments_to_remove, $embeds);
if (count($attachments)
&& count($attachments) != count($embeds)
) {
$has_attachments = true;
}
$attachments_to_remove = array_diff($request->attachments_all, $attachments);
$attachments_to_remove = array_diff($attachments_to_remove, $embeds);
Attachment::deleteByIds($attachments_to_remove);
}

Expand All @@ -3146,6 +3149,15 @@ public function processReplyAttachments($request)
];
}

public function decodeAttachmentsIds($attachments_list)
{
foreach ($attachments_list as $i => $attachment_id) {
$attachments_list[$i] = \Helper::decrypt($attachment_id);
}

return $attachments_list;
}

/**
* Undo reply.
*/
Expand Down
2 changes: 1 addition & 1 deletion config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
| or any other location as required by the application or its packages.
*/

'version' => '1.8.129',
'version' => '1.8.130',

/*
|--------------------------------------------------------------------------
Expand Down
30 changes: 15 additions & 15 deletions resources/lang/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
":person added a note": ":person メモを追加しました",
":person added a note to conversation": ":person 会話にメモを追加しました",
":person added a note to conversation #:conversation_number": ":person が会話にメモを追加しました #:conversation_number",
":person assigned :assignee conversation #:conversation_number": ":assignee された :person との会話 #:conversation_number",
":person assigned :assignee conversation #:conversation_number": ":person が :assignee を会話 #:conversation_number に割り当てました",
":person assigned to :assignee": ":person が :assignee を割り当てました",
":person changed the customer to :customer": ":person は顧客を :customer に変更しました",
":person changed the customer to :customer in conversation #:conversation_number": "会話の中で :person が顧客を :customer に変更しました #:conversation_number",
Expand All @@ -36,7 +36,7 @@
":person moved conversation from another mailbox": ":person が別のメールボックスから会話を移動しました",
":person replied": ":person が返信",
":person replied to conversation": ":person が会話に返信しました",
":person replied to conversation #:conversation_number": ":person が会話に返信しました #:conversation_number",
":person replied to conversation #:conversation_number": ":person が会話 #:conversation_number に返信しました",
":person restored": ":person が復元",
":person sent a message": ":person がメッセージを送信しました",
":person started a new conversation #:conversation_number": ":person が新しい会話を開始しました #:conversation_number",
Expand All @@ -45,11 +45,11 @@
":user is viewing": ":user が表示しています",
"<strong>Administrators<\/strong> can create new users and have access to all mailboxes and settings": "<strong>管理者<\/strong>は、新しいユーザーを作成しすべてのメールボックスと設定にアクセスすることができます。",
"<strong>Users<\/strong> have access to the mailbox(es) specified in their permissions": "<strong>ユーザー<\/strong>は、権限で設定されたメールボックスにアクセスすることができます。",
"A conversation :person is following is updated": "フォローしている :person が会話を更新しました。",
"A conversation I'm following is updated": "フォロー中の会話を更新しました",
"A conversation is assigned to :person": "この会話は :person に割り当てられます",
"A conversation is assigned to me": "この会話は私に割り当てされました",
"A conversation is assigned to someone else": "この会話が誰かに割り振られます",
"A conversation :person is following is updated": ":person のフォローしている会話が更新されました",
"A conversation I'm following is updated": "フォローしている会話をが更新されました",
"A conversation is assigned to :person": "会話が :person に割り当てられました",
"A conversation is assigned to me": "会話が私に割り当てられました",
"A conversation is assigned to someone else": "会話が誰かに割り当てられました",
"A new version is available": "新しいバージョンが利用可能です",
"Accepted for delivery": "送信は成功しました",
"Access Settings": "アカウント設定",
Expand Down Expand Up @@ -183,7 +183,7 @@
"Customer Profile": "お客様情報",
"Customer changed": "顧客の変更",
"Customer saved successfully.": "顧客は正常に保存されました。",
"Customer viewed :when": "顧客が閲覧した :when",
"Customer viewed :when": "顧客は :when に閲覧しました",
"Customers": "顧客",
"Customers email this address for help (e.g. [email protected])": "お客様は、このアドレスにヘルプのためのメールを送信します (例: [email protected])",
"Daily": "日次",
Expand Down Expand Up @@ -444,9 +444,9 @@
"Notifications": "通知",
"Notifications saved successfully": "通知の保存に成功しました",
"Notifications will start showing up here soon": "もうすぐここに通知が表示されるようになります",
"Notify :person when a customer replies…": "顧客が返信したときに :person に通知する...",
"Notify :person when another :app_name user replies or adds a note…": "他の :app_name ユーザが返信したり、メモを追加したりしたときに :person に通知します",
"Notify :person when…": "通知 :person when…",
"Notify :person when a customer replies…": "顧客が返信したときに :person に通知します",
"Notify :person when another :app_name user replies or adds a note…": "他の :app_name ユーザーが返信したり、メモを追加したときに :person に通知します",
"Notify :person when…": "次のときに :person に通知します",
"Notify me when a customer replies…": "顧客からの返信があったときに通知する...",
"Notify me when another :app_name user replies or adds a note…": "他の :app_name ユーザが返信したり、メモを追加したりすると通知してくれます。",
"Notify me when…": "いつ通知するか…",
Expand Down Expand Up @@ -642,10 +642,10 @@
"Time Format": "時間フォーマット",
"Timezone": "タイムゾーン",
"To": "宛先",
"To a conversation owned by someone else": "誰かが所有している会話に",
"To an unassigned conversation": "割り当てられていない会話に",
"To one of :person's conversations": ":person の会話のひとつに",
"To one of my conversations": "私の会話の一つに",
"To a conversation owned by someone else": "他の誰かの会話で",
"To an unassigned conversation": "割り当てられていない会話で",
"To one of :person's conversations": ":person の会話で",
"To one of my conversations": "私の会話で",
"To send system emails via webmail providers (Gmail, Yahoo, etc) use only SMTP method and make sure that SMTP username is equal to the mailbox email address (:%mailbox_email%), otherwise webmail provider won't send emails.": "ウェブメールプロバイダー(Gmail、Yahooなど)を介してシステムメールを送信するには、SMTP方式のみを使用し、SMTPユーザー名がメールボックスのメールアドレス( :%mailbox_email%)と等しいことを確認してください。そうでない場合、ウェブメールプロバイダーはメールを送信しません。",
"To the First Message": "最初のメッセージへ",
"Today": "今日",
Expand Down
4 changes: 2 additions & 2 deletions resources/views/js/vars.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
var Vars = {
public_url: '{{ config('app.url') }}',
subtype_forward: '{{ \App\Thread::SUBTYPE_FORWARD }}',
conv_type_phone: '{{ \App\Conversation::TYPE_PHONE }}'
conv_type_custom: '{{ \App\Conversation::TYPE_CUSTOM }}',
conv_type_phone: '{{ \App\Conversation::TYPE_PHONE }}',
conv_type_custom: '{{ \App\Conversation::TYPE_CUSTOM }}'
};

{{--
Expand Down

0 comments on commit 2c39ba9

Please sign in to comment.