src/Utilities/BotState.php 1 location
|
@@ 101-107 (lines=7) @@
|
98 |
|
|
99 |
|
} |
100 |
|
|
101 |
|
if ($this->redis->exists($this->_chat_id . ':status')) { |
102 |
|
|
103 |
|
$this->status = $this->redis->get($this->_chat_id . ':status'); |
104 |
|
|
105 |
|
return $this->status; |
106 |
|
|
107 |
|
} |
108 |
|
|
109 |
|
$this->redis->set($this->_chat_id . ':status', $default_status); |
110 |
|
$this->status = $default_status; |
src/Localization/Language.php 1 location
|
@@ 96-102 (lines=7) @@
|
93 |
|
} |
94 |
|
|
95 |
|
// Does it exists on redis? |
96 |
|
if ($this->redis->exists($this->_chat_id . ':language')) { |
97 |
|
|
98 |
|
// Get the value |
99 |
|
$this->language = $this->redis->get($this->_chat_id . ':language'); |
100 |
|
return $this->language; |
101 |
|
|
102 |
|
} |
103 |
|
|
104 |
|
// Set the value from the db |
105 |
|
$this->redis->setEx($this->_chat_id . ':language', $expiring_time, $this->getLanguageDatabase($default_language)); |