Merge pull request #141 from zeronet-conservancy/mute_reason
ask for optional mute reason
This commit is contained in:
commit
ae1734ed08
1 changed files with 5 additions and 8 deletions
|
@ -56,14 +56,11 @@ class UiWebsocketPlugin(object):
|
|||
|
||||
@flag.no_multiuser
|
||||
def actionMuteAdd(self, to, auth_address, cert_user_id, reason):
|
||||
if "ADMIN" in self.getPermissions(to):
|
||||
self.cbMuteAdd(to, auth_address, cert_user_id, reason)
|
||||
else:
|
||||
self.cmd(
|
||||
"confirm",
|
||||
[_["Hide all content from <b>%s</b>?"] % html.escape(cert_user_id), _["Mute"]],
|
||||
lambda res: self.cbMuteAdd(to, auth_address, cert_user_id, reason)
|
||||
)
|
||||
self.cmd(
|
||||
"prompt",
|
||||
[_["Hide all content from <b>%s</b>?"] % html.escape(cert_user_id), reason, _["Mute"]],
|
||||
lambda res: self.cbMuteAdd(to, auth_address, cert_user_id, res if res else reason)
|
||||
)
|
||||
|
||||
@flag.no_multiuser
|
||||
def cbMuteRemove(self, to, auth_address):
|
||||
|
|
Loading…
Reference in a new issue