add: chat message reactions
This commit is contained in:
parent
a4298f95f6
commit
a37312fecf
20 changed files with 557 additions and 25 deletions
|
@ -16,12 +16,16 @@ use tetratto_core::model::{
|
|||
|
||||
/// Expand a unicode emoji into its Gemoji shortcode.
|
||||
pub async fn get_emoji_shortcode(emoji: String) -> impl IntoResponse {
|
||||
match emojis::get(&emoji) {
|
||||
Some(e) => match e.shortcode() {
|
||||
Some(s) => s.to_string(),
|
||||
None => e.name().replace(" ", "-"),
|
||||
match emoji.as_str() {
|
||||
"👍" => "thumbs_up".to_string(),
|
||||
"👎" => "thumbs_down".to_string(),
|
||||
_ => match emojis::get(&emoji) {
|
||||
Some(e) => match e.shortcode() {
|
||||
Some(s) => s.to_string(),
|
||||
None => e.name().replace(" ", "-"),
|
||||
},
|
||||
None => String::new(),
|
||||
},
|
||||
None => String::new(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue