Echo service.
This commit is contained in:
		
							parent
							
								
									2541fc536a
								
							
						
					
					
						commit
						b6eba60843
					
				| @ -128,6 +128,7 @@ class RPCView(BaseView): | ||||
|                 except Exception as ex: | ||||
|                     result = {"exception": str(ex), "traceback": traceback.format_exc()} | ||||
|                     success = False | ||||
|                 if result != "noresponse": | ||||
|                     await self._send_json({"callId": call_id, "success": success, "data": result}) | ||||
|             except Exception as ex: | ||||
|                 await self._send_json({"callId": call_id, "success": False, "data": str(ex)}) | ||||
| @ -141,6 +142,9 @@ class RPCView(BaseView): | ||||
|              | ||||
|             return [dict(uid=record['uid'],username=record['username'], nick=record['nick'],last_ping=record['last_ping']) async for record in self.services.channel.get_online_users(channel_uid)] | ||||
| 
 | ||||
|         async def echo(self, obj): | ||||
|             await self.ws.send_json(obj) | ||||
|             return "noresponse" | ||||
| 
 | ||||
|         async def get_users(self, channel_uid): | ||||
|             self._require_login() | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user