Skip to content

Commit 48adb72

Browse files
committed
rest of the functions
1 parent 70214da commit 48adb72

File tree

5 files changed

+15
-12
lines changed

5 files changed

+15
-12
lines changed

src/dx/publish/mod.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -499,10 +499,13 @@ mod should {
499499
("norep".to_string(), "true".to_string()),
500500
("store".to_string(), "1".to_string()),
501501
("space-id".to_string(), "space_id".to_string()),
502-
("type".to_string(), "message_type".to_string()),
502+
(
503+
"custom_message_type".to_string(),
504+
"message_type".to_string()
505+
),
503506
("meta".to_string(), "{\"k\":\"v\"}".to_string()),
504507
("ttl".to_string(), "50".to_string()),
505-
("seqn".to_string(), "1".to_string())
508+
("seqn".to_string(), "1".to_string()),
506509
]),
507510
result.data.query_parameters
508511
);

src/dx/subscribe/event_dispatcher.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ mod it_should {
430430
channel: "test-channel".to_string(),
431431
subscription: "test-channel".to_string(),
432432
data: "Test message 1".to_string().into_bytes(),
433-
r#type: None,
433+
custom_message_type: None,
434434
space_id: None,
435435
decryption_error: None,
436436
}),
@@ -440,7 +440,7 @@ mod it_should {
440440
channel: "test-channel".to_string(),
441441
subscription: "test-channel".to_string(),
442442
data: "Test signal 1".to_string().into_bytes(),
443-
r#type: None,
443+
custom_message_type: None,
444444
space_id: None,
445445
decryption_error: None,
446446
}),
@@ -459,7 +459,7 @@ mod it_should {
459459
channel: "test-channel".to_string(),
460460
subscription: "test-channel".to_string(),
461461
data: "Test message 2".to_string().into_bytes(),
462-
r#type: None,
462+
custom_message_type: None,
463463
space_id: None,
464464
decryption_error: None,
465465
}),

src/dx/subscribe/event_engine/effects/emit_messages.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ mod should {
3434
channel: "test".to_string(),
3535
subscription: "test-group".to_string(),
3636
data: vec![],
37-
r#type: None,
37+
custom_message_type: None,
3838
space_id: None,
3939
decryption_error: None,
4040
};

src/dx/subscribe/result.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -257,11 +257,11 @@ pub struct Envelope {
257257
pub subscription: Option<String>,
258258

259259
/// User provided message type (set only when [`publish`] called with
260-
/// `r#type`).
260+
/// `custom_message_type`).
261261
///
262262
/// [`publish`]: crate::dx::publish
263-
#[cfg_attr(feature = "serde", serde(rename = "mt"), serde(default))]
264-
pub r#type: Option<String>,
263+
#[cfg_attr(feature = "serde", serde(rename = "cmt"), serde(default))]
264+
pub custom_message_type: Option<String>,
265265

266266
/// Identifier of space into which message has been published (set only when
267267
/// [`publish`] called with `space_id`).

src/dx/subscribe/types.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -470,10 +470,10 @@ pub struct Message {
470470
pub data: Vec<u8>,
471471

472472
/// User provided message type (set only when [`publish`] called with
473-
/// `r#type`).
473+
/// `custom_message_type`).
474474
///
475475
/// [`publish`]: crate::dx::publish
476-
pub r#type: Option<String>,
476+
pub custom_message_type: Option<String>,
477477

478478
/// Identifier of space into which message has been published (set only when
479479
/// [`publish`] called with `space_id`).
@@ -1097,7 +1097,7 @@ impl TryFrom<Envelope> for Message {
10971097
channel: value.channel,
10981098
subscription,
10991099
data: value.payload.into(),
1100-
r#type: value.r#type,
1100+
custom_message_type: value.custom_message_type,
11011101
space_id: value.space_id,
11021102
decryption_error: None,
11031103
})

0 commit comments

Comments
 (0)