client-api: Make score and reason optional in room::report_content::Request
This commit is contained in:
		
							parent
							
								
									412452ea2e
								
							
						
					
					
						commit
						f78ae4ddde
					
				@ -31,12 +31,12 @@ pub mod v3 {
 | 
				
			|||||||
            pub event_id: &'a EventId,
 | 
					            pub event_id: &'a EventId,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            /// Integer between -100 and 0 rating offensivness.
 | 
					            /// Integer between -100 and 0 rating offensivness.
 | 
				
			||||||
            pub score: Int,
 | 
					            pub score: Option<Int>,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            /// Reason to report content.
 | 
					            /// Reason to report content.
 | 
				
			||||||
            ///
 | 
					            ///
 | 
				
			||||||
            /// May be blank.
 | 
					            /// May be blank.
 | 
				
			||||||
            pub reason: &'a str,
 | 
					            pub reason: Option<&'a str>,
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        #[derive(Default)]
 | 
					        #[derive(Default)]
 | 
				
			||||||
@ -50,8 +50,8 @@ pub mod v3 {
 | 
				
			|||||||
        pub fn new(
 | 
					        pub fn new(
 | 
				
			||||||
            room_id: &'a RoomId,
 | 
					            room_id: &'a RoomId,
 | 
				
			||||||
            event_id: &'a EventId,
 | 
					            event_id: &'a EventId,
 | 
				
			||||||
            score: Int,
 | 
					            score: Option<Int>,
 | 
				
			||||||
            reason: &'a str,
 | 
					            reason: Option<&'a str>,
 | 
				
			||||||
        ) -> Self {
 | 
					        ) -> Self {
 | 
				
			||||||
            Self { room_id, event_id, score, reason }
 | 
					            Self { room_id, event_id, score, reason }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user