meteor-client
meteor-client copied to clipboard
Fix BetterChat getSender fallback when Timestamps are active
Type of change
- [x] Bug fix
- [ ] New feature
Description
When Timestamps setting is active in BetterChat, fallback username matcher in BetterChat::getSender()
won't be able to extract the username from message because both timestamp and username are contained within <
, >
symbols. New regex matcher in this PR takes this into consideration by making an optional matching group for timestamps before the username.
Related issues
None
How Has This Been Tested?
Tested on the same server it wasn't working properly before with NoChatReports enabled (I'm not sure whether it's the server that doesn't send the sender
field or it gets stripped by NoChatReports. Either way, in my case the fallback is always used)
Checklist:
- [x] My code follows the style guidelines of this project.
- [x] I have added comments to my code in more complex areas.
- [x] I have tested the code in both development and production environments.