def update_chat_notification_settings(controller: Controller, update: Dict[str, Any]) -> None: chat_id = update["chat_id"] notification_settings = update["notification_settings"] if controller.model.chats.update_chat( chat_id, notification_settings=notification_settings): controller.render()
def update_chat_notification_settings(controller: Controller, update): log.info("Proccessing update_chat_notification_settings") chat_id = update["chat_id"] notification_settings = update["notification_settings"] if controller.model.chats.update_chat( chat_id, notification_settings=notification_settings): controller.render()
def update_user_chat_action(controller: Controller, update: Dict[str, Any]) -> None: chat_id = update["chat_id"] if update["action"]["@type"] == "chatActionCancel": controller.model.users.actions.pop(chat_id, None) else: controller.model.users.actions[chat_id] = update controller.render()
def update_user_status(controller: Controller, update: Dict[str, Any]) -> None: controller.model.users.set_status(update["user_id"], update["status"]) controller.render()