lemmy/crates/api_common/src/websocket/handlers/mod.rs
Dessalines 63f54a3103
Making the chat server an actor. (#2793)
* Making the chat server an actor.

- Fixes #2778
- #2787

* Forgot to add handlers folder.

* Some cleanup.

* Forgot to remove a comment.

* Address PR comments.

* Using ToString for enum operations.
2023-04-13 06:53:55 -04:00

19 lines
356 B
Rust

use actix::{Message, Recipient};
pub mod captcha;
pub mod connect;
pub mod join_rooms;
pub mod messages;
pub mod online_users;
/// A string message sent to a websocket session
#[derive(Message)]
#[rtype(result = "()")]
pub struct WsMessage(pub String);
// TODO move this?
pub struct SessionInfo {
pub addr: Recipient<WsMessage>,
// pub ip: IpAddr
}