mirror of
https://github.com/chatmail/core.git
synced 2026-05-19 06:46:32 +03:00
Rename Chat.set_blocking() into set_blocked()
This commit is contained in:
@@ -114,7 +114,7 @@ impl ChatId {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_blocking(self, context: &Context, new_blocking: Blocked) -> bool {
|
pub fn set_blocked(self, context: &Context, new_blocked: Blocked) -> bool {
|
||||||
if self.is_special() {
|
if self.is_special() {
|
||||||
warn!(context, "ignoring setting of Block-status for {}", self);
|
warn!(context, "ignoring setting of Block-status for {}", self);
|
||||||
return false;
|
return false;
|
||||||
@@ -123,13 +123,13 @@ impl ChatId {
|
|||||||
context,
|
context,
|
||||||
&context.sql,
|
&context.sql,
|
||||||
"UPDATE chats SET blocked=? WHERE id=?;",
|
"UPDATE chats SET blocked=? WHERE id=?;",
|
||||||
params![new_blocking, self],
|
params![new_blocked, self],
|
||||||
)
|
)
|
||||||
.is_ok()
|
.is_ok()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn unblock(self, context: &Context) {
|
pub fn unblock(self, context: &Context) {
|
||||||
self.set_blocking(context, Blocked::Not);
|
self.set_blocked(context, Blocked::Not);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Archives or unarchives a chat.
|
/// Archives or unarchives a chat.
|
||||||
|
|||||||
Reference in New Issue
Block a user