fix incomming chat messages

This commit is contained in:
Robin Appelman 2026-08-01 19:39:10 +02:00
commit 01e8d3d650

View file

@ -73,7 +73,7 @@ fn parse_chat_event(
.map_err(|_| InvalidChatEvent::InvalidSteamId(notification.steamid_friend()))?; .map_err(|_| InvalidChatEvent::InvalidSteamId(notification.steamid_friend()))?;
let message_type = MessageType::try_from(notification.chat_entry_type()).unwrap_or_default(); let message_type = MessageType::try_from(notification.chat_entry_type()).unwrap_or_default();
Ok(match message_type { Ok(match message_type {
MessageType::Chat if notification.local_echo() => Some(ChatEvent::Message(MessageEvent { MessageType::Chat if !notification.local_echo() => Some(ChatEvent::Message(MessageEvent {
source, source,
server_timestamp: notification.rtime32_server_timestamp() as u64, server_timestamp: notification.rtime32_server_timestamp() as u64,
message: notification.message.unwrap_or_default(), message: notification.message.unwrap_or_default(),