Skip to content

Commit

Permalink
Links are now replaced
Browse files Browse the repository at this point in the history
  • Loading branch information
LuisMayo committed Feb 2, 2021
1 parent c3dc8e1 commit 08fceca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion message.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
from telegram import Update
import re

class Message:
def __init__(self, update: Update):
self.user = User(update.message.forward_from or update.message.forward_sender_name)
self.text = update.message.text
self.text = re.sub(r'(https?)\S*', '(link)', update.message.text)

class User:
def __init__(self, user):
Expand Down

0 comments on commit 08fceca

Please sign in to comment.