Skip to content

Commit

Permalink
Implement Mentionable for Group
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeyla Hellyer committed Jul 15, 2018
1 parent d11d916 commit 8ce8234
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/model/misc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ impl Mentionable for Emoji {
fn mention(&self) -> String { format!("<:{}:{}>", self.name, self.id.0) }
}

impl Mentionable for Group {
fn mention(&self) -> String {
format!("<#{}", self.channel_id.0)
}
}

impl Mentionable for Member {
fn mention(&self) -> String { format!("<@{}>", self.user.with(|u| u.id.0)) }
}
Expand Down

0 comments on commit 8ce8234

Please sign in to comment.