feat(webapi): include cid in ServerEvent::Msg

This commit is contained in:
oxalica 2024-10-08 21:14:13 -04:00
parent 814fac1974
commit ff7fd9e4b2
6 changed files with 18 additions and 18 deletions

View file

@ -5,7 +5,7 @@ use std::fmt;
use serde::{Deserialize, Serialize};
use url::Url;
use crate::msg::{Id, MemberPermission, RoomAttrs, SignedChatMsg, SignedChatMsgWithId};
use crate::msg::{Id, MemberPermission, RoomAttrs, SignedChatMsgWithId};
use crate::PubKey;
/// The response object returned as body on HTTP error status.
@ -162,8 +162,7 @@ pub struct RoomMember {
#[serde(rename_all = "snake_case")]
pub enum ServerEvent {
/// A message from a joined room.
// FIXME: Include cid.
Msg(SignedChatMsg),
Msg(SignedChatMsgWithId),
/// The receiver is too slow to receive and some events and are dropped.
// FIXME: Should we indefinitely buffer them or just disconnect the client instead?
Lagged,