feat: add snapshot tests for eventsub messages (#5965)
This commit is contained in:
@@ -62,6 +62,16 @@ void stripChannelName(QString &channelName)
|
||||
}
|
||||
}
|
||||
|
||||
QString cleanChannelName(const QString &dirtyChannelName)
|
||||
{
|
||||
if (dirtyChannelName.startsWith('#'))
|
||||
{
|
||||
return dirtyChannelName.mid(1).toLower();
|
||||
}
|
||||
|
||||
return dirtyChannelName.toLower();
|
||||
}
|
||||
|
||||
std::pair<ParsedUserName, ParsedUserID> parseUserNameOrID(const QString &input)
|
||||
{
|
||||
if (input.startsWith("id:"))
|
||||
|
||||
@@ -16,6 +16,9 @@ void stripUserName(QString &userName);
|
||||
// stripChannelName removes any @ prefix or , suffix to make it more suitable for command use
|
||||
void stripChannelName(QString &channelName);
|
||||
|
||||
/// Strips a leading `#` and lowercases the name
|
||||
QString cleanChannelName(const QString &dirtyChannelName);
|
||||
|
||||
using ParsedUserName = QString;
|
||||
using ParsedUserID = QString;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user