Skip to content

Commit

Permalink
Alias πŸ‘Ž to archiving an article (closes #3)
Browse files Browse the repository at this point in the history
Release as v0.2.4.
  • Loading branch information
jaywink committed Feb 27, 2022
1 parent c43a34c commit 16f05d4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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 βž•.
Expand Down
2 changes: 1 addition & 1 deletion maubot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions pocket/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 16f05d4

Please sign in to comment.