Теперь все должно работать исправно
This commit is contained in:
parent
1ec1d49424
commit
07dd71b0ad
|
|
@ -436,11 +436,6 @@ class Processors:
|
||||||
cid = message.get("cid") or 0
|
cid = message.get("cid") or 0
|
||||||
text = message.get("text") or ""
|
text = message.get("text") or ""
|
||||||
|
|
||||||
# Если клиент вообще ничего не указал в пакете, то выбрасываем ошибку
|
|
||||||
if not all([userId, chatId, elements, attaches, cid, text]):
|
|
||||||
await self._send_error(seq, self.proto.MSG_SEND, self.error_types.INVALID_PAYLOAD, writer)
|
|
||||||
return
|
|
||||||
|
|
||||||
# Время отправки сообщения
|
# Время отправки сообщения
|
||||||
messageTime = int(time.time() * 1000)
|
messageTime = int(time.time() * 1000)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -76,23 +76,23 @@ class OnemeMobileServer:
|
||||||
)
|
)
|
||||||
case self.proto.MSG_SEND:
|
case self.proto.MSG_SEND:
|
||||||
await self.auth_required(
|
await self.auth_required(
|
||||||
userPhone, self.processors.process_send_message, payload, seq, writer, senderId=userId, db_pool=self.db_pool
|
userPhone, self.processors.process_send_message, payload, seq, writer, userId, self.db_pool
|
||||||
)
|
)
|
||||||
case self.proto.FOLDERS_GET:
|
case self.proto.FOLDERS_GET:
|
||||||
await self.auth_required(
|
await self.auth_required(
|
||||||
userPhone, self.processors.process_get_folders, payload, seq, writer, senderPhone=userPhone
|
userPhone, self.processors.process_get_folders, payload, seq, writer, userPhone
|
||||||
)
|
)
|
||||||
case self.proto.SESSIONS_INFO:
|
case self.proto.SESSIONS_INFO:
|
||||||
await self.auth_required(
|
await self.auth_required(
|
||||||
userPhone, self.processors.process_get_sessions, payload, seq, writer, senderPhone=userPhone, hashedToken=hashedToken
|
userPhone, self.processors.process_get_sessions, payload, seq, writer, userPhone, hashedToken
|
||||||
)
|
)
|
||||||
case self.proto.CHAT_INFO:
|
case self.proto.CHAT_INFO:
|
||||||
await self.auth_required(
|
await self.auth_required(
|
||||||
userPhone, self.processors.process_search_chats, payload, seq, writer, senderId=userId
|
userPhone, self.processors.process_search_chats, payload, seq, writer, userId
|
||||||
)
|
)
|
||||||
case self.proto.CONTACT_INFO_BY_PHONE:
|
case self.proto.CONTACT_INFO_BY_PHONE:
|
||||||
await self.auth_required(
|
await self.auth_required(
|
||||||
userPhone, self.processors.process_search_by_phone, payload, seq, writer, senderId=userId
|
userPhone, self.processors.process_search_by_phone, payload, seq, writer, userId
|
||||||
)
|
)
|
||||||
case self.proto.OK_TOKEN:
|
case self.proto.OK_TOKEN:
|
||||||
await self.auth_required(
|
await self.auth_required(
|
||||||
|
|
@ -100,7 +100,7 @@ class OnemeMobileServer:
|
||||||
)
|
)
|
||||||
case self.proto.MSG_TYPING:
|
case self.proto.MSG_TYPING:
|
||||||
await self.auth_required(
|
await self.auth_required(
|
||||||
userPhone, self.processors.process_typing, payload, seq, writer, senderId=userId
|
userPhone, self.processors.process_typing, payload, seq, writer, userId
|
||||||
)
|
)
|
||||||
case self.proto.CONTACT_INFO:
|
case self.proto.CONTACT_INFO:
|
||||||
await self.auth_required(
|
await self.auth_required(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue