Logo
Explore Help
Sign In
unfunny/baibot-withmcp
1
0
Fork 0
You've already forked baibot-withmcp
Code Issues Pull Requests Actions Packages Projects Releases Wiki Activity
Files
8bd313f0d41519d752e7d830d2142bb9d102479c
baibot-withmcp/src/entity/cfg/mod.rs

6 lines
78 B
Rust
Raw Normal View History

Initial commit
2024-09-12 13:44:06 +03:00
mod config;
pub mod defaults;
pub mod env;
Add support for custom avatars (via file path) and for not touching the already-set avatar This is based on the work done in https://github.com/etkecc/baibot/pull/60 by https://github.com/Fmstrat (Ben Curtis), with various changes on top to make the code more idiomatic and flexible. This commit squashes the following patches (newest first): - Improve handling of `user.avatar` configuration (null & empty string being the same now) and add support for a special `keep` value - Minor import reordering - Simplify avatar configuration (`user.avatar.source` -> `user.avatar`) - Combine `logo_bytes` and `mime_type` determination logic and do not fall back to default avatar if reading the custom avatar file fails - Switch from deprecated `mime_guess::guess_mime_type(avatar_path)` to `mime_guess::from_path(avatar_path).first_or_octet_stream()` - Relax `mime_guess` constraint and order alphabetically - Use `mime` from `mxlink` - Add mime-type support and switch to user.avatar.source - (Original work by Fmstrat) Add support for custom avatars Co-authored-by: Fmstrat <nospam@nowsci.com>
2025-12-15 08:07:24 +02:00
pub use config::{Avatar, Config};
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.5 Page: 74ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API