mirror of
				https://github.com/matrix-org/gomatrix
				synced 2025-11-04 06:18:05 +00:00 
			
		
		
		
	Add ReqRegisterAppservice struct
Appservices use a different structure when calling /register, requiring passing in also a `type`, but not requiring many of the other fields in normal client register. Add a separate struct for appservices building on this module.
This commit is contained in:
		
							parent
							
								
									be2af5ef2e
								
							
						
					
					
						commit
						1602f1fa7c
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		| 
						 | 
					@ -10,6 +10,12 @@ type ReqRegister struct {
 | 
				
			||||||
	Auth                     interface{} `json:"auth,omitempty"`
 | 
						Auth                     interface{} `json:"auth,omitempty"`
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// ReqRegisterAppservice is the JSON request for https://matrix.org/docs/spec/application_service/r0.1.2#server-admin-style-permissions
 | 
				
			||||||
 | 
					type ReqRegisterAppservice struct {
 | 
				
			||||||
 | 
						Username string `json:"username"`
 | 
				
			||||||
 | 
						Type     string `json:"type"`
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// ReqLogin is the JSON request for http://matrix.org/docs/spec/client_server/r0.6.0.html#post-matrix-client-r0-login
 | 
					// ReqLogin is the JSON request for http://matrix.org/docs/spec/client_server/r0.6.0.html#post-matrix-client-r0-login
 | 
				
			||||||
type ReqLogin struct {
 | 
					type ReqLogin struct {
 | 
				
			||||||
	Type                     string     `json:"type"`
 | 
						Type                     string     `json:"type"`
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue