Skip to content

Commit e017eff

Browse files
committed
Merge branch 'share_chats_refactor' into dev
2 parents f9e6ff6 + b826f64 commit e017eff

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+531
-325
lines changed

commands/delete.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
if($query->rowCount() == 0) {
3131
$msg = '<b>' . getTranslation('no_active_raids_found') . '</b>';
32-
send_message($update['message']['chat']['id'], $msg);
32+
send_message(create_chat_object([$update['message']['chat']['id']]), $msg);
3333
exit;
3434
}
3535

@@ -66,4 +66,4 @@
6666
$callback_response = 'OK';
6767

6868
// Send message.
69-
send_message($update['message']['chat']['id'], $msg, $keys, ['reply_markup' => ['selective' => true, 'one_time_keyboard' => true]]);
69+
send_message(create_chat_object([$update['message']['chat']['id']]), $msg, $keys, ['reply_markup' => ['selective' => true, 'one_time_keyboard' => true]]);

commands/events.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@
2525
$keys[][] = button(getTranslation('done'), ['exit', 'd' => '1']);
2626

2727
// Send message.
28-
send_message($update['message']['chat']['id'], $msg, $keys, ['reply_markup' => ['selective' => true, 'one_time_keyboard' => true]]);
28+
send_message(create_chat_object([$update['message']['chat']['id']]), $msg, $keys, ['reply_markup' => ['selective' => true, 'one_time_keyboard' => true]]);

commands/exreport.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,4 @@
8585
$msg = '<b>EX Raid Report</b>';
8686

8787
// Send message.
88-
send_message($update['message']['chat']['id'], $msg, $keys, ['reply_markup' => ['selective' => true, 'one_time_keyboard' => true]]);
88+
send_message(create_chat_object([$update['message']['chat']['id']]), $msg, $keys, ['reply_markup' => ['selective' => true, 'one_time_keyboard' => true]]);

commands/friendsearch.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@
2323
}else {
2424
$msg = $searchterm.CR. getTranslation('trainer_not_found');
2525
}
26-
send_message($update['message']['chat']['id'], $msg, [], ['reply_markup' => ['selective' => true]]);
26+
send_message(create_chat_object([$update['message']['chat']['id']]), $msg, [], ['reply_markup' => ['selective' => true]]);

commands/get.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141

4242
// Any configs allowed?
4343
if(empty($allowed)) {
44-
send_message($update['message']['chat']['id'], getTranslation('not_supported'));
44+
send_message(create_chat_object([$update['message']['chat']['id']]), getTranslation('not_supported'));
4545
exit;
4646
}
4747
foreach($json as $cfg_name => $cfg_value) {
@@ -69,4 +69,4 @@
6969
$msg .= CR;
7070
}
7171
}
72-
send_message($update['message']['chat']['id'], $msg);
72+
send_message(create_chat_object([$update['message']['chat']['id']]), $msg);

commands/gym.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@
2020
$msg.= $keys_and_gymarea['gymareaTitle'];
2121

2222
// Send message.
23-
send_message($update['message']['chat']['id'], $msg, $keys, ['reply_markup' => ['selective' => true, 'one_time_keyboard' => true], 'disable_web_page_preview' => 'true']);
23+
send_message(create_chat_object([$update['message']['chat']['id']]), $msg, $keys, ['reply_markup' => ['selective' => true, 'one_time_keyboard' => true], 'disable_web_page_preview' => 'true']);

commands/gymname.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@
5050
}
5151

5252
// Send message.
53-
send_message($update['message']['chat']['id'], $msg, [], ['reply_markup' => ['selective' => true, 'one_time_keyboard' => true], 'disable_web_page_preview' => 'true']);
53+
send_message(create_chat_object([$update['message']['chat']['id']]), $msg, [], ['reply_markup' => ['selective' => true, 'one_time_keyboard' => true], 'disable_web_page_preview' => 'true']);

commands/help.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
}
5959
$keys[][] = button(getTranslation('next'), 'tutorial');
6060
$photo = $tutorial[0]['photo'];
61-
send_photo($update['message']['from']['id'],$photo, false, $msg, $keys, ['disable_web_page_preview' => 'true']);
61+
send_photo(create_chat_object([$update['message']['from']['id']]),$photo, false, $msg, $keys, ['disable_web_page_preview' => 'true']);
6262
exit();
6363

6464
// No help for the user.
@@ -67,4 +67,4 @@
6767
}
6868

6969
// Send message.
70-
send_message($update['message']['from']['id'], $msg);
70+
send_message(create_chat_object([$update['message']['chat']['id']]), $msg);

commands/history.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@
2020
$keys = $msg_keys[1];
2121
}
2222

23-
send_message($update['message']['chat']['id'], $msg, $keys, ['reply_markup' => ['selective' => true, 'one_time_keyboard' => true], 'disable_web_page_preview' => 'true']);
23+
send_message(create_chat_object([$update['message']['chat']['id']]), $msg, $keys, ['reply_markup' => ['selective' => true, 'one_time_keyboard' => true], 'disable_web_page_preview' => 'true']);

commands/list.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
// Did we get any raids?
4646
if(count($raids) == 0) {
4747
$msg = '<b>' . getTranslation('no_active_raids_found') . '</b>';
48-
send_message($update['message']['chat']['id'], $msg, [], ['reply_markup' => ['selective' => true, 'one_time_keyboard' => true]]);
48+
send_message(create_chat_object([$update['message']['chat']['id']]), $msg, [], ['reply_markup' => ['selective' => true, 'one_time_keyboard' => true]]);
4949
exit();
5050
}
5151

@@ -98,4 +98,4 @@
9898
$msg .= '<b>' . getTranslation('select_gym_name') . '</b>' . CR;
9999

100100
// Send message.
101-
send_message($update['message']['chat']['id'], $msg, $keys, ['reply_markup' => ['selective' => true, 'one_time_keyboard' => true]]);
101+
send_message(create_chat_object([$update['message']['chat']['id']]), $msg, $keys, ['reply_markup' => ['selective' => true, 'one_time_keyboard' => true]]);

0 commit comments

Comments
 (0)