File tree Expand file tree Collapse file tree 5 files changed +15
-12
lines changed Expand file tree Collapse file tree 5 files changed +15
-12
lines changed Original file line number Diff line number Diff line change @@ -499,10 +499,13 @@ mod should {
499
499
( "norep" . to_string( ) , "true" . to_string( ) ) ,
500
500
( "store" . to_string( ) , "1" . to_string( ) ) ,
501
501
( "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
+ ) ,
503
506
( "meta" . to_string( ) , "{\" k\" :\" v\" }" . to_string( ) ) ,
504
507
( "ttl" . to_string( ) , "50" . to_string( ) ) ,
505
- ( "seqn" . to_string( ) , "1" . to_string( ) )
508
+ ( "seqn" . to_string( ) , "1" . to_string( ) ) ,
506
509
] ) ,
507
510
result. data. query_parameters
508
511
) ;
Original file line number Diff line number Diff line change @@ -430,7 +430,7 @@ mod it_should {
430
430
channel: "test-channel" . to_string( ) ,
431
431
subscription: "test-channel" . to_string( ) ,
432
432
data: "Test message 1" . to_string( ) . into_bytes( ) ,
433
- r#type : None ,
433
+ custom_message_type : None ,
434
434
space_id: None ,
435
435
decryption_error: None ,
436
436
} ) ,
@@ -440,7 +440,7 @@ mod it_should {
440
440
channel: "test-channel" . to_string( ) ,
441
441
subscription: "test-channel" . to_string( ) ,
442
442
data: "Test signal 1" . to_string( ) . into_bytes( ) ,
443
- r#type : None ,
443
+ custom_message_type : None ,
444
444
space_id: None ,
445
445
decryption_error: None ,
446
446
} ) ,
@@ -459,7 +459,7 @@ mod it_should {
459
459
channel: "test-channel" . to_string( ) ,
460
460
subscription: "test-channel" . to_string( ) ,
461
461
data: "Test message 2" . to_string( ) . into_bytes( ) ,
462
- r#type : None ,
462
+ custom_message_type : None ,
463
463
space_id: None ,
464
464
decryption_error: None ,
465
465
} ) ,
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ mod should {
34
34
channel : "test" . to_string ( ) ,
35
35
subscription : "test-group" . to_string ( ) ,
36
36
data : vec ! [ ] ,
37
- r#type : None ,
37
+ custom_message_type : None ,
38
38
space_id : None ,
39
39
decryption_error : None ,
40
40
} ;
Original file line number Diff line number Diff line change @@ -257,11 +257,11 @@ pub struct Envelope {
257
257
pub subscription : Option < String > ,
258
258
259
259
/// User provided message type (set only when [`publish`] called with
260
- /// `r#type `).
260
+ /// `custom_message_type `).
261
261
///
262
262
/// [`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 > ,
265
265
266
266
/// Identifier of space into which message has been published (set only when
267
267
/// [`publish`] called with `space_id`).
Original file line number Diff line number Diff line change @@ -470,10 +470,10 @@ pub struct Message {
470
470
pub data : Vec < u8 > ,
471
471
472
472
/// User provided message type (set only when [`publish`] called with
473
- /// `r#type `).
473
+ /// `custom_message_type `).
474
474
///
475
475
/// [`publish`]: crate::dx::publish
476
- pub r#type : Option < String > ,
476
+ pub custom_message_type : Option < String > ,
477
477
478
478
/// Identifier of space into which message has been published (set only when
479
479
/// [`publish`] called with `space_id`).
@@ -1097,7 +1097,7 @@ impl TryFrom<Envelope> for Message {
1097
1097
channel : value. channel ,
1098
1098
subscription,
1099
1099
data : value. payload . into ( ) ,
1100
- r#type : value. r#type ,
1100
+ custom_message_type : value. custom_message_type ,
1101
1101
space_id : value. space_id ,
1102
1102
decryption_error : None ,
1103
1103
} )
You can’t perform that action at this time.
0 commit comments