utils: Change the user_id type to i64

user_id is of type i64 in User struct (bd104a0a08/src/types/user.rs (L10))

Signed-off-by: dracarys18 <karthihegde010@gmail.com>
This commit is contained in:
dracarys18 2021-07-03 17:31:57 +05:30
parent e40d0e7edf
commit 1f1a3abd6b
3 changed files with 3 additions and 2 deletions

View file

@ -40,6 +40,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `Noop` and `AsyncStopToken`stop tokens.
- `StatefulListener`.
- Emit not only errors but also warnings and general information from teloxide, when set up by `enable_logging!`.
- `user_id` should be passed as i64 in `html::user_mention` and `markdown::user_mention`.
### Fixed

View file

@ -44,7 +44,7 @@ pub fn link(url: &str, text: &str) -> String {
}
/// Builds an inline user mention link with an anchor.
pub fn user_mention(user_id: i32, text: &str) -> String {
pub fn user_mention(user_id: i64, text: &str) -> String {
link(format!("tg://user?id={}", user_id).as_str(), text)
}

View file

@ -59,7 +59,7 @@ pub fn link(url: &str, text: &str) -> String {
}
/// Builds an inline user mention link with an anchor.
pub fn user_mention(user_id: i32, text: &str) -> String {
pub fn user_mention(user_id: i64, text: &str) -> String {
link(format!("tg://user?id={}", user_id).as_str(), text)
}