add: channel mutes
This commit is contained in:
parent
02f3d08926
commit
884a89904e
17 changed files with 149 additions and 7 deletions
|
@ -86,6 +86,9 @@ pub struct User {
|
|||
/// The reason the user was banned.
|
||||
#[serde(default)]
|
||||
pub ban_reason: String,
|
||||
/// IDs of channels the user has muted.
|
||||
#[serde(default)]
|
||||
pub channel_mutes: Vec<usize>,
|
||||
}
|
||||
|
||||
pub type UserConnections =
|
||||
|
@ -387,6 +390,7 @@ impl User {
|
|||
browser_session: String::new(),
|
||||
seller_data: StripeSellerData::default(),
|
||||
ban_reason: String::new(),
|
||||
channel_mutes: Vec::new(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -144,6 +144,8 @@ pub enum AppScope {
|
|||
UserManageServices,
|
||||
/// Manage the user's products.
|
||||
UserManageProducts,
|
||||
/// Manage the user's channel mutes.
|
||||
UserManageChannelMutes,
|
||||
/// Edit posts created by the user.
|
||||
UserEditPosts,
|
||||
/// Edit drafts created by the user.
|
||||
|
|
|
@ -131,9 +131,14 @@ impl CustomEmoji {
|
|||
if emoji.1 == 0 {
|
||||
out = out.replace(
|
||||
&emoji.0,
|
||||
match emojis::get_by_shortcode(&emoji.2) {
|
||||
Some(e) => e.as_str(),
|
||||
None => &emoji.0,
|
||||
match emoji.2.as_str() {
|
||||
"100" => "💯",
|
||||
"thumbs_up" => "👍",
|
||||
"thumbs_down" => "👎",
|
||||
_ => match emojis::get_by_shortcode(&emoji.2) {
|
||||
Some(e) => e.as_str(),
|
||||
None => &emoji.0,
|
||||
},
|
||||
},
|
||||
);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue