Skip to content

Commit 68c9ce2

Browse files
committed
new user agent support
1 parent c0b7e95 commit 68c9ce2

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/session.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ class session {
77
public static function start(\Swoole\Http\Request $request, \Swoole\Http\Response $response, ?string $sid = null,
88
?string $agent = null): void {
99
switch ($agent) {
10+
case 'app' :
11+
$agent = self::Agent_app;
12+
break;
1013
case 'wmp' :
1114
$agent = self::Agent_wmp;
1215
break;
@@ -123,6 +126,8 @@ public static function getAgentInString(?string $agent = null): ?string {
123126
$agent = $ob->agent;
124127
}
125128
switch ($agent) {
129+
case self::Agent_app :
130+
return 'app';
126131
case self::Agent_wmp :
127132
return 'wmp';
128133
case self::Agent_qmp :

0 commit comments

Comments
 (0)