Commit Graph

132 Commits

Author SHA1 Message Date
levlam c8bc4c9d3a Add editChatInviteLink method. 2021-02-25 22:25:33 +03:00
levlam 1db5521027 Add fast path in check_message. 2021-02-25 22:11:11 +03:00
levlam 90d29edcce Add Chat.message_auto_delete_time field. 2021-02-25 22:00:17 +03:00
levlam 685e6bf87d Update TDLib to 1.7.2. Add createChatInviteLink method. 2021-02-25 21:29:30 +03:00
SMAZNet ebedcc056b
Fix file_path doesnt exists on getFile method (#55)
* Fix file_path doesnt exists on getFile method

This PR fixes file_path doesnt exists on getFile method when localmode enabled and filesize is bigger than limit

* added check parameters_->no_file_limit_
2021-02-19 22:05:30 +01:00
levlam ae56eee88f Avoid some string copies. 2021-02-18 22:41:59 +03:00
levlam 2ab19c5948 Support revoke_messages for groups in kickChatMember. 2021-02-17 20:43:55 +03:00
levlam e605063da6 Update TDLib. 2021-02-17 17:23:58 +03:00
levlam 4bb09ffd63 Add message_auto_delete_time_changed service message. 2021-02-17 15:45:24 +03:00
levlam 35aa4d30a4 Add related to voice chat service messages. 2021-02-17 14:45:22 +03:00
levlam a01c36ec1f Allow to change memory log verbosity level. 2021-02-15 01:23:18 +03:00
levlam f781aab119 Add webhook response time to log. 2021-02-03 17:32:43 +03:00
levlam 8b2926a92f Improve error message on wrong API ID specified. 2021-02-01 15:44:32 +03:00
levlam 08ba28539f Return error 500 if sent message was immediately deleted and can't be returned. 2021-01-27 00:57:51 +03:00
Luckydonald de05b42272
Stats: json format (#22)
The work regarding #17.

With 374928c we could merge a working version where the json is still missing a few fields, to iterate from there.

It is available via the normal stats endpoint by calling /json as the path.
Everything else will have the old text style.
2021-01-24 18:09:53 +01:00
luckydonald a497ebc544 Added back the 'method not found' part.
As this will also be the error message if you do /bot1231:23123/fooBarXYZ, this should still keep the 'method not found' part.
2021-01-21 15:16:58 +01:00
luckydonald 7e86d31953 Allow at least the camelcase version, too.
Addresses tdlight-team/tdlight-telegram-bot-api#43.
2021-01-18 00:18:32 +01:00
luckydonald a6463a9010 Improved error message if the authentication is not yet completed. 2021-01-18 00:18:32 +01:00
luckydonald 011b573a8e Fix leaking the user's phone in the id field of the stats.
Improves tdlight-team/tdlight-telegram-bot-api#48 a bit.
2021-01-18 00:18:32 +01:00
levlam d9c247e5ed Improve warning messages. 2021-01-15 16:54:14 +03:00
levlam fcdb824f86 Remove pending_update_count_ field. 2021-01-15 16:40:20 +03:00
levlam 789d5bb610 Remove unused field and improve pending_update_count_ field name. 2021-01-15 15:41:55 +03:00
levlam baa16f5e87 Improve HTTP error code for requests with unacceptable bot token. 2021-01-15 15:33:57 +03:00
levlam a1e7249750 Update copyright year. 2021-01-06 17:24:16 +03:00
Andrea Cavalli ddf2b7196f Add missing message_thread_id_ 2021-01-06 12:01:23 +01:00
Andrea Cavalli cda2030584 Implement message_thread_id 2021-01-06 11:16:32 +01:00
Jannik 954bc416c3
User only methods (#25)
Co-authored-by: code1mountain <none>
Co-authored-by: luckydonald <mac2019.git@luckydonald.de>
2021-01-02 12:32:34 +01:00
levlam 525b8ff2f9 Start webhook connection creation in inactive mode. 2021-01-01 16:27:36 +03:00
levlam 81b25986e1 Output fatal errors to both logs. 2020-12-30 21:50:52 +03:00
levlam 874474ddab Improve verbosity level change. 2020-12-30 17:28:44 +03:00
Jannik b99a45bbf8
Fix crash with service messages 2020-12-23 17:36:12 +01:00
Luckydonald c08d466be0
Stats: hide sensible data (#24)
Adds the --stats-hide-sensible-data flag (Docker: $TELEGRAM_STAT_HIDE_SENSIBLE_DATA=1), removing the bot token and the webhook url from the stats endpoint.
2020-12-15 17:43:20 +01:00
Giuseppe Marino a02597bfb0
Added getMemoryStats query 2020-12-13 15:23:41 +01:00
Jannik 100a7cc846
Allow Users to use the bot api (#19)
Co-authored-by: Jannik <none>
2020-12-12 00:45:36 +01:00
levlam 8cc6d61d39 Add the field InlineQuery.chat_type, which can be sent by the server in the distant future. 2020-12-08 03:57:25 +03:00
levlam e184e6c117 Update TDLib. Support can_manage_voice_chats administrator right. 2020-12-08 03:29:19 +03:00
Andrea Cavalli 8f0f343203 Merge commit 'e2ae8dad02a7c0046e162e12bc0c0c077fff5d14'
Conflicts:
	td
	telegram-bot-api/ClientParameters.h
2020-12-02 23:34:56 +01:00
levlam e2ae8dad02 Update version to 5.0.1. 2020-11-28 21:10:53 +03:00
levlam 03a8573a03 Do not update ServerCpuStat too often. 2020-11-28 21:10:19 +03:00
levlam 67a477f471 Update TDLib. 2020-11-28 21:07:44 +03:00
levlam 81b2334a31 Fix media_group_id of messages automatically forwarded to discussion group. 2020-11-26 19:31:07 +03:00
levlam 72b3f6ea4d Improve webhook updates delaying. 2020-11-26 19:12:19 +03:00
levlam 1f8116b21d Improve log messages. 2020-11-26 18:09:18 +03:00
andrew-ld 9b14e5c1b8
Merge pull request #10 from tdlight-team/issue#9
Allow check_message for non-member channels
2020-11-24 09:42:00 +01:00
Giuseppe Marino 55ee7aed4a
Skip check only if not supergroup 2020-11-24 09:22:16 +01:00
Giuseppe Marino fda54d44dc
Fix build 2020-11-24 01:12:39 +01:00
Giuseppe Marino b99c85a726
Allow check_message for non-member channels/SGs 2020-11-23 23:44:34 +01:00
Andrea Cavalli 9212b8c4ee Merge remote-tracking branch 'github-origin/master' 2020-11-23 17:29:13 +01:00
levlam 4d025b1c9b Safer handling of negative monotonic time. 2020-11-21 17:46:18 +03:00
levlam 79134758a8 Use "time" for monotonic time variables. 2020-11-21 17:38:11 +03:00
Kunoi Sayami f419509029
Add missing log part (#30) 2020-11-20 18:11:23 +03:00
Jannik d9b1d58b66
Receive Updates for Media with destruction timer 2020-11-19 17:18:49 +01:00
giuseppeM99 e762e9e832
Merge pull request #5 from code1mountain/verified_scam
Added is_verified and is_scam
2020-11-18 17:04:39 +01:00
Jannik e247007199 Added ping command 2020-11-18 07:04:03 -08:00
Jannik 1b6bb14ff6
Added is_verified and is_scam 2020-11-18 15:12:32 +01:00
Jannik e79d3b775e
Added is_verified and is_scam to User and Chat objects 2020-11-18 15:11:47 +01:00
Marco Aceti b3c0c403e8
Fix typos 2020-11-12 23:40:31 +01:00
Marco Aceti 8524f94883
Add --no-file-limit option
Co-Authored-By: giuseppeM99 <giuseppe.marino1999@gmail.com>
2020-11-12 23:15:49 +01:00
Giuseppe Marino 25d1ee172b
add `--max-batch-operations` parameter (default 10000) 2020-11-11 20:09:21 +01:00
Giuseppe Marino fc0a6e10cc
td splits automatically 2020-11-11 20:09:21 +01:00
Giuseppe Marino cb7dcb5c0b
Implemented `deleteMessages` method
parameters:
- chat_id the chat_id of the supergroup or channel
- start first message id to delete
- end last message id to delete
the method will always return `true` as a result, even if the messages 
cannot be deleted
this method does not work on private chat or normal groups
it is not suggested to delete more than 200 messages per call
2020-11-11 20:09:21 +01:00
Giuseppe Marino 0c5a139146
added `is_deleted` field in `User` type 2020-11-11 20:09:20 +01:00
Giuseppe Marino 00165a7ef5
Clang format 2020-11-11 20:09:20 +01:00
Giuseppe Marino 0624215988
Implemented getParticipants
- method `getParticipants` : `chat_id`, `type`
-- `type` is string, possible values are
    `members`, `parameters`, `admins`, `administators`, `restricted`, 
`banned`, `bots`
-- return type: array of `ChatMember`

- edits to the `ChatMember` type:
-- now the full bot list is returned
-- new `joined_date` field (type integer)
-- new `inviter` field (type User)
2020-11-11 20:09:20 +01:00
Giuseppe Marino d3a038f35d
allow insecure connections (Cherry pick) 2020-11-11 20:09:17 +01:00
Andrea Cavalli 185885c2d2 Add custom methods 2020-11-10 16:37:01 +01:00
Andrea Cavalli bf60b37eda Merge commit '9692d581953d553b9bf2055d9bb89f960fd07739' 2020-11-10 16:35:27 +01:00
Andrea Cavalli 25e10ef243 Add http-ip-address and http-stat-ip-address options 2020-11-10 16:34:21 +01:00
Giuseppe Marino a5a0c49467
Custom methods
* Added custom methods
  - getMessageInfo
  - getParticipants
  - deleteMessages
  - toggleGroupInvite

* Implemented method getMessageInfo
* added `views` field and `forwards` field to message
* getChat now resolves the username also for users

* Added custom executable flags
  - relative : use relative path for files in local mode
  - insecure (not implemented) : allow http connection in non-local mode
2020-11-10 16:14:44 +01:00
levlam 9692d58195 Run cron strictly each second. 2020-11-10 02:27:18 +03:00
levlam c7769ea299 Add http-ip-address and http-stat-ip-address options. 2020-11-10 02:15:40 +03:00
Andrea Cavalli 1f2e2707cb Merge commit 'eafc9d2caa38813caccdf2d93a0fb9f026358009' 2020-11-08 17:33:32 +01:00
Andrea Cavalli 01c4a80ceb Implement optimize_memory correctly 2020-11-08 17:30:06 +01:00
levlam 5ca1c098bc Remove useless check. 2020-11-08 18:14:22 +03:00
Andrea Cavalli 73d3d8b9d6 Merge commit 'cbd974f850e4ed76346f8a4087b3370f8b96ae05'
Conflicts:
	td
2020-11-08 13:45:34 +01:00
levlam 94846848b7 Make Client.start_up private. 2020-11-07 19:34:21 +03:00
levlam bdc8ef52e9 Fix possible CE. 2020-11-07 19:31:00 +03:00
Andrea Cavalli 38ec055387 Merge commit '91db058809e6f14f6aa22d2f09e0a969676bf4e6' 2020-11-05 17:35:21 +01:00
levlam 91db058809 Add filter option argument checks. 2020-11-05 17:55:13 +03:00
demget 2dd7ef910f
Fix usage message typo (#8) 2020-11-05 17:47:21 +03:00
Andrea Cavalli f4e3987860 Add optimize_memory command 2020-11-05 13:12:05 +01:00
levlam 74559bab15 Telegram Bot APi server initial commit. 2020-11-03 19:34:10 +03:00