Skip to content

Commit aa5cb55

Browse files
committed
Insert a zero-width space in the nickname to prevent autopinging
1 parent ed6ef63 commit aa5cb55

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

server.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ async def github(request):
9999
if hook_type == "push":
100100
commits = request.json["commits"]
101101
user = request.json["pusher"]["name"]
102+
# Add an invisible character to prevent pinging the user
103+
# if their Matrix and github nickname are the same
104+
user = user[1] + '​' + user[1:]
105+
102106
branch = request.json["ref"].split("/", 2)[2]
103107

104108
if len(commits) == 1:

0 commit comments

Comments
 (0)