if (Str::contains($rawText, ['haha', 'hehe', 'hihi', 'kekw', 'lol', 'lul', 'xd'])) {
return 'lol';
}
- if (Str::startsWith($rawText, ['ahoi', 'hallo', 'hello', 'hi', 'huhu']) || Str::endsWith($rawText, ['hi', 'wave'])) {
+ if (Str::startsWith($rawText, ['ahoi', 'hallo', 'hello', 'hi ', 'huhu']) || Str::endsWith($rawText, ['hi', 'wave'])) {
return 'hi';
}
if (Str::contains($rawText, ['pog', 'wow'])) {
$this->assertEquals('hi', ChatLog::classify('hi'));
$this->assertEquals('hi', ChatLog::classify('hallo'));
+ $this->assertNotEquals('hi', ChatLog::classify('hier steht was'));
$this->assertEquals('hype', ChatLog::classify('122 Hype!'));