forked from lavina/lavina
add sender to ping response
This commit is contained in:
parent
1895084ded
commit
51d7278617
|
@ -203,7 +203,7 @@ pub enum JoinResult {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Player update event type which is sent to a player actor and from there to a connection handler.
|
/// Player update event type which is sent to a player actor and from there to a connection handler.
|
||||||
#[derive(Clone)]
|
#[derive(Clone, Debug)]
|
||||||
pub enum Updates {
|
pub enum Updates {
|
||||||
RoomTopicChanged {
|
RoomTopicChanged {
|
||||||
room_id: RoomId,
|
room_id: RoomId,
|
||||||
|
|
|
@ -273,6 +273,7 @@ async fn handle_update(
|
||||||
rooms: &RoomRegistry,
|
rooms: &RoomRegistry,
|
||||||
update: Updates,
|
update: Updates,
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
|
log::debug!("Sending irc message to player {player_id:?} on update {update:?}");
|
||||||
match update {
|
match update {
|
||||||
Updates::RoomJoined {
|
Updates::RoomJoined {
|
||||||
new_member_id,
|
new_member_id,
|
||||||
|
@ -378,7 +379,7 @@ async fn handle_incoming_message(
|
||||||
ClientMessage::Ping { token } => {
|
ClientMessage::Ping { token } => {
|
||||||
ServerMessage {
|
ServerMessage {
|
||||||
tags: vec![],
|
tags: vec![],
|
||||||
sender: None,
|
sender: Some(config.server_name.clone()),
|
||||||
body: ServerMessageBody::Pong {
|
body: ServerMessageBody::Pong {
|
||||||
from: config.server_name.clone(),
|
from: config.server_name.clone(),
|
||||||
token,
|
token,
|
||||||
|
|
Loading…
Reference in New Issue