Omkar008 commited on
Commit
92ec692
1 Parent(s): 91fb317

Update controllers/ws_controller.py

Browse files
Files changed (1) hide show
  1. controllers/ws_controller.py +2 -1
controllers/ws_controller.py CHANGED
@@ -206,10 +206,11 @@ async def websocket_main(code: str, websocket: WebSocket,brand_name: Optional[s
206
  async def send_message_in_chunks(websocket: WebSocket, message_json: dict, chunk_size: int):
207
  attachment_len = 0
208
  body_len = 0
 
209
  if message_json['attachments'] is not None :
210
  for attch in message_json['attachments']:
211
  attachment_len = attch['attachment_len']
212
- body_len = attch['body_len']
213
 
214
  print(body_len)
215
  print(attachment_len)
 
206
  async def send_message_in_chunks(websocket: WebSocket, message_json: dict, chunk_size: int):
207
  attachment_len = 0
208
  body_len = 0
209
+ body_len = message_json['body_len']
210
  if message_json['attachments'] is not None :
211
  for attch in message_json['attachments']:
212
  attachment_len = attch['attachment_len']
213
+
214
 
215
  print(body_len)
216
  print(attachment_len)