common: Merge ruma-identifiers into ruma-common
This commit is contained in:
@@ -24,7 +24,6 @@ __ci = ["ruma-common/unstable-pre-spec"]
|
||||
itertools = "0.10.0"
|
||||
js_int = "0.2.0"
|
||||
ruma-common = { version = "0.8.0", path = "../ruma-common", features = ["events"] }
|
||||
ruma-identifiers = { version = "0.22.0", path = "../ruma-identifiers" }
|
||||
ruma-serde = { version = "0.6.0", path = "../ruma-serde" }
|
||||
serde = { version = "1.0.118", features = ["derive"] }
|
||||
serde_json = "1.0.60"
|
||||
|
||||
@@ -30,9 +30,8 @@ use ruma_common::{
|
||||
},
|
||||
EventType,
|
||||
},
|
||||
MilliSecondsSinceUnixEpoch,
|
||||
room_id, user_id, EventId, MilliSecondsSinceUnixEpoch, RoomId, RoomVersionId, UserId,
|
||||
};
|
||||
use ruma_identifiers::{room_id, user_id, EventId, RoomId, RoomVersionId, UserId};
|
||||
use ruma_state_res::{self as state_res, Error, Event, Result, StateMap};
|
||||
use serde_json::{
|
||||
json,
|
||||
@@ -538,9 +537,8 @@ fn BAN_STATE_SET() -> HashMap<Box<EventId>, Arc<StateEvent>> {
|
||||
mod event {
|
||||
use ruma_common::{
|
||||
events::{pdu::Pdu, EventType},
|
||||
MilliSecondsSinceUnixEpoch,
|
||||
EventId, MilliSecondsSinceUnixEpoch, RoomId, UserId,
|
||||
};
|
||||
use ruma_identifiers::{EventId, RoomId, UserId};
|
||||
use ruma_state_res::Event;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::value::RawValue as RawJsonValue;
|
||||
|
||||
@@ -1,17 +1,19 @@
|
||||
use std::{borrow::Borrow, collections::BTreeSet, convert::TryFrom};
|
||||
|
||||
use js_int::{int, Int};
|
||||
use ruma_common::events::{
|
||||
room::{
|
||||
create::RoomCreateEventContent,
|
||||
join_rules::{JoinRule, RoomJoinRulesEventContent},
|
||||
member::{MembershipState, ThirdPartyInvite},
|
||||
power_levels::RoomPowerLevelsEventContent,
|
||||
third_party_invite::RoomThirdPartyInviteEventContent,
|
||||
use ruma_common::{
|
||||
events::{
|
||||
room::{
|
||||
create::RoomCreateEventContent,
|
||||
join_rules::{JoinRule, RoomJoinRulesEventContent},
|
||||
member::{MembershipState, ThirdPartyInvite},
|
||||
power_levels::RoomPowerLevelsEventContent,
|
||||
third_party_invite::RoomThirdPartyInviteEventContent,
|
||||
},
|
||||
EventType,
|
||||
},
|
||||
EventType,
|
||||
RoomVersionId, UserId,
|
||||
};
|
||||
use ruma_identifiers::{RoomVersionId, UserId};
|
||||
use ruma_serde::{Base64, Raw};
|
||||
use serde::{de::IgnoredAny, Deserialize};
|
||||
use serde_json::{from_str as from_json_str, value::RawValue as RawJsonValue};
|
||||
|
||||
@@ -12,9 +12,8 @@ use ruma_common::{
|
||||
room::member::{MembershipState, RoomMemberEventContent},
|
||||
EventType,
|
||||
},
|
||||
MilliSecondsSinceUnixEpoch,
|
||||
EventId, MilliSecondsSinceUnixEpoch, RoomVersionId, UserId,
|
||||
};
|
||||
use ruma_identifiers::{EventId, RoomVersionId, UserId};
|
||||
use serde::Deserialize;
|
||||
use serde_json::from_str as from_json_str;
|
||||
use tracing::{debug, info, trace, warn};
|
||||
@@ -648,9 +647,8 @@ mod tests {
|
||||
room::join_rules::{JoinRule, RoomJoinRulesEventContent},
|
||||
EventType,
|
||||
},
|
||||
MilliSecondsSinceUnixEpoch,
|
||||
EventId, MilliSecondsSinceUnixEpoch, RoomVersionId,
|
||||
};
|
||||
use ruma_identifiers::{EventId, RoomVersionId};
|
||||
use serde_json::{json, value::to_raw_value as to_raw_json_value};
|
||||
use tracing::debug;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use ruma_identifiers::RoomVersionId;
|
||||
use ruma_common::RoomVersionId;
|
||||
|
||||
use crate::{Error, Result};
|
||||
|
||||
|
||||
@@ -5,8 +5,7 @@ use std::{
|
||||
sync::Arc,
|
||||
};
|
||||
|
||||
use ruma_common::{events::EventType, MilliSecondsSinceUnixEpoch};
|
||||
use ruma_identifiers::{EventId, RoomId, UserId};
|
||||
use ruma_common::{events::EventType, EventId, MilliSecondsSinceUnixEpoch, RoomId, UserId};
|
||||
use serde_json::value::RawValue as RawJsonValue;
|
||||
|
||||
/// Abstraction of a PDU so users can have their own PDU types.
|
||||
|
||||
@@ -10,6 +10,7 @@ use std::{
|
||||
|
||||
use js_int::{int, uint};
|
||||
use ruma_common::{
|
||||
event_id,
|
||||
events::{
|
||||
pdu::{EventHash, Pdu, RoomV3Pdu},
|
||||
room::{
|
||||
@@ -18,9 +19,8 @@ use ruma_common::{
|
||||
},
|
||||
EventType,
|
||||
},
|
||||
MilliSecondsSinceUnixEpoch,
|
||||
room_id, user_id, EventId, MilliSecondsSinceUnixEpoch, RoomId, RoomVersionId, UserId,
|
||||
};
|
||||
use ruma_identifiers::{event_id, room_id, user_id, EventId, RoomId, RoomVersionId, UserId};
|
||||
use serde_json::{
|
||||
json,
|
||||
value::{to_raw_value as to_raw_json_value, RawValue as RawJsonValue},
|
||||
@@ -564,9 +564,8 @@ pub fn INITIAL_EDGES() -> Vec<Box<EventId>> {
|
||||
pub mod event {
|
||||
use ruma_common::{
|
||||
events::{pdu::Pdu, EventType},
|
||||
MilliSecondsSinceUnixEpoch,
|
||||
EventId, MilliSecondsSinceUnixEpoch, RoomId, UserId,
|
||||
};
|
||||
use ruma_identifiers::{EventId, RoomId, UserId};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::value::RawValue as RawJsonValue;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user