mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
Add mention_tag() function to User class
This commit is contained in:
parent
e3b9e5f0f7
commit
f63472e6bf
1 changed files with 6 additions and 0 deletions
|
@ -811,6 +811,12 @@ class User(UserMixin, db.Model):
|
|||
reply.body = reply.body_html = ''
|
||||
db.session.commit()
|
||||
|
||||
def mention_tag(self):
|
||||
if self.ap_domain is None:
|
||||
return '@' + self.user_name + '@' + current_app.config['SERVER_NAME']
|
||||
else:
|
||||
return '@' + self.user_name + '@' + self.ap_domain
|
||||
|
||||
|
||||
class ActivityLog(db.Model):
|
||||
id = db.Column(db.Integer, primary_key=True)
|
||||
|
|
Loading…
Add table
Reference in a new issue