From 16f05d43e88cb8d8356c855f6330f618c0a2f8b8 Mon Sep 17 00:00:00 2001 From: Jason Robinson Date: Sun, 27 Feb 2022 19:22:52 +0200 Subject: [PATCH] =?UTF-8?q?Alias=20=F0=9F=91=8E=20to=20archiving=20an=20ar?= =?UTF-8?q?ticle=20(closes=20#3)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Release as v0.2.4. --- CHANGELOG.md | 4 ++++ maubot.yaml | 2 +- pocket/bot.py | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 689468f..97ddbe6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## v0.2.4 (2022-02-27) + +* Alias 👎 to archiving an article (closes #3) + ## v0.2.3 (2022-02-27) * Add possibility to get another article by reacting with 👍 or ➕. diff --git a/maubot.yaml b/maubot.yaml index f1262ee..f53f1d2 100644 --- a/maubot.yaml +++ b/maubot.yaml @@ -5,7 +5,7 @@ maubot: 0.1.2 id: me.jasonrobinson.pocket # A PEP 440 compliant version string. -version: 0.2.3 +version: 0.2.4 # The SPDX license identifier for the plugin. https://spdx.org/licenses/ # Optional, assumes all rights reserved if omitted. diff --git a/pocket/bot.py b/pocket/bot.py index 0b4e76d..2a28276 100644 --- a/pocket/bot.py +++ b/pocket/bot.py @@ -58,13 +58,13 @@ async def another(self, event: ReactionEvent, _: Tuple[str]) -> None: @staticmethod def format_article_message(article): return f"{article['resolved_title']} - {article['resolved_url']} " \ - f"(✅ to archive, [view in Pocket](https://getpocket.com/read/{article['item_id']}), 👍/➕ for another)" + f"(✅/👎 to archive, [view in Pocket](https://getpocket.com/read/{article['item_id']}), 👍/➕ for another)" @command.passive( event_type=EventType.REACTION, field=lambda e: e.content.relates_to.key, msgtypes=[], - regex=r"\U00002705|\U00002611|\U00002714", + regex=r"\U00002705|\U00002611|\U00002714|\U0001F44E", ) async def archive(self, event: ReactionEvent, _: Tuple[str]) -> None: item_event = self.db.get_user_event(event.sender, event.content.relates_to.event_id)