cli (blog): add --encrypt argument on publication commands to e2ee a blog post:

rel 380
This commit is contained in:
Goffi 2022-10-15 20:37:00 +02:00
commit ba9a4ef31b

View file

@ -173,6 +173,12 @@ class BlogPublishCommon(object):
"--syntax",
help=_("syntax to use (default: get profile's default syntax)"),
)
self.parser.add_argument(
"-e",
"--encrypt",
action="store_true",
help=_("end-to-end encrypt the blog item")
)
async def setMbDataContent(self, content, mb_data):
if self.default_syntax_used:
@ -198,6 +204,8 @@ class BlogPublishCommon(object):
mb_data["title"] = self.args.title
if self.args.language is not None:
mb_data["language"] = self.args.language
if self.args.encrypt:
mb_data["encrypted"] = True
class Set(base.CommandBase, BlogPublishCommon):