mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-23 06:51:01 +01:00
Remove trailing /
from Message::url
This commit is contained in:
parent
5e5b8e46a3
commit
3e6b39c48f
2 changed files with 4 additions and 2 deletions
|
@ -9,9 +9,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
- Build with particular crates versions (enable `"codec"` feature of `tokio-util`) ([#225][pr225])
|
||||
- Fix incorrect panic in `User::is_channel` ([#222][pr222])
|
||||
- Remove trailing `/` from `Message::url` (on ios it caused problems) ([#223][pr223])
|
||||
|
||||
[pr225]: https://github.com/teloxide/teloxide-core/pull/225
|
||||
[pr222]: https://github.com/teloxide/teloxide-core/pull/222
|
||||
[pr223]: https://github.com/teloxide/teloxide-core/pull/223
|
||||
|
||||
### Added
|
||||
|
||||
|
|
|
@ -1107,10 +1107,10 @@ impl Message {
|
|||
let url = match self.chat.username() {
|
||||
// If it's public group (i.e. not DM, not private group), we can produce
|
||||
// "normal" t.me link (accessible to everyone).
|
||||
Some(username) => format!("https://t.me/{0}/{1}/", username, self.id),
|
||||
Some(username) => format!("https://t.me/{0}/{1}", username, self.id),
|
||||
// For private supergroups and channels we produce "private" t.me/c links. These are
|
||||
// only accessible to the group members.
|
||||
None => format!("https://t.me/c/{0}/{1}/", chat_id, self.id),
|
||||
None => format!("https://t.me/c/{0}/{1}", chat_id, self.id),
|
||||
};
|
||||
|
||||
// UNWRAP:
|
||||
|
|
Loading…
Reference in a new issue