Commit graph

73 commits

Author SHA1 Message Date
baalajimaestro 78964cdd45
Allow admins to forego ratelimits
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2022-05-08 21:46:46 +05:30
baalajimaestro 99868f5986
Add back stripping and use GCC LTO
I have tested this to work fine for a few days now

Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2022-05-08 20:29:52 +05:30
baalajimaestro 33cb215065
Revert: Switch to LXC Runner
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2022-05-08 18:27:02 +05:30
baalajimaestro c20a075605
Remove LTO, potential cause of memleak
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2022-05-01 03:06:31 +05:30
baalajimaestro b0a7dfff00
Use openssl 3.0 to statically link
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2022-05-01 03:05:47 +05:30
baalajimaestro 924256b085
Partially Revert the performance improvments
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2022-05-01 02:47:42 +05:30
baalajimaestro 8927631239
Postgres is no longer supported
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2022-04-26 12:29:24 +05:30
baalajimaestro 28e703b563
Use scratch container instead of using distroless
We save more storage by moving to scratch

Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2022-04-25 12:32:20 +05:30
baalajimaestro 3ff60f8c18
Align the deps properly
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2022-04-25 12:21:13 +05:30
baalajimaestro 16e6d2f724
Revert: Move to libressl
Libressl does bring 1mb improvement, but its causing issues

Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2022-04-25 12:17:53 +05:30
baalajimaestro 7ffa1bdabf
Strip the binaries further to reduce size
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2022-04-25 11:43:54 +05:30
baalajimaestro 82f90edec7
Silence autogen output
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2022-04-25 11:43:26 +05:30
baalajimaestro 13d08267a7
Enable panics
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2022-04-25 11:42:45 +05:30
baalajimaestro 1a736e84ce
Use libressl from source instead of openssl
Brings down our binary size by another mb

Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2022-04-25 11:42:08 +05:30
baalajimaestro 6d7ecb36a0
Add back forgotten clang
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2022-04-25 11:38:19 +05:30
baalajimaestro b8b09f17a8
Use gc arc
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2022-04-25 11:15:44 +05:30
baalajimaestro 3cb6f91086
Some more size optimizations
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2022-04-25 10:33:18 +05:30
baalajimaestro 37c7687784
Dont run runtime safety checks
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2022-04-25 10:32:14 +05:30
baalajimaestro 26fedf56b0
Use LLD linker
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2022-04-25 10:27:55 +05:30
baalajimaestro a49e047457
Do full LTO instead of thinLTO
Saves us 0.85MB

Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2022-04-25 10:27:35 +05:30
baalajimaestro 15dbf2f29d
Do LTO on the binary
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2022-04-25 10:08:24 +05:30
baalajimaestro c77bc890cb
Optimize for speed instead of size
The gain is actually just 0.2MB

Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2022-04-25 10:07:06 +05:30
baalajimaestro 3939ad5069
Use NSFW instead of Censored in output
We should be clear to tell users that the media is nsfw and its fully at their own risk

Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2022-04-23 18:38:51 +05:30
baalajimaestro 26aaa13f60
Fix start command
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2022-04-17 20:24:20 +05:30
baalajimaestro 1953d6f2cf
Dont send ftype on album
Album can contain heterogeneous types

Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2022-04-17 20:20:59 +05:30
baalajimaestro c7d6d284b6
Uprev bot version
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2022-04-17 20:18:38 +05:30
baalajimaestro 82083fedf7
Split strings for readability
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2022-04-17 20:17:40 +05:30
baalajimaestro 31ae8e1c1f
Make imports much cleaner
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2022-04-17 20:05:10 +05:30
baalajimaestro 010c834aac
Source code command to make the user clear on the bot source
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2022-04-17 20:03:44 +05:30
baalajimaestro af6d4d68ab
Capitalize on inline
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2022-04-17 19:56:01 +05:30
baalajimaestro d939f6942e
Drop unused import
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2022-04-17 19:43:43 +05:30
baalajimaestro 512cb26cba
Process inline queries for sharing
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2022-04-17 19:42:35 +05:30
baalajimaestro bb22849959
Dont handle non-message updates
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2022-04-17 19:41:58 +05:30
baalajimaestro 5eac4c95d5
Move the response to switchinline
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2022-04-17 15:01:08 +05:30
baalajimaestro ed158f0a47
Poll when webhook domain is missing
Hooks is not very easy to setup, so lets fallback to polling if the hook domain is not defined

Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2022-04-11 18:15:59 +05:30
baalajimaestro 9c9a7f71f3
Dont allow older versions for norm and telebot
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2022-04-11 16:10:24 +05:30
baalajimaestro acb3d241dc
Expose 8080 automatically from dockerfile for service discovery
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2022-04-11 15:45:42 +05:30
baalajimaestro 3e5c1b415f
Enable webhooks on bot
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2022-04-11 15:45:01 +05:30
baalajimaestro b90725d35b
Add an unban handler, helps unban mistakely auto-banned users
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2022-04-11 15:24:22 +05:30
baalajimaestro 11cbdcaced
Decouple the commands into independent handlers
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2022-04-11 15:08:42 +05:30
baalajimaestro 28ed91a0b6
Run via LXC container
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2022-04-11 13:23:43 +05:30
baalajimaestro 44789e29bf
Add a gitlab-ci.yml to build and push the image
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2022-04-11 12:53:42 +05:30
baalajimaestro 5efcf196f5
Silence all logs
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2022-04-11 12:49:45 +05:30
baalajimaestro 0bd5a5eb40
Improve Dockerfile
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2022-04-11 12:44:51 +05:30
baalajimaestro c5f4b66d25
Add a dockerfile and statically link everything
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2022-04-11 12:27:15 +05:30
baalajimaestro fbda01b355
Add a nice README
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2022-04-11 11:52:47 +05:30
baalajimaestro 278a256d64
Add some comments
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2022-04-11 11:45:19 +05:30
baalajimaestro a8bde2f198
License under AGPL
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2022-04-11 11:36:32 +05:30
baalajimaestro eb7f3b76c6
Beautify the message sent
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2022-04-11 11:30:18 +05:30
baalajimaestro e8efd87f71
Modify the functions to reflect the change in schema
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
2022-04-11 09:50:07 +05:30