Skip to content

Commit

Permalink
Fixed error where plugin would check all links containing 'r/'
Browse files Browse the repository at this point in the history
  • Loading branch information
TomCasavant committed Apr 17, 2019
1 parent 3656a84 commit c3fb1d6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion maubot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ maubot: 0.1.0
id: casavant.tom.reddit

# A PEP 440 compliant version string.
version: 1.1.0
version: 1.2.0

# The SPDX license identifier for the plugin. https://spdx.org/licenses/
# Optional, assumes all rights reserved if omitted.
Expand Down
2 changes: 1 addition & 1 deletion reddit.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from maubot.handlers import command

class RedditPlugin(Plugin):
@command.passive("(r/)([^\s]+)", multiple=True)
@command.passive("(^r\/)([^\s]+)", multiple=True)
async def handler(self, evt: MessageEvent, subs: List[Tuple[str, str]]) -> None:
await evt.mark_read()
subreddits = [] # List of all subreddits given by user
Expand Down

0 comments on commit c3fb1d6

Please sign in to comment.