Allows to add content warnings when writing a toot

This commit is contained in:
2022-11-11 16:21:15 -06:00
parent 2c298577cc
commit 3a3cb3963c
3 changed files with 19 additions and 3 deletions

View File

@@ -32,7 +32,9 @@ class toot(messages.basicTweet):
def add_toot(self, event, update_gui=True, *args, **kwargs):
text = self.message.text.GetValue()
attachments = self.attachments[::]
tootdata = dict(text=text, attachments=attachments)
tootdata = dict(text=text, attachments=attachments, sensitive=self.message.sensitive.GetValue(), spoiler_text=None)
if tootdata.get("sensitive") == True:
tootdata.update(spoiler_text=self.message.spoiler.GetValue())
self.thread.append(tootdata)
self.attachments = []
if update_gui: