def _send_online(self): if self.device_is_browser == True: return _body = { "extra_data": None, "user_uuid": self.user_uuid, "browser": ONLINE_STATUS.UNCHANGED, "mobile": ONLINE_STATUS.OFFLINE, } pcsocket_user_online(self.application.redis, self.user_uuid, _body) return
def _send_online(self): _body = { "extra_data": None, "user_uuid": self.user.get("uuid"), "browser": ONLINE_STATUS.ONLINE, "mobile": ONLINE_STATUS.UNCHANGED, } if self.device_is_browser == False: _body = { "extra_data": None, "user_uuid": self.user.get("uuid"), "browser": ONLINE_STATUS.UNCHANGED, "mobile": ONLINE_STATUS.ONLINE, } pcsocket_user_online(self.application.redis, self.user.get("uuid"), _body) return
def _send_online(self): _is_browser = True _body = { "extra_data": None, "user_uuid": self.user_uuid, "browser": ONLINE_STATUS.OFFLINE, "mobile": ONLINE_STATUS.UNCHANGED, } _key = DeviceInfo.__tablename__ + ".uuid." + self.device_uuid _ostype = self.application.redis.hget(_key, "device_ostype") if _ostype == OS.AND or _ostype == OS.IOS: _is_browser = False if _is_browser == False: _body = { "extra_data": None, "user_uuid": self.user_uuid, "browser": ONLINE_STATUS.UNCHANGED, "mobile": ONLINE_STATUS.OFFLINE, } pcsocket_user_online(self.application.redis, self.user_uuid, _body) return