87 Commits

Author SHA1 Message Date
Akulij
9c0e9a5903 fast commit
Some checks failed
Build && Deploy / cargo build (push) Has been cancelled
2025-06-18 23:32:13 +06:00
Akulij
f16554b764 fix: use separate db for tests 2025-06-08 15:38:58 +05:00
Akulij
e239ff1c44 fix test_get_random_users 2025-06-08 15:38:51 +05:00
Akulij
2fefe22846 fix test_drop_media 2025-06-08 15:35:50 +05:00
Akulij
7e01186178 use async_trait for RawCall
All checks were successful
Build && Deploy / cargo build (push) Successful in 1m5s
2025-06-07 03:33:13 +05:00
Akulij
6776716faf fix $crate literal in query_call_consume macro 2025-06-07 02:54:35 +05:00
Akulij
bd8b1e8843 impl GetCollection via async_trait 2025-06-07 02:08:00 +05:00
Akulij
5a7bb0e0f6 clippy fix 2025-06-07 01:50:30 +05:00
Akulij
0bc7978c99 fix deserialization Message's created_at 2025-06-06 01:35:25 +05:00
Akulij
9dfa7c52d9 add field created_at to db::Message struct
All checks were successful
Build && Deploy / cargo build (push) Successful in 1m3s
2025-06-05 21:48:47 +05:00
Akulij
3d293501f2 db: create test for get_random_users 2025-06-02 16:45:32 +05:00
Akulij
597e6de09e db: create get_random_users 2025-06-02 16:45:10 +05:00
Akulij
b2df5bf4f3 db: some functions do not require mut db 2025-06-02 16:44:48 +05:00
Akulij
b8d07d0ad5 create MessageForward.store_db to store by DB type
reason: easier to use with RwLock
2025-05-31 13:45:45 +05:00
Akulij
2e447e87fd create Application.store_db to store by DB type 2025-05-31 13:45:02 +05:00
Akulij
39e376195c create BotInstance::update_script 2025-05-31 10:31:09 +05:00
Akulij
308b15ed69 create BotInstance::restart_one and restart_all 2025-05-31 10:30:39 +05:00
Akulij
102fae25c7 create BotInstance::get_by_name 2025-05-31 10:30:03 +05:00
Akulij
bc2397a32c derive Clone for BotInstance 2025-05-31 10:29:03 +05:00
Akulij
9e99064bc5 create DB.with_name method 2025-05-27 04:09:05 +05:00
Akulij
4be9c034c9 use variable db name instead of hardcoded one 2025-05-26 20:50:25 +05:00
Akulij
cb7c888028 create RawCall trait, that will contain DB methods to call from script runtime 2025-05-26 20:22:46 +05:00
Akulij
a33d4b393c impl GetCollection for CallDB 2025-05-26 20:16:12 +05:00
Akulij
9c15b0a375 create DbCollection and GetCollection traits 2025-05-26 20:15:27 +05:00
Akulij
4c149b6922 create BotInstance collection 2025-05-26 20:12:46 +05:00
Akulij
091a42bf31 fix: message id in MessageForward should be i32 2025-05-08 23:23:39 +03:00
Akulij
2acda3087b create MessageForward 2025-05-08 23:15:54 +03:00
Akulij
d68c7d688c store variants in message info holder
reason: people can go forward with callback and backward and see
defferent message, when they shouldn't
2025-05-04 19:10:33 +03:00
Akulij
12567a6b97 create LiteralAlternative with get/set in db 2025-05-04 17:56:06 +03:00
Akulij
09950579da delete files left after diesel orm 2025-05-03 16:50:35 +03:00
Akulij
5bc6a8343d create Application 2025-05-02 17:07:35 +03:00
Akulij
fdfc8a8270 add metas field to user to store /start meta links 2025-05-02 17:03:48 +03:00
Akulij
d3c8b7605d clippy: fix warnings 2025-05-02 14:50:27 +03:00
Akulij
509f767b1f create CallbackInfo.new_with_literal method
reason: CallbackInfo with literal and without created in completly
differrent usecases, so it will be easier to code with differrent
functions instead of passing Option each time
2025-05-01 14:53:14 +03:00
Akulij
28cffdde16 create literal field in CallbackInfo
reason: to get used literal of button,
for e.g. to edit literals by clicking buttons
2025-05-01 14:50:34 +03:00
Akulij
64641d4101 do not drop indexes in migration 2025-04-30 19:22:17 +03:00
Akulij
0b089113f3 create methods to delete single and all event(s) 2025-04-30 18:55:30 +03:00
Akulij
6f24d92215 drop all previous indexes in migration 2025-04-30 18:08:27 +03:00
Akulij
4d6717967d create AnyCollection type in migration
reason: most of it doesn't need real type,
but will simplificate alot without real ones
2025-04-30 18:07:07 +03:00
Akulij
85f16311fa set mongodb's index to clear callback info after a day 2025-04-30 14:37:45 +03:00
Akulij
f3ec4188bb add created_at field to CallbackInfo 2025-04-30 14:37:12 +03:00
Akulij
58a16a5927 make CallbackInfo::store to consume self and return 2025-04-29 19:51:54 +03:00
Akulij
a00c0017bb create CallbackInfo::get_callback method 2025-04-29 19:51:17 +03:00
Akulij
48bb7b133b make DbError a custom error type to handle internal errors 2025-04-29 19:50:42 +03:00
Akulij
221fb87c8f create query_call_consume macro 2025-04-29 19:31:23 +03:00
Akulij
078e2fd62a create CallbackInfo and its tests 2025-04-29 17:37:20 +03:00
Akulij
0973499652 make query_call macro public 2025-04-29 17:35:49 +03:00
Akulij
b56f07e6be rename db/tests.rs to dt/tests.mod.rs
reason: there will be way more tests, so its better to use multiple
files for them
2025-04-29 11:51:24 +03:00
Akulij
55d393eb2c return result instead of unwraps in db/mod.rs 2025-04-28 22:40:38 +03:00
Akulij
3761cc6fa8 add atribute allow clippy::unwrap_used in tests, since it's what tests should do 2025-04-28 21:07:45 +03:00