@@ -110,6 +110,15 @@ public static function track($input, $command = '')
110
110
}
111
111
}
112
112
}
113
+ } elseif (isset ($ obj ['edited_message ' ])) {
114
+ $ data = $ obj ['edited_message ' ];
115
+ $ event_name = 'Edited Message ' ;
116
+ } elseif (isset ($ obj ['channel_post ' ])) {
117
+ $ data = $ obj ['channel_post ' ];
118
+ $ event_name = 'Channel Message ' ;
119
+ } elseif (isset ($ obj ['edited_channel_post ' ])) {
120
+ $ data = $ obj ['edited_channel_post ' ];
121
+ $ event_name = 'Edited Channel Message ' ;
113
122
} elseif (isset ($ obj ['inline_query ' ])) {
114
123
$ data = $ obj ['inline_query ' ];
115
124
$ event_name = 'Inline Query ' ;
@@ -146,7 +155,7 @@ public static function track($input, $command = '')
146
155
$ responseData = json_decode ($ response , true );
147
156
148
157
if ($ responseData ['status ' ] !== 'accepted ' ) {
149
- error_log ('Botan.io API replied with error: ' . $ response );
158
+ TelegramLog:: debug ('Botan.io API replied with error: ' . $ response );
150
159
}
151
160
152
161
return $ responseData ;
@@ -195,9 +204,7 @@ public static function shortenUrl($url, $user_id)
195
204
if (!filter_var ($ response , FILTER_VALIDATE_URL ) === false ) {
196
205
BotanDB::insertShortUrl ($ user_id , $ url , $ response );
197
206
} else {
198
- // @TODO: Add telegram log
199
- error_log ('Botan.io API replied with error: ' . $ response );
200
-
207
+ TelegramLog::debug ('Botan.io API replied with error: ' . $ response );
201
208
return $ url ;
202
209
}
203
210
0 commit comments