Skip to content

Commit

Permalink
Merge pull request #15 from sopel-irc/tighten-i-link-matching
Browse files Browse the repository at this point in the history
Avoid matching e.g. `/i/events/1234567890` as a link to i's user profile
  • Loading branch information
dgw authored May 4, 2020
2 parents 9f7a977 + ae756a6 commit c88ec4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sopel_modules/twitter/twitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def format_time(bot, trigger, stamp):
bot.db, bot.config, tz, trigger.nick, trigger.sender, parsed)


@module.url(r'https?://twitter\.com/(?P<user>[^/]*)(?:/status/(?P<status>\d+))?.*')
@module.url(r'https?://twitter\.com/(?P<user>[^/]+)(?:$|/status/(?P<status>\d+)).*')
@module.url(r'https?://twitter\.com/i/web/status/(?P<status>\d+).*')
def get_url(bot, trigger, match):
try:
Expand Down

0 comments on commit c88ec4d

Please sign in to comment.