Pinging discord users #2
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
If XMPP users ping discord users, and it's followed by punctuation, it won't work
e.g.
@scoliono,Pinging also does not work if a ping is preceded by punctuation, as in
(@example).The problem how the Matterbridge uses regular expressions to scan for a Discord username. The relevant functions and definitions are contained in
bridge/discord/helpers.go.Line 163:
The regex will only compile if it encounters a string that is precisely a username. A more reasonable regex may look like:
Which matches
@example,@example;,@example:,@example's,(@example), and(@example's). It may be mechanically explained as (courtesy of this online tool)This, however, only finds strings that are syntactically valid for adding a ping. The code will also have to extract the username from the string and use that to provide a ping.