From 4b62d6acff23a4975e245d8176bcbaa6288334cc Mon Sep 17 00:00:00 2001
From: sisishiliu <4416@cunmou.com>
Date: Fri, 7 Sep 2018 19:47:43 +0800
Subject: [PATCH 001/302] fix version before beta
---
src/config.developer.php | 10 +
src/controller/Api/.gitignore | 1 +
.../Api/File/Api_File_UploadController.php | 27 +-
.../Api/Group/Api_Group_BaseController.php | 2 +-
...PasswordUpdateInvitationCodeController.php | 109 ++++
.../Api/Site/Api_Site_LoginController.php | 4 +-
src/controller/BaseController.php | 33 +-
.../File/Http_File_DownloadFileController.php | 71 +++
src/controller/InstallDBController.php | 4 +-
.../Manage/Manage_CommonController.php | 13 +
.../Manage/Manage_IndexController.php | 10 +-
.../Gif/MiniProgram_Gif_IndexController.php | 57 +-
.../MiniProgram_Square_IndexController.php | 14 +
src/controller/MiniProgramController.php | 39 +-
src/index.php | 26 +-
src/lib/Util/ZalyErrorBase.php | 1 +
src/lib/Util/ZalyErrorEn.php | 2 +-
src/lib/Util/ZalyErrorZh.php | 1 +
src/lib/Util/ZalyHelper.php | 2 +-
...piPassportPasswordUpdateInvitationCode.php | 35 ++
.../Zaly/Proto/Client/ImStcMessageRequest.php | 13 +-
.../Zaly/Proto/Client/ImStcNewsRequest.php | 12 +-
.../Zaly/Proto/Client/ImStcPongRequest.php | 13 +-
.../proto/Zaly/Proto/Core/AllGroupProfile.php | 16 +-
.../proto/Zaly/Proto/Core/AllSiteConfig.php | 20 +-
.../proto/Zaly/Proto/Core/AllUserProfile.php | 14 +-
.../Zaly/Proto/Core/ApplyUserProfile.php | 14 +-
.../proto/Zaly/Proto/Core/AudioMessage.php | 14 +-
.../proto/Zaly/Proto/Core/BuiltinPluginId.php | 2 +-
.../proto/Zaly/Proto/Core/DataWriteType.php | 2 +-
src/lib/proto/Zaly/Proto/Core/FileType.php | 2 +-
.../Zaly/Proto/Core/FriendRelationType.php | 2 +-
.../Zaly/Proto/Core/FriendUserProfile.php | 18 +-
src/lib/proto/Zaly/Proto/Core/GatewayType.php | 2 +-
.../Zaly/Proto/Core/GroupDescription.php | 14 +-
.../Zaly/Proto/Core/GroupDescriptionType.php | 2 +-
.../Proto/Core/GroupJoinPermissionType.php | 2 +-
.../proto/Zaly/Proto/Core/GroupMemberType.php | 2 +-
src/lib/proto/Zaly/Proto/Core/HooksType.php | 2 +-
.../proto/Zaly/Proto/Core/HttpQueryType.php | 2 +-
.../proto/Zaly/Proto/Core/ImageMessage.php | 16 +-
src/lib/proto/Zaly/Proto/Core/Message.php | 32 +-
.../proto/Zaly/Proto/Core/MessageRoomType.php | 2 +-
.../proto/Zaly/Proto/Core/MessageStatus.php | 2 +-
src/lib/proto/Zaly/Proto/Core/MessageType.php | 2 +-
.../proto/Zaly/Proto/Core/NoticeMessage.php | 13 +-
.../Zaly/Proto/Core/PluginLoadingType.php | 2 +-
.../Zaly/Proto/Core/PluginPermissionType.php | 2 +-
.../proto/Zaly/Proto/Core/PluginProfile.php | 22 +-
.../proto/Zaly/Proto/Core/PluginUsageType.php | 2 +-
.../Zaly/Proto/Core/PublicGroupProfile.php | 23 +-
.../Zaly/Proto/Core/PublicSiteConfig.php | 27 +-
.../Zaly/Proto/Core/PublicUserProfile.php | 20 +-
src/lib/proto/Zaly/Proto/Core/PushType.php | 2 +-
.../proto/Zaly/Proto/Core/StatusMessage.php | 16 +-
.../proto/Zaly/Proto/Core/SyncEndMessage.php | 12 +-
src/lib/proto/Zaly/Proto/Core/TextMessage.php | 13 +-
.../proto/Zaly/Proto/Core/TransportData.php | 26 +-
.../Proto/Core/TransportDataHeaderKey.php | 2 +-
.../Zaly/Proto/Core/UserAvailableType.php | 2 +-
.../Zaly/Proto/Core/UserClientLangType.php | 2 +-
.../proto/Zaly/Proto/Core/UserClientType.php | 2 +-
src/lib/proto/Zaly/Proto/Core/Version.php | 17 +-
src/lib/proto/Zaly/Proto/Core/WebMessage.php | 17 +-
.../Zaly/Proto/Core/WebNoticeMessage.php | 16 +-
.../Proto/Gateway/GwSocketCloseRequest.php | 13 +-
.../Proto/Gateway/GwSocketCloseResponse.php | 12 +-
.../Proto/Gateway/GwSocketWritePackage.php | 14 +-
.../Proto/Gateway/GwSocketWriteRequest.php | 13 +-
.../Proto/Gateway/GwSocketWriteResponse.php | 13 +-
.../Platform/ApiSessionVerifyRequest.php | 13 +-
.../Platform/ApiSessionVerifyResponse.php | 16 +-
.../Zaly/Proto/Platform/LoginUserProfile.php | 19 +-
.../DuckChatGroupCheckMemberRequest.php | 14 +-
.../DuckChatGroupCheckMemberResponse.php | 13 +-
.../Plugin/DuckChatMessageSendRequest.php | 13 +-
.../Plugin/DuckChatMessageSendResponse.php | 12 +-
.../Plugin/DuckChatSessionProfileRequest.php | 14 +-
.../Plugin/DuckChatSessionProfileResponse.php | 13 +-
.../Plugin/DuckChatUserProfileRequest.php | 14 +-
.../Plugin/DuckChatUserProfileResponse.php | 13 +-
.../Plugin/DuckChatUserRelationRequest.php | 14 +-
.../Plugin/DuckChatUserRelationResponse.php | 13 +-
.../Proto/Site/ApiFileDownloadRequest.php | 16 +-
.../Proto/Site/ApiFileDownloadResponse.php | 15 +-
.../Zaly/Proto/Site/ApiFileUploadRequest.php | 15 +-
.../Zaly/Proto/Site/ApiFileUploadResponse.php | 13 +-
.../Proto/Site/ApiFriendAcceptRequest.php | 16 +-
.../Proto/Site/ApiFriendAcceptResponse.php | 12 +-
.../Proto/Site/ApiFriendApplyListRequest.php | 15 +-
.../Proto/Site/ApiFriendApplyListResponse.php | 14 +-
.../Zaly/Proto/Site/ApiFriendApplyRequest.php | 14 +-
.../Proto/Site/ApiFriendApplyResponse.php | 12 +-
.../Proto/Site/ApiFriendDeleteRequest.php | 13 +-
.../Proto/Site/ApiFriendDeleteResponse.php | 12 +-
.../Zaly/Proto/Site/ApiFriendListRequest.php | 15 +-
.../Zaly/Proto/Site/ApiFriendListResponse.php | 16 +-
.../Proto/Site/ApiFriendProfileRequest.php | 13 +-
.../Proto/Site/ApiFriendProfileResponse.php | 13 +-
.../Proto/Site/ApiFriendSearchRequest.php | 17 +-
.../Proto/Site/ApiFriendSearchResponse.php | 16 +-
.../Proto/Site/ApiFriendUpdateRequest.php | 14 +-
.../Proto/Site/ApiFriendUpdateResponse.php | 13 +-
.../Zaly/Proto/Site/ApiFriendUpdateType.php | 2 +-
.../Zaly/Proto/Site/ApiFriendUpdateValue.php | 15 +-
.../Zaly/Proto/Site/ApiGroupCreateRequest.php | 13 +-
.../Proto/Site/ApiGroupCreateResponse.php | 13 +-
.../Zaly/Proto/Site/ApiGroupDeleteRequest.php | 13 +-
.../Proto/Site/ApiGroupDeleteResponse.php | 12 +-
.../Site/ApiGroupInvitableFriendsRequest.php | 16 +-
.../Site/ApiGroupInvitableFriendsResponse.php | 15 +-
.../Zaly/Proto/Site/ApiGroupInviteRequest.php | 14 +-
.../Proto/Site/ApiGroupInviteResponse.php | 12 +-
.../Zaly/Proto/Site/ApiGroupListRequest.php | 15 +-
.../Zaly/Proto/Site/ApiGroupListResponse.php | 15 +-
.../Proto/Site/ApiGroupMembersRequest.php | 15 +-
.../Proto/Site/ApiGroupMembersResponse.php | 14 +-
.../Proto/Site/ApiGroupMembersUserProfile.php | 14 +-
.../Proto/Site/ApiGroupProfileRequest.php | 13 +-
.../Proto/Site/ApiGroupProfileResponse.php | 15 +-
.../Zaly/Proto/Site/ApiGroupQuitRequest.php | 13 +-
.../Zaly/Proto/Site/ApiGroupQuitResponse.php | 12 +-
.../Site/ApiGroupRemoveMemberRequest.php | 14 +-
.../Site/ApiGroupRemoveMemberResponse.php | 12 +-
.../Zaly/Proto/Site/ApiGroupUpdateRequest.php | 14 +-
.../Proto/Site/ApiGroupUpdateResponse.php | 15 +-
.../Zaly/Proto/Site/ApiGroupUpdateType.php | 2 +-
.../Zaly/Proto/Site/ApiGroupUpdateValue.php | 23 +-
.../Zaly/Proto/Site/ApiGwConfigRequest.php | 14 +-
.../Zaly/Proto/Site/ApiGwConfigResponse.php | 13 +-
.../Proto/Site/ApiGwOnDisconnectRequest.php | 13 +-
.../Proto/Site/ApiGwOnDisconnectResponse.php | 12 +-
.../Site/ApiPassportAnonymousLoginRequest.php | 13 +-
.../ApiPassportAnonymousLoginResponse.php | 13 +-
.../Site/ApiPassportLdapLoginRequest.php | 14 +-
.../Site/ApiPassportLdapLoginResponse.php | 13 +-
...ApiPassportPasswordFindPasswordRequest.php | 13 +-
...piPassportPasswordFindPasswordResponse.php | 12 +-
.../Site/ApiPassportPasswordLoginRequest.php | 15 +-
.../Site/ApiPassportPasswordLoginResponse.php | 13 +-
...iPassportPasswordModifyPasswordRequest.php | 15 +-
...PassportPasswordModifyPasswordResponse.php | 12 +-
.../Site/ApiPassportPasswordRegRequest.php | 18 +-
.../Site/ApiPassportPasswordRegResponse.php | 13 +-
...piPassportPasswordResetPasswordRequest.php | 15 +-
...iPassportPasswordResetPasswordResponse.php | 12 +-
...ortPasswordUpdateInvitationCodeRequest.php | 116 ++++
...rtPasswordUpdateInvitationCodeResponse.php | 58 ++
.../Zaly/Proto/Site/ApiPluginListRequest.php | 13 +-
.../Zaly/Proto/Site/ApiPluginListResponse.php | 13 +-
.../Zaly/Proto/Site/ApiPluginProxyRequest.php | 18 +-
.../Proto/Site/ApiPluginProxyResponse.php | 15 +-
.../Zaly/Proto/Site/ApiSiteConfigRequest.php | 14 +-
.../Zaly/Proto/Site/ApiSiteConfigResponse.php | 17 +-
.../Zaly/Proto/Site/ApiSiteLoginRequest.php | 16 +-
.../Zaly/Proto/Site/ApiSiteLoginResponse.php | 14 +-
.../Zaly/Proto/Site/ApiSiteLogoutRequest.php | 12 +-
.../Zaly/Proto/Site/ApiSiteLogoutResponse.php | 12 +-
.../Zaly/Proto/Site/ApiSyncCheckRequest.php | 14 +-
.../Zaly/Proto/Site/ApiSyncCheckResponse.php | 13 +-
src/lib/proto/Zaly/Proto/Site/ApiSyncType.php | 2 +-
.../Proto/Site/ApiTmpchatDeleteRequest.php | 13 +-
.../Proto/Site/ApiTmpchatDeleteResponse.php | 12 +-
.../Proto/Site/ApiTmpchatGroupRequest.php | 14 +-
.../Proto/Site/ApiTmpchatGroupResponse.php | 12 +-
.../Zaly/Proto/Site/ApiUserProfileRequest.php | 12 +-
.../Proto/Site/ApiUserProfileResponse.php | 13 +-
.../Zaly/Proto/Site/ApiUserUpdateRequest.php | 13 +-
.../Zaly/Proto/Site/ApiUserUpdateResponse.php | 13 +-
.../Zaly/Proto/Site/ApiUserUpdateType.php | 2 +-
.../Zaly/Proto/Site/ApiUserUpdateValue.php | 15 +-
.../Zaly/Proto/Site/ImCtsAuthRequest.php | 12 +-
.../Zaly/Proto/Site/ImCtsAuthResponse.php | 12 +-
.../Zaly/Proto/Site/ImCtsMessageRequest.php | 13 +-
.../Zaly/Proto/Site/ImCtsPingRequest.php | 13 +-
.../Zaly/Proto/Site/ImCtsSyncRequest.php | 17 +-
.../Proto/Site/ImCtsUpdatePointerRequest.php | 14 +-
src/lib/wpf/Wpf_Loader.php | 32 +-
src/lib/wpf/init.php | 58 ++
src/model/File/File_Manager.php | 6 +-
src/model/PassportPasswordPreSessionTable.php | 19 +-
src/public/css/init.css | 2 +-
src/public/css/login.css | 27 +-
src/public/js/config/lang.properties | 3 +
src/public/js/config/lang_en.properties | 3 +
src/public/js/config/lang_zh.properties | 3 +
src/public/js/im/zalyAction.js | 1 +
src/public/js/im/zalyBaseWs.js | 2 +
src/public/js/im/zalyClient.js | 7 +-
src/public/js/im/zalyGroupMsg.js | 4 +-
src/public/js/im/zalyIm.js | 3 +-
src/public/js/im/zalyKey.js | 5 +
src/public/js/im/zalyMsg.js | 5 +
src/public/js/login/login.js | 187 +++++--
src/public/js/zalyjsNative.js | 2 +
src/views/login/loginSite.php | 57 +-
src/views/login/template_login.php | 16 +-
src/views/manage/config/index.php | 210 ++++++--
src/views/manage/config/sitePublicKey.php | 55 +-
src/views/manage/group/indexList.php | 14 -
src/views/manage/group/profile.php | 80 ++-
src/views/manage/home.php | 413 ++++++++++++++
src/views/manage/index.php | 390 +-------------
src/views/manage/miniProgram/add.php | 6 +-
src/views/manage/miniProgram/profile.php | 63 ++-
src/views/manage/user/groups.php | 3 -
src/views/manage/user/indexList.php | 5 +-
src/views/manage/user/profile.php | 76 +--
src/views/miniProgram/square/index.php | 508 ++++++++++++++++++
src/views/msg/groupMsg.php | 6 +-
210 files changed, 3834 insertions(+), 1009 deletions(-)
create mode 100644 src/config.developer.php
create mode 100644 src/controller/Api/.gitignore
create mode 100644 src/controller/Api/Passport/Api_Passport_PasswordUpdateInvitationCodeController.php
create mode 100644 src/controller/Http/File/Http_File_DownloadFileController.php
create mode 100644 src/lib/proto/GPBMetadata/Site/ApiPassportPasswordUpdateInvitationCode.php
create mode 100644 src/lib/proto/Zaly/Proto/Site/ApiPassportPasswordUpdateInvitationCodeRequest.php
create mode 100644 src/lib/proto/Zaly/Proto/Site/ApiPassportPasswordUpdateInvitationCodeResponse.php
create mode 100755 src/views/manage/home.php
create mode 100755 src/views/miniProgram/square/index.php
diff --git a/src/config.developer.php b/src/config.developer.php
new file mode 100644
index 00000000..6c535a7a
--- /dev/null
+++ b/src/config.developer.php
@@ -0,0 +1,10 @@
+ "/Users/sssl/akaxincom/xprof-logs/",
+);
\ No newline at end of file
diff --git a/src/controller/Api/.gitignore b/src/controller/Api/.gitignore
new file mode 100644
index 00000000..5509140f
--- /dev/null
+++ b/src/controller/Api/.gitignore
@@ -0,0 +1 @@
+*.DS_Store
diff --git a/src/controller/Api/File/Api_File_UploadController.php b/src/controller/Api/File/Api_File_UploadController.php
index 8ddeaf1d..d3632bdd 100644
--- a/src/controller/Api/File/Api_File_UploadController.php
+++ b/src/controller/Api/File/Api_File_UploadController.php
@@ -1,4 +1,5 @@
@@ -7,7 +8,7 @@
*/
class Api_File_UploadController extends \BaseController
{
- private $classNameForRequest = '\Zaly\Proto\Site\ApiFileUploadRequest';
+ private $classNameForRequest = '\Zaly\Proto\Site\ApiFileUploadRequest';
public function rpcRequestClassName()
{
@@ -15,7 +16,9 @@ public function rpcRequestClassName()
}
/**
- * @param \Zaly\Proto\Site\ApiFileUploadRequest $request
+ * @param \Zaly\Proto\Site\ApiFileUploadRequest $request $request
+ * @param \Google\Protobuf\Internal\Message $transportData
+ * @throws Exception
*/
public function rpc(\Google\Protobuf\Internal\Message $request, \Google\Protobuf\Internal\Message $transportData)
{
@@ -23,15 +26,21 @@ public function rpc(\Google\Protobuf\Internal\Message $request, \Google\Protobuf
$fileType = $request->getFileType();
$isMessageAttachment = $request->getIsMessageAttachment();
- $fileId = $this->ctx->File_Manager->saveFile($file);
- if (empty($fileId)) {
- $this->setRpcError("error.file.wrong", "the file type is not supported.");
- }
-
$response = new \Zaly\Proto\Site\ApiFileUploadResponse();
- $response->setFileId($fileId);
- $this->setRpcError($this->defaultErrorCode, "");
+ try {
+ $fileId = $this->ctx->File_Manager->saveFile($file);
+ if (empty($fileId)) {
+ $this->setRpcError("error.file.wrong", "the file type is not supported.");
+ }
+ $response->setFileId($fileId);
+ $this->setRpcError($this->defaultErrorCode, "");
+
+ } catch (Exception $e) {
+ $this->setRpcError("error.alert", $e->getMessage());
+ $this->logger->error($this->action, $e);
+ }
$this->rpcReturn($this->getRequestAction(), $response);
+ return;
}
}
diff --git a/src/controller/Api/Group/Api_Group_BaseController.php b/src/controller/Api/Group/Api_Group_BaseController.php
index 12fb02e7..dfb6f22e 100644
--- a/src/controller/Api/Group/Api_Group_BaseController.php
+++ b/src/controller/Api/Group/Api_Group_BaseController.php
@@ -159,6 +159,7 @@ protected function getPublicGroupProfile($group)
$publicUserProfile = $this->getPublicUserProfile($user);
if ($user['memberType'] == $ownerType) {
$ownerUser = $publicUserProfile;
+ $groupProfile->setOwner($ownerUser);
} else if ($user["memberType"] == $adminType) {
$adminUsers[] = $publicUserProfile;
}
@@ -168,7 +169,6 @@ protected function getPublicGroupProfile($group)
$groupProfile->setAdmins($adminUsers);
}
- $groupProfile->setOwner($ownerUser);
$speakers = (isset($group['speakers']) && $group['speakers'] != "")
? json_decode($group['speakers'], true)
: [];
diff --git a/src/controller/Api/Passport/Api_Passport_PasswordUpdateInvitationCodeController.php b/src/controller/Api/Passport/Api_Passport_PasswordUpdateInvitationCodeController.php
new file mode 100644
index 00000000..1a7384cb
--- /dev/null
+++ b/src/controller/Api/Passport/Api_Passport_PasswordUpdateInvitationCodeController.php
@@ -0,0 +1,109 @@
+classNameForRequest;
+ }
+
+ /**
+ * @param \Zaly\Proto\Site\ApiPassportPasswordUpdateInvitationCodeRequest $request
+ * @param \Google\Protobuf\Internal\Message $transportData
+ */
+ public function rpc(\Google\Protobuf\Internal\Message $request, \Google\Protobuf\Internal\Message $transportData)
+ {
+ $tag = __CLASS__ . '-' . __FUNCTION__;
+ try{
+ $invitationCode = $request->getInvitationCode();
+ $sitePubkPem = $request->getSitePubkPem();
+ $preSessionId = $request->getPreSessionId();
+
+ if(!$sitePubkPem || strlen($sitePubkPem) < 0) {
+ $errorCode = $this->zalyError->errorSitePubkPem;
+ $errorInfo = $this->zalyError->getErrorInfo($errorCode);
+ $this->setRpcError($errorCode, $errorInfo);
+ throw new Exception("sitePubkPem is not exists");
+ }
+
+ if(!$invitationCode || strlen($invitationCode) < 0 ) {
+ $errorCode = $this->zalyError->errorUpdateInvitation;
+ $errorInfo = $this->zalyError->getErrorInfo($errorCode);
+ $this->setRpcError($errorCode, $errorInfo);
+ throw new Exception("invitationCode is not exists");
+ }
+
+ $preSessionId = $this->updateUserInfo($preSessionId, $invitationCode, $sitePubkPem);
+ $response = $this->getResponse($preSessionId);
+ $this->setRpcError($this->defaultErrorCode, "");
+ $this->rpcReturn($transportData->getAction(), $response);
+ }catch (Exception $ex) {
+ $errorCode = $this->zalyError->errorUpdateInvitation;
+ $errorInfo = $this->zalyError->getErrorInfo($errorCode);
+ $this->setRpcError($errorCode, $errorInfo);
+ $this->ctx->Wpf_Logger->error($tag, "error_msg=" . $ex->getMessage());
+ $this->rpcReturn($transportData->getAction(), new $this->classNameForResponse());
+ }
+
+ }
+
+ public function updateUserInfo($preSessionId, $invitationCode, $sitePubkPem)
+ {
+ $tag = __CLASS__ . '-' . __FUNCTION__;
+
+ try{
+ $userInfo = $this->ctx->PassportPasswordPreSessionTable->getInfoByPreSessionId($preSessionId);
+
+ $this->ctx->BaseTable->db->beginTransaction();
+
+ if($userInfo == false) {
+ throw new Exception("preSessionId for update is null");
+ }
+ $userId = $userInfo['userId'];
+ $updateData = [
+ "invitationCode" => $invitationCode,
+ ];
+ $where = ["userId" => $userId];
+
+ $this->ctx->PassportPasswordTable->updateUserData($where, $updateData);
+
+ $newPreSessionId = ZalyHelper::generateStrId();
+
+ $preSessionInfo = [
+ "userId" => $userId,
+ "preSessionId" => $newPreSessionId,
+ "sitePubkPem" => base64_encode($sitePubkPem)
+ ];
+
+ $updatePreSessionWhere = [
+ "userId" => $userId,
+ ];
+ $this->ctx->PassportPasswordPreSessionTable->updatePreSessionData($updatePreSessionWhere, $preSessionInfo);
+
+ $this->ctx->BaseTable->db->commit();
+
+ return $newPreSessionId;
+ }catch (Exception $ex) {
+ $this->ctx->Wpf_Logger->error($tag, "error_msg=" . $ex->getMessage());
+ $this->ctx->BaseTable->db->rollback();
+ throw new Exception($ex->getMessage());
+ }
+ }
+
+ public function getResponse($preSessionId)
+ {
+ $response = new \Zaly\Proto\Site\ApiPassportPasswordUpdateInvitationCodeResponse();
+ $response->setPreSessionId($preSessionId);
+ return $response;
+ }
+}
\ No newline at end of file
diff --git a/src/controller/Api/Site/Api_Site_LoginController.php b/src/controller/Api/Site/Api_Site_LoginController.php
index 98b62094..a9901ca7 100644
--- a/src/controller/Api/Site/Api_Site_LoginController.php
+++ b/src/controller/Api/Site/Api_Site_LoginController.php
@@ -52,7 +52,7 @@ public function rpc(\Google\Protobuf\Internal\Message $request, \Google\Protobuf
// $this->ctx->Wpf_Logger->info("api.site.login", " -devicePubkPem=" . $devicePubkPem);
if (!$preSessionId) {
- $errorCode = $this->zalyError->errorSession;
+ $errorCode = $this->zalyError->errorSiteLogin;
$errorInfo = $this->zalyError->getErrorInfo($errorCode);
$this->setRpcError($errorCode, $errorInfo);
throw new Exception($errorInfo);
@@ -73,7 +73,7 @@ public function rpc(\Google\Protobuf\Internal\Message $request, \Google\Protobuf
$this->setRpcError($this->defaultErrorCode, "");
$this->rpcReturn($transportData->getAction(), $response);
} catch (Exception $ex) {
- $errorCode = $this->zalyError->errorSession;
+ $errorCode = $this->zalyError->errorSiteLogin;
$errorInfo = $this->zalyError->getErrorInfo($errorCode);
$this->ctx->Wpf_Logger->error($tag, "=========error=" . $ex->getMessage());
diff --git a/src/controller/BaseController.php b/src/controller/BaseController.php
index 415203e2..13e28f36 100644
--- a/src/controller/BaseController.php
+++ b/src/controller/BaseController.php
@@ -35,6 +35,7 @@ abstract class BaseController extends \Wpf_Controller
"api.session.verify",
"api.passport.passwordFindPassword",
"api.passport.passwordResetPassword",
+ "api.passport.passwordUpdateInvitationCode",
"api.plugin.proxy",
];
protected $sessionIdTimeOut = 36000000; //10个小时的毫秒
@@ -316,20 +317,26 @@ public function checkSessionId($action)
public function getPublicUserProfile($userInfo)
{
- $publicUserProfile = new \Zaly\Proto\Core\PublicUserProfile();
- $avatar = isset($userInfo['avatar']) ? $userInfo['avatar'] : "";
- $publicUserProfile->setAvatar($avatar);
- $publicUserProfile->setUserId($userInfo['userId']);
- $publicUserProfile->setLoginname($userInfo['loginName']);
- $publicUserProfile->setNickname($userInfo['nickname']);
- $publicUserProfile->setNicknameInLatin($userInfo['nicknameInLatin']);
-
- if (isset($userInfo['availableType'])) {
- $publicUserProfile->setAvailableType($userInfo['availableType']);
- } else {
- $publicUserProfile->setAvailableType(\Zaly\Proto\Core\UserAvailableType::UserAvailableNormal);
+ try{
+ $publicUserProfile = new \Zaly\Proto\Core\PublicUserProfile();
+ $avatar = isset($userInfo['avatar']) ? $userInfo['avatar'] : "";
+ $publicUserProfile->setAvatar($avatar);
+ $publicUserProfile->setUserId($userInfo['userId']);
+ $publicUserProfile->setLoginname($userInfo['loginName']);
+ $publicUserProfile->setNickname($userInfo['nickname']);
+ $publicUserProfile->setNicknameInLatin($userInfo['nicknameInLatin']);
+
+ if (isset($userInfo['availableType'])) {
+ $publicUserProfile->setAvailableType($userInfo['availableType']);
+ } else {
+ $publicUserProfile->setAvailableType(\Zaly\Proto\Core\UserAvailableType::UserAvailableNormal);
+ }
+ return $publicUserProfile;
+ }catch (Exception $ex) {
+ $this->ctx->Wpf_Logger->error("get public user profile", $ex);
+ $publicUserProfile = new \Zaly\Proto\Core\PublicUserProfile();
+ return $publicUserProfile;
}
- return $publicUserProfile;
}
public function getGroupMemberUserProfile($user)
diff --git a/src/controller/Http/File/Http_File_DownloadFileController.php b/src/controller/Http/File/Http_File_DownloadFileController.php
new file mode 100644
index 00000000..805cf6f6
--- /dev/null
+++ b/src/controller/Http/File/Http_File_DownloadFileController.php
@@ -0,0 +1,71 @@
+ctx->SiteGroupMessageTable->checkUserCanLoadImg($messageId, $this->userId);
+ if(!$info) {
+ throw new Exception("can't load img");
+ }
+ $this->ctx->Wpf_Logger->info($tag, "info ==" . json_encode($info) );
+ } else {
+
+ ////TODO u2 can load img
+ $info = $this->ctx->SiteU2MessageTable->queryMessageByMsgId([$messageId]);
+
+ if(!$info) {
+ throw new Exception("can't load img");
+ }
+ $info = array_shift($info);
+
+ if($info['fromUserId'] != $this->userId && $info['toUserId'] != $this->userId) {
+ throw new Exception("can't load img");
+ }
+ }
+ $contentJson = $info['content'];
+ $contentArr = json_decode($contentJson, true);
+ $url = $contentArr['url'];
+ if($url != $fileId) {
+ throw new Exception("get img content is not ok");
+ }
+ }
+
+ $imgContent = $this->ctx->File_Manager->readFile($fileId);
+
+ if(strlen($imgContent)<1) {
+ throw new Exception("load img void");
+ }
+ header('Cache-Control: max-age=86400, public');
+ header("Content-type:image/png");
+
+ if($returnBase64) {
+ echo base64_decode($imgContent);
+ } else {
+ echo $imgContent;
+ }
+
+ }catch (Exception $e) {
+ header("Content-type:image/jpg");
+ $this->ctx->Wpf_Logger->error($tag, "error_msg ==" .$e->getMessage() );
+ echo "failed";
+ }
+ }
+}
diff --git a/src/controller/InstallDBController.php b/src/controller/InstallDBController.php
index 626e6e54..6da1470d 100644
--- a/src/controller/InstallDBController.php
+++ b/src/controller/InstallDBController.php
@@ -606,10 +606,10 @@ private function _insertSiteLoginPlugin()
$sql = 'insert into
sitePlugin(pluginId, name, logo, sort, landingPageUrl,landingPageWithProxy, usageType,loadingType,permissionType,authKey)
values
- (107,
+ (106,
"gif",
"",
- 107,
+ 106,
"index.php?action=miniProgram.gif.index",
1,
' . Zaly\Proto\Core\PluginUsageType::PluginUsageGroupMessage . ',
diff --git a/src/controller/Manage/Manage_CommonController.php b/src/controller/Manage/Manage_CommonController.php
index 43a56184..ab6ff785 100644
--- a/src/controller/Manage/Manage_CommonController.php
+++ b/src/controller/Manage/Manage_CommonController.php
@@ -20,4 +20,17 @@ protected function getMiniProgramId()
}
+ protected function preRequest()
+ {
+ if (!$this->ctx->Site_Config->isManager($this->userId)) {
+ //不是管理员,exception
+ throw new Exception("user has no permission");
+ }
+ }
+
+ protected function requestException($ex)
+ {
+ $this->showPermissionPage();
+ }
+
}
\ No newline at end of file
diff --git a/src/controller/Manage/Manage_IndexController.php b/src/controller/Manage/Manage_IndexController.php
index 5aa2fc8f..54533790 100644
--- a/src/controller/Manage/Manage_IndexController.php
+++ b/src/controller/Manage/Manage_IndexController.php
@@ -11,8 +11,14 @@ class Manage_IndexController extends Manage_CommonController
public function doRequest()
{
- //jump to backStage management
- echo $this->display("manage_index");
+ $page = $_GET['page'];
+ $params = ["lang" => $this->language];
+
+ if ("home" == $page) {
+ echo $this->display("manage_home", $params);
+ } else {
+ echo $this->display("manage_index", $params);
+ }
return;
}
diff --git a/src/controller/MiniProgram/Gif/MiniProgram_Gif_IndexController.php b/src/controller/MiniProgram/Gif/MiniProgram_Gif_IndexController.php
index a9b93426..d0e27a75 100644
--- a/src/controller/MiniProgram/Gif/MiniProgram_Gif_IndexController.php
+++ b/src/controller/MiniProgram/Gif/MiniProgram_Gif_IndexController.php
@@ -6,7 +6,7 @@
* Time: 2:27 PM
*/
-class MiniProgram_Gif_IndexController extends MiniProgramController
+class MiniProgram_Gif_IndexController extends MiniProgramController
{
private $gifPluginId = 106;
@@ -16,15 +16,23 @@ class MiniProgram_Gif_IndexController extends MiniProgramController
public function getMiniProgramId()
{
- // TODO: Implement getMiniProgramId() method.
return $this->gifPluginId;
}
+ public function requestException($ex)
+ {
+ $this->showPermissionPage();
+ }
+
+ public function preRequest()
+ {
+ }
+
public function doRequest()
{
header('Access-Control-Allow-Origin: *');
$method = $_SERVER['REQUEST_METHOD'];
- $tag = __CLASS__ ."-".__FUNCTION__;
+ $tag = __CLASS__ . "-" . __FUNCTION__;
if ($method == 'POST') {
$this->ctx->Wpf_Logger->error($tag, "post msg =" . json_encode($_POST));
$message = $_POST;
@@ -32,16 +40,16 @@ public function doRequest()
} else {
$pageUrl = $_COOKIE['duckchat_page_url'];
$pageUrl = parse_url($pageUrl);
- parse_str($pageUrl['query'], $queries);
+ parse_str($pageUrl['query'], $queries);
$x = $queries['x'];
list($type, $toId) = explode("-", $x);
- if($toId == $this->userId) {
+ if ($toId == $this->userId) {
return;
}
- if($type == $this->groupType) {
+ if ($type == $this->groupType) {
$roomType = "MessageRoomGroup";
- }elseif($type == $this->u2Type) {
+ } elseif ($type == $this->u2Type) {
$roomType = "MessageRoomU2";
}
@@ -76,67 +84,67 @@ public function doRequest()
"url" => "https://media.giphy.com/media/NWLUwtaivTes8/200w_d.gif",
"width" => 200,
"height" => 200
- ],[
+ ], [
"url" => "https://media.giphy.com/media/NWLUwtaivTes8/200w_d.gif",
"width" => 200,
"height" => 200
- ],[
+ ], [
"url" => "https://media.giphy.com/media/NWLUwtaivTes8/200w_d.gif",
"width" => 200,
"height" => 200
- ],[
+ ], [
"url" => "https://media.giphy.com/media/NWLUwtaivTes8/200w_d.gif",
"width" => 200,
"height" => 200
- ],[
+ ], [
"url" => "https://media.giphy.com/media/NWLUwtaivTes8/200w_d.gif",
"width" => 200,
"height" => 200
- ],[
+ ], [
"url" => "https://media.giphy.com/media/NWLUwtaivTes8/200w_d.gif",
"width" => 200,
"height" => 200
- ],[
+ ], [
"url" => "https://media.giphy.com/media/NWLUwtaivTes8/200w_d.gif",
"width" => 200,
"height" => 200
- ],[
+ ], [
"url" => "https://media.giphy.com/media/NWLUwtaivTes8/200w_d.gif",
"width" => 200,
"height" => 200
- ],[
+ ], [
"url" => "https://media.giphy.com/media/NWLUwtaivTes8/200w_d.gif",
"width" => 200,
"height" => 200
- ],[
+ ], [
"url" => "https://media.giphy.com/media/NWLUwtaivTes8/200w_d.gif",
"width" => 200,
"height" => 200
- ],[
+ ], [
"url" => "https://media.giphy.com/media/NWLUwtaivTes8/200w_d.gif",
"width" => 200,
"height" => 200
- ],[
+ ], [
"url" => "https://media.giphy.com/media/NWLUwtaivTes8/200w_d.gif",
"width" => 200,
"height" => 200
- ],[
+ ], [
"url" => "https://media.giphy.com/media/NWLUwtaivTes8/200w_d.gif",
"width" => 200,
"height" => 200
- ],[
+ ], [
"url" => "https://media.giphy.com/media/NWLUwtaivTes8/200w_d.gif",
"width" => 200,
"height" => 200
- ],[
+ ], [
"url" => "https://media.giphy.com/media/NWLUwtaivTes8/200w_d.gif",
"width" => 200,
"height" => 200
- ],[
+ ], [
"url" => "https://media.giphy.com/media/NWLUwtaivTes8/200w_d.gif",
"width" => 200,
"height" => 200
- ],[
+ ], [
"url" => "https://media.giphy.com/media/NWLUwtaivTes8/200w_d.gif",
"width" => 200,
"height" => 200
@@ -147,6 +155,7 @@ public function doRequest()
return;
}
}
+
private function sendMessage($msg)
{
@@ -161,7 +170,7 @@ private function sendMessage($msg)
$msgDataJsonStr = json_encode($msgReqData);
$siteAddress = ZalyConfig::getConfig("siteAddress");
- $sendMsgUrl = $siteAddress."/index.php?action=".$this->action."&body_format=json&miniProgramId=".$this->gifPluginId;
+ $sendMsgUrl = $siteAddress . "/index.php?action=" . $this->action . "&body_format=json&miniProgramId=" . $this->gifPluginId;
$this->ctx->Wpf_Logger->error("api.site.login", "get profile from platform url=" . $sendMsgUrl);
$this->ctx->Wpf_Logger->error("api.site.login", "get profile from platform msgData =" . $msgDataJsonStr);
diff --git a/src/controller/MiniProgram/Square/MiniProgram_Square_IndexController.php b/src/controller/MiniProgram/Square/MiniProgram_Square_IndexController.php
index a11b30a6..c4582b90 100644
--- a/src/controller/MiniProgram/Square/MiniProgram_Square_IndexController.php
+++ b/src/controller/MiniProgram/Square/MiniProgram_Square_IndexController.php
@@ -16,6 +16,14 @@ public function getMiniProgramId()
return $this->squarePluginId;
}
+ public function preRequest()
+ {
+ if (!$this->ctx->Site_Config->isManager($this->userId)) {
+ //不是管理员,exception
+ throw new Exception("user has no permission");
+ }
+ }
+
public function doRequest()
{
header('Access-Control-Allow-Origin: *');
@@ -31,4 +39,10 @@ public function doRequest()
}
}
+
+ public function requestException($ex)
+ {
+// $this->showPermissionPage();
+ }
+
}
\ No newline at end of file
diff --git a/src/controller/MiniProgramController.php b/src/controller/MiniProgramController.php
index edc1e78c..80da74c1 100644
--- a/src/controller/MiniProgramController.php
+++ b/src/controller/MiniProgramController.php
@@ -32,10 +32,29 @@ public function __construct(Wpf_Ctx $context)
$this->logger = new Wpf_Logger();
}
- protected abstract function doRequest();
protected abstract function getMiniProgramId();
+ //for permission
+
+ /**
+ * 在处理正式请求之前,预处理一些操作,比如权限校验
+ * @return bool
+ */
+ protected abstract function preRequest();
+
+ /**
+ * 处理正式的请求逻辑,比如跳转界面,post获取信息等
+ */
+ protected abstract function doRequest();
+
+ /**
+ * preRequest && doRequest 发生异常情况,执行
+ * @param $ex
+ * @return mixed
+ */
+ protected abstract function requestException($ex);
+
/**
* 根据http request cookie中的duckchat_sessionId 做权限判断
* @return string|void
@@ -67,21 +86,17 @@ public function doIndex()
}
$this->userId = $userPublicProfile->getUserId();
- $this->ctx->Wpf_Logger->info("", "---------------UserID=" . $this->userId);
-
- if (!$this->ctx->Site_Config->isManager($this->userId)) {
- //不是管理员,exception
- throw new Exception("user has no permission");
- }
+ $this->ctx->Wpf_Logger->info("", "Mini Program Request UserId=" . $this->userId);
$this->getAndSetClientLang();
+ $this->preRequest();
$this->doRequest();
} catch (Exception $ex) {
$this->ctx->Wpf_Logger->error($tag, "error msg =" . $ex);
- //echo permission page
- $this->showPermissionPage();
+ $this->requestException($ex);
}
+
}
/**
@@ -196,10 +211,10 @@ private function getHeaderValue($header, $key)
return $header['_' . $key];
}
- public function showPermissionPage()
+ protected function showPermissionPage()
{
- $apiPageLogin = ZalyConfig::getConfig("apiPageLogin");
- header("Location:" . $apiPageLogin);
+// $apiPageLogin = ZalyConfig::getConfig("apiPageLogin");
+// header("Location:" . "http://www.akaxin.com/");
exit();
}
diff --git a/src/index.php b/src/index.php
index bf5e5daa..1dc7292d 100644
--- a/src/index.php
+++ b/src/index.php
@@ -1,4 +1,12 @@
100) {
+ $data = tideways_xhprof_disable();
+ file_put_contents(
+ "{$logDir}/{$timeCost}ms" . uniqid() . ".file.xhprof",
+ serialize($data)
+ );
+ } else {
+ tideways_xhprof_disable();
+ }
+}
diff --git a/src/lib/Util/ZalyErrorBase.php b/src/lib/Util/ZalyErrorBase.php
index 2de8424d..857d875d 100644
--- a/src/lib/Util/ZalyErrorBase.php
+++ b/src/lib/Util/ZalyErrorBase.php
@@ -63,6 +63,7 @@ abstract class ZalyErrorBase
public $errorPreSessionId = "error.preSessionId";
public $errorLoginPassportPassword = "error.login.passportPassword";
+ public $errorUpdateInvitation = "error.update.invitationCode";
public $errorVerifyToken = "error.verify.token";
public $errorUpdatePwd = "error.update.pwd";
diff --git a/src/lib/Util/ZalyErrorEn.php b/src/lib/Util/ZalyErrorEn.php
index af562c0f..b31a55d2 100644
--- a/src/lib/Util/ZalyErrorEn.php
+++ b/src/lib/Util/ZalyErrorEn.php
@@ -55,7 +55,7 @@ class ZalyErrorEn extends ZalyErrorBase
"error.verify.token" => "Verification code error",
"error.update.pwd" => "Update password failed",
-
+ "error.update.invitationCode" => "Update invitation failed",
"error.loginName.length" => "LoginName length is illegal",
"error.password.length" => "Password length is illegal"
];
diff --git a/src/lib/Util/ZalyErrorZh.php b/src/lib/Util/ZalyErrorZh.php
index d8e4518d..789c6b4b 100644
--- a/src/lib/Util/ZalyErrorZh.php
+++ b/src/lib/Util/ZalyErrorZh.php
@@ -55,6 +55,7 @@ class ZalyErrorZh extends ZalyErrorBase
"error.verify.token" => "验证码错误",
"error.update.pwd" => "更新密码失败",
+ "error.update.invitationCode" => "更新邀请码失败",
"error.loginName.length" => "登录名长度不合法",
"error.password.length" => "密码长度不合法",
diff --git a/src/lib/Util/ZalyHelper.php b/src/lib/Util/ZalyHelper.php
index 4a82ad9b..e5b4c636 100644
--- a/src/lib/Util/ZalyHelper.php
+++ b/src/lib/Util/ZalyHelper.php
@@ -140,7 +140,7 @@ public static function checkOpensslEncryptExists()
public static function isEmail($email)
{
- return preg_match("/([\w\-]+\@[\w\-]+\.[\w\-]+)/", $email);
+ return preg_match("/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/", $email);
}
public static function isPhoneNumber($phoneNumber)
diff --git a/src/lib/proto/GPBMetadata/Site/ApiPassportPasswordUpdateInvitationCode.php b/src/lib/proto/GPBMetadata/Site/ApiPassportPasswordUpdateInvitationCode.php
new file mode 100644
index 00000000..bb5da655
--- /dev/null
+++ b/src/lib/proto/GPBMetadata/Site/ApiPassportPasswordUpdateInvitationCode.php
@@ -0,0 +1,35 @@
+internalAddGeneratedFile(hex2bin(
+ "0add020a35736974652f6170695f70617373706f72745f70617373776f72" .
+ "645f757064617465496e7669746174696f6e436f64652e70726f746f1204" .
+ "7369746522730a2e41706950617373706f727450617373776f7264557064" .
+ "617465496e7669746174696f6e436f64655265717565737412130a0b7369" .
+ "74655075626b50656d18012001280912160a0e696e7669746174696f6e43" .
+ "6f646518022001280912140a0c70726553657373696f6e49641803200128" .
+ "0922470a2f41706950617373706f727450617373776f7264557064617465" .
+ "496e7669746174696f6e436f6465526573706f6e736512140a0c70726553" .
+ "657373696f6e496418012001280942580a13636f6d2e7a616c792e70726f" .
+ "746f2e736974655a2f6769746875622e636f6d2f6475636b636861742f64" .
+ "75636b636861742d676174657761792f70726f746f2f73697465ca020f5a" .
+ "616c795c50726f746f5c53697465620670726f746f33"
+ ));
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/src/lib/proto/Zaly/Proto/Client/ImStcMessageRequest.php b/src/lib/proto/Zaly/Proto/Client/ImStcMessageRequest.php
index 1228f83a..67540582 100644
--- a/src/lib/proto/Zaly/Proto/Client/ImStcMessageRequest.php
+++ b/src/lib/proto/Zaly/Proto/Client/ImStcMessageRequest.php
@@ -20,9 +20,18 @@ class ImStcMessageRequest extends \Google\Protobuf\Internal\Message
*/
private $list;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Zaly\Proto\Core\Message[]|\Google\Protobuf\Internal\RepeatedField $list
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Client\ImStcMessage::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Client/ImStcNewsRequest.php b/src/lib/proto/Zaly/Proto/Client/ImStcNewsRequest.php
index 5f6b93f9..f191b3dd 100644
--- a/src/lib/proto/Zaly/Proto/Client/ImStcNewsRequest.php
+++ b/src/lib/proto/Zaly/Proto/Client/ImStcNewsRequest.php
@@ -16,9 +16,17 @@
class ImStcNewsRequest extends \Google\Protobuf\Internal\Message
{
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Client\ImStcNews::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
}
diff --git a/src/lib/proto/Zaly/Proto/Client/ImStcPongRequest.php b/src/lib/proto/Zaly/Proto/Client/ImStcPongRequest.php
index 9b4570df..34799b5f 100644
--- a/src/lib/proto/Zaly/Proto/Client/ImStcPongRequest.php
+++ b/src/lib/proto/Zaly/Proto/Client/ImStcPongRequest.php
@@ -20,9 +20,18 @@ class ImStcPongRequest extends \Google\Protobuf\Internal\Message
*/
private $random = '';
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $random
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Client\ImStcPong::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Core/AllGroupProfile.php b/src/lib/proto/Zaly/Proto/Core/AllGroupProfile.php
index 578cda85..e0506749 100644
--- a/src/lib/proto/Zaly/Proto/Core/AllGroupProfile.php
+++ b/src/lib/proto/Zaly/Proto/Core/AllGroupProfile.php
@@ -33,9 +33,21 @@ class AllGroupProfile extends \Google\Protobuf\Internal\Message
*/
private $speakers;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Zaly\Proto\Core\PublicGroupProfile $profile
+ * @type \Zaly\Proto\Core\PublicUserProfile $owner
+ * @type \Zaly\Proto\Core\PublicUserProfile[]|\Google\Protobuf\Internal\RepeatedField $admins
+ * @type \Zaly\Proto\Core\PublicUserProfile[]|\Google\Protobuf\Internal\RepeatedField $speakers
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Core\Group::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Core/AllSiteConfig.php b/src/lib/proto/Zaly/Proto/Core/AllSiteConfig.php
index e210fa6e..738c79ff 100644
--- a/src/lib/proto/Zaly/Proto/Core/AllSiteConfig.php
+++ b/src/lib/proto/Zaly/Proto/Core/AllSiteConfig.php
@@ -48,9 +48,25 @@ class AllSiteConfig extends \Google\Protobuf\Internal\Message
*/
private $maxClientsNum = 0;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Zaly\Proto\Core\PublicSiteConfig $public
+ * @type int $HooksType
+ * @type string $hooksRedisServer
+ * @type int $PushType
+ * @type string $siteIdPrikBase64
+ * @type string $maxGroupMembers
+ * @type int $groupInvitationUrlExpiration
+ * @type int $maxClientsNum
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Core\Site::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Core/AllUserProfile.php b/src/lib/proto/Zaly/Proto/Core/AllUserProfile.php
index 4a0db965..b0ccec2a 100644
--- a/src/lib/proto/Zaly/Proto/Core/AllUserProfile.php
+++ b/src/lib/proto/Zaly/Proto/Core/AllUserProfile.php
@@ -22,9 +22,19 @@ class AllUserProfile extends \Google\Protobuf\Internal\Message
*/
private $timeReg = 0;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Zaly\Proto\Core\PublicUserProfile $public
+ * @type int|string $timeReg
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Core\User::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Core/ApplyUserProfile.php b/src/lib/proto/Zaly/Proto/Core/ApplyUserProfile.php
index a3815124..187ec82c 100644
--- a/src/lib/proto/Zaly/Proto/Core/ApplyUserProfile.php
+++ b/src/lib/proto/Zaly/Proto/Core/ApplyUserProfile.php
@@ -22,9 +22,19 @@ class ApplyUserProfile extends \Google\Protobuf\Internal\Message
*/
private $greetings = '';
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Zaly\Proto\Core\PublicUserProfile $public
+ * @type string $greetings
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Core\User::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Core/AudioMessage.php b/src/lib/proto/Zaly/Proto/Core/AudioMessage.php
index 95c59275..b5687ae3 100644
--- a/src/lib/proto/Zaly/Proto/Core/AudioMessage.php
+++ b/src/lib/proto/Zaly/Proto/Core/AudioMessage.php
@@ -22,9 +22,19 @@ class AudioMessage extends \Google\Protobuf\Internal\Message
*/
private $time = 0;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $url
+ * @type int $time
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Core\Message::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Core/BuiltinPluginId.php b/src/lib/proto/Zaly/Proto/Core/BuiltinPluginId.php
index 036a6daa..97150a99 100644
--- a/src/lib/proto/Zaly/Proto/Core/BuiltinPluginId.php
+++ b/src/lib/proto/Zaly/Proto/Core/BuiltinPluginId.php
@@ -5,7 +5,7 @@
namespace Zaly\Proto\Core;
/**
- * Protobuf enum Core\BuiltinPluginId
+ * Protobuf type core.BuiltinPluginId
*/
class BuiltinPluginId
{
diff --git a/src/lib/proto/Zaly/Proto/Core/DataWriteType.php b/src/lib/proto/Zaly/Proto/Core/DataWriteType.php
index 3398964d..0fe60f49 100644
--- a/src/lib/proto/Zaly/Proto/Core/DataWriteType.php
+++ b/src/lib/proto/Zaly/Proto/Core/DataWriteType.php
@@ -5,7 +5,7 @@
namespace Zaly\Proto\Core;
/**
- * Protobuf enum Core\DataWriteType
+ * Protobuf type core.DataWriteType
*/
class DataWriteType
{
diff --git a/src/lib/proto/Zaly/Proto/Core/FileType.php b/src/lib/proto/Zaly/Proto/Core/FileType.php
index 4be1ce93..2be432da 100644
--- a/src/lib/proto/Zaly/Proto/Core/FileType.php
+++ b/src/lib/proto/Zaly/Proto/Core/FileType.php
@@ -8,7 +8,7 @@
* there are lots of mime.types here:
* http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types
*
- * Protobuf enum Core\FileType
+ * Protobuf type core.FileType
*/
class FileType
{
diff --git a/src/lib/proto/Zaly/Proto/Core/FriendRelationType.php b/src/lib/proto/Zaly/Proto/Core/FriendRelationType.php
index edb22e89..88011b8c 100644
--- a/src/lib/proto/Zaly/Proto/Core/FriendRelationType.php
+++ b/src/lib/proto/Zaly/Proto/Core/FriendRelationType.php
@@ -5,7 +5,7 @@
namespace Zaly\Proto\Core;
/**
- * Protobuf enum Core\FriendRelationType
+ * Protobuf type core.FriendRelationType
*/
class FriendRelationType
{
diff --git a/src/lib/proto/Zaly/Proto/Core/FriendUserProfile.php b/src/lib/proto/Zaly/Proto/Core/FriendUserProfile.php
index 0b74881d..c58bfbea 100644
--- a/src/lib/proto/Zaly/Proto/Core/FriendUserProfile.php
+++ b/src/lib/proto/Zaly/Proto/Core/FriendUserProfile.php
@@ -32,9 +32,23 @@ class FriendUserProfile extends \Google\Protobuf\Internal\Message
*/
private $relation = 0;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Zaly\Proto\Core\PublicUserProfile $profile
+ * friend user profile
+ * @type bool $mute
+ * true:mute false:not mute
+ * @type int $relation
+ * relation between to user
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Core\User::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Core/GatewayType.php b/src/lib/proto/Zaly/Proto/Core/GatewayType.php
index a5ae8b46..4bca3e65 100644
--- a/src/lib/proto/Zaly/Proto/Core/GatewayType.php
+++ b/src/lib/proto/Zaly/Proto/Core/GatewayType.php
@@ -5,7 +5,7 @@
namespace Zaly\Proto\Core;
/**
- * Protobuf enum Core\GatewayType
+ * Protobuf type core.GatewayType
*/
class GatewayType
{
diff --git a/src/lib/proto/Zaly/Proto/Core/GroupDescription.php b/src/lib/proto/Zaly/Proto/Core/GroupDescription.php
index 59be2962..18ff648f 100644
--- a/src/lib/proto/Zaly/Proto/Core/GroupDescription.php
+++ b/src/lib/proto/Zaly/Proto/Core/GroupDescription.php
@@ -22,9 +22,19 @@ class GroupDescription extends \Google\Protobuf\Internal\Message
*/
private $body = '';
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $type
+ * @type string $body
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Core\Group::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Core/GroupDescriptionType.php b/src/lib/proto/Zaly/Proto/Core/GroupDescriptionType.php
index 349d69e1..29e222c5 100644
--- a/src/lib/proto/Zaly/Proto/Core/GroupDescriptionType.php
+++ b/src/lib/proto/Zaly/Proto/Core/GroupDescriptionType.php
@@ -5,7 +5,7 @@
namespace Zaly\Proto\Core;
/**
- * Protobuf enum Core\GroupDescriptionType
+ * Protobuf type core.GroupDescriptionType
*/
class GroupDescriptionType
{
diff --git a/src/lib/proto/Zaly/Proto/Core/GroupJoinPermissionType.php b/src/lib/proto/Zaly/Proto/Core/GroupJoinPermissionType.php
index 42c35323..cfb1769b 100644
--- a/src/lib/proto/Zaly/Proto/Core/GroupJoinPermissionType.php
+++ b/src/lib/proto/Zaly/Proto/Core/GroupJoinPermissionType.php
@@ -5,7 +5,7 @@
namespace Zaly\Proto\Core;
/**
- * Protobuf enum Core\GroupJoinPermissionType
+ * Protobuf type core.GroupJoinPermissionType
*/
class GroupJoinPermissionType
{
diff --git a/src/lib/proto/Zaly/Proto/Core/GroupMemberType.php b/src/lib/proto/Zaly/Proto/Core/GroupMemberType.php
index b974bfc7..47ee259e 100644
--- a/src/lib/proto/Zaly/Proto/Core/GroupMemberType.php
+++ b/src/lib/proto/Zaly/Proto/Core/GroupMemberType.php
@@ -5,7 +5,7 @@
namespace Zaly\Proto\Core;
/**
- * Protobuf enum Core\GroupMemberType
+ * Protobuf type core.GroupMemberType
*/
class GroupMemberType
{
diff --git a/src/lib/proto/Zaly/Proto/Core/HooksType.php b/src/lib/proto/Zaly/Proto/Core/HooksType.php
index fb1e4295..627210b3 100644
--- a/src/lib/proto/Zaly/Proto/Core/HooksType.php
+++ b/src/lib/proto/Zaly/Proto/Core/HooksType.php
@@ -5,7 +5,7 @@
namespace Zaly\Proto\Core;
/**
- * Protobuf enum Core\HooksType
+ * Protobuf type core.HooksType
*/
class HooksType
{
diff --git a/src/lib/proto/Zaly/Proto/Core/HttpQueryType.php b/src/lib/proto/Zaly/Proto/Core/HttpQueryType.php
index 36057321..a400408a 100644
--- a/src/lib/proto/Zaly/Proto/Core/HttpQueryType.php
+++ b/src/lib/proto/Zaly/Proto/Core/HttpQueryType.php
@@ -5,7 +5,7 @@
namespace Zaly\Proto\Core;
/**
- * Protobuf enum Core\HttpQueryType
+ * Protobuf type core.HttpQueryType
*/
class HttpQueryType
{
diff --git a/src/lib/proto/Zaly/Proto/Core/ImageMessage.php b/src/lib/proto/Zaly/Proto/Core/ImageMessage.php
index 3d6a31cf..60313ba3 100644
--- a/src/lib/proto/Zaly/Proto/Core/ImageMessage.php
+++ b/src/lib/proto/Zaly/Proto/Core/ImageMessage.php
@@ -28,9 +28,21 @@ class ImageMessage extends \Google\Protobuf\Internal\Message
*/
private $height = 0;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $url
+ * url or fileId
+ * @type int $width
+ * @type int $height
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Core\Message::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Core/Message.php b/src/lib/proto/Zaly/Proto/Core/Message.php
index 742ddb3c..7c05ebb4 100644
--- a/src/lib/proto/Zaly/Proto/Core/Message.php
+++ b/src/lib/proto/Zaly/Proto/Core/Message.php
@@ -52,9 +52,37 @@ class Message extends \Google\Protobuf\Internal\Message
protected $toRoom;
protected $maybe;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $msgId
+ * basic info
+ * @type string $fromUserId
+ * @type int|string $pointer
+ * @type int|string $timeServer
+ * @type int $roomType
+ * type info
+ * @type string $toUserId
+ * @type string $toGroupId
+ * @type int $type
+ * body info
+ * @type \Zaly\Proto\Core\TextMessage $text
+ * @type \Zaly\Proto\Core\ImageMessage $image
+ * @type \Zaly\Proto\Core\AudioMessage $audio
+ * @type \Zaly\Proto\Core\WebMessage $web
+ * @type \Zaly\Proto\Core\StatusMessage $status
+ * @type \Zaly\Proto\Core\NoticeMessage $notice
+ * @type \Zaly\Proto\Core\WebNoticeMessage $webNotice
+ * @type bool $treatPointerAsU2Pointer
+ * reverts 15-50
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Core\Message::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Core/MessageRoomType.php b/src/lib/proto/Zaly/Proto/Core/MessageRoomType.php
index e69b3f03..07c1c231 100644
--- a/src/lib/proto/Zaly/Proto/Core/MessageRoomType.php
+++ b/src/lib/proto/Zaly/Proto/Core/MessageRoomType.php
@@ -5,7 +5,7 @@
namespace Zaly\Proto\Core;
/**
- * Protobuf enum Core\MessageRoomType
+ * Protobuf type core.MessageRoomType
*/
class MessageRoomType
{
diff --git a/src/lib/proto/Zaly/Proto/Core/MessageStatus.php b/src/lib/proto/Zaly/Proto/Core/MessageStatus.php
index 46744fc9..a111a77c 100644
--- a/src/lib/proto/Zaly/Proto/Core/MessageStatus.php
+++ b/src/lib/proto/Zaly/Proto/Core/MessageStatus.php
@@ -5,7 +5,7 @@
namespace Zaly\Proto\Core;
/**
- * Protobuf enum Core\MessageStatus
+ * Protobuf type core.MessageStatus
*/
class MessageStatus
{
diff --git a/src/lib/proto/Zaly/Proto/Core/MessageType.php b/src/lib/proto/Zaly/Proto/Core/MessageType.php
index 6361c337..d4497504 100644
--- a/src/lib/proto/Zaly/Proto/Core/MessageType.php
+++ b/src/lib/proto/Zaly/Proto/Core/MessageType.php
@@ -5,7 +5,7 @@
namespace Zaly\Proto\Core;
/**
- * Protobuf enum Core\MessageType
+ * Protobuf type core.MessageType
*/
class MessageType
{
diff --git a/src/lib/proto/Zaly/Proto/Core/NoticeMessage.php b/src/lib/proto/Zaly/Proto/Core/NoticeMessage.php
index 445b7f1e..1a627fad 100644
--- a/src/lib/proto/Zaly/Proto/Core/NoticeMessage.php
+++ b/src/lib/proto/Zaly/Proto/Core/NoticeMessage.php
@@ -18,9 +18,18 @@ class NoticeMessage extends \Google\Protobuf\Internal\Message
*/
private $body = '';
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $body
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Core\Message::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Core/PluginLoadingType.php b/src/lib/proto/Zaly/Proto/Core/PluginLoadingType.php
index ddcd0f77..682a772f 100644
--- a/src/lib/proto/Zaly/Proto/Core/PluginLoadingType.php
+++ b/src/lib/proto/Zaly/Proto/Core/PluginLoadingType.php
@@ -5,7 +5,7 @@
namespace Zaly\Proto\Core;
/**
- * Protobuf enum Core\PluginLoadingType
+ * Protobuf type core.PluginLoadingType
*/
class PluginLoadingType
{
diff --git a/src/lib/proto/Zaly/Proto/Core/PluginPermissionType.php b/src/lib/proto/Zaly/Proto/Core/PluginPermissionType.php
index f5ac7c87..64723603 100644
--- a/src/lib/proto/Zaly/Proto/Core/PluginPermissionType.php
+++ b/src/lib/proto/Zaly/Proto/Core/PluginPermissionType.php
@@ -5,7 +5,7 @@
namespace Zaly\Proto\Core;
/**
- * Protobuf enum Core\PluginPermissionType
+ * Protobuf type core.PluginPermissionType
*/
class PluginPermissionType
{
diff --git a/src/lib/proto/Zaly/Proto/Core/PluginProfile.php b/src/lib/proto/Zaly/Proto/Core/PluginProfile.php
index 4dd54c99..3ee8bf95 100644
--- a/src/lib/proto/Zaly/Proto/Core/PluginProfile.php
+++ b/src/lib/proto/Zaly/Proto/Core/PluginProfile.php
@@ -54,9 +54,27 @@ class PluginProfile extends \Google\Protobuf\Internal\Message
*/
private $userSessionId = '';
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $id
+ * @type string $name
+ * @type string $logo
+ * @type int $order
+ * @type string $landingPageUrl
+ * @type bool $landingPageWithProxy
+ * @type int[]|\Google\Protobuf\Internal\RepeatedField $usageTypes
+ * @type int $loadingType
+ * @type int $permissionType
+ * @type string $userSessionId
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Core\Plugin::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Core/PluginUsageType.php b/src/lib/proto/Zaly/Proto/Core/PluginUsageType.php
index 3331dba8..9cca78bf 100644
--- a/src/lib/proto/Zaly/Proto/Core/PluginUsageType.php
+++ b/src/lib/proto/Zaly/Proto/Core/PluginUsageType.php
@@ -5,7 +5,7 @@
namespace Zaly\Proto\Core;
/**
- * Protobuf enum Core\PluginUsageType
+ * Protobuf type core.PluginUsageType
*/
class PluginUsageType
{
diff --git a/src/lib/proto/Zaly/Proto/Core/PublicGroupProfile.php b/src/lib/proto/Zaly/Proto/Core/PublicGroupProfile.php
index b3a9168b..2e0d2403 100644
--- a/src/lib/proto/Zaly/Proto/Core/PublicGroupProfile.php
+++ b/src/lib/proto/Zaly/Proto/Core/PublicGroupProfile.php
@@ -58,9 +58,28 @@ class PublicGroupProfile extends \Google\Protobuf\Internal\Message
*/
private $speakers;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $id
+ * @type string $name
+ * @type string $nameInLatin
+ * @type string $avatar
+ * @type \Zaly\Proto\Core\GroupDescription $description
+ * @type int $permissionJoin
+ * @type bool $canGuestReadMessage
+ * @type int|string $timeCreate
+ * @type \Zaly\Proto\Core\PublicUserProfile $owner
+ * @type \Zaly\Proto\Core\PublicUserProfile[]|\Google\Protobuf\Internal\RepeatedField $admins
+ * @type \Zaly\Proto\Core\PublicUserProfile[]|\Google\Protobuf\Internal\RepeatedField $speakers
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Core\Group::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Core/PublicSiteConfig.php b/src/lib/proto/Zaly/Proto/Core/PublicSiteConfig.php
index 61a841a1..325a6948 100644
--- a/src/lib/proto/Zaly/Proto/Core/PublicSiteConfig.php
+++ b/src/lib/proto/Zaly/Proto/Core/PublicSiteConfig.php
@@ -74,9 +74,32 @@ class PublicSiteConfig extends \Google\Protobuf\Internal\Message
*/
private $version = null;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * @type string $logo
+ * @type string $masters
+ * json array, [A, B, C]
+ * @type string $serverAddressForApi
+ * @type string $serverAddressForIM
+ * @type bool $enableCreateGroup
+ * @type bool $enableAddFriend
+ * @type bool $enableTmpChat
+ * @type bool $enableInvitationCode
+ * @type bool $enableRealName
+ * @type int $loginPluginId
+ * @type bool $enableWidgetWeb
+ * @type string $siteIdPubkBase64
+ * @type \Zaly\Proto\Core\Version $version
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Core\Site::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Core/PublicUserProfile.php b/src/lib/proto/Zaly/Proto/Core/PublicUserProfile.php
index 52c3c6a7..5aee7902 100644
--- a/src/lib/proto/Zaly/Proto/Core/PublicUserProfile.php
+++ b/src/lib/proto/Zaly/Proto/Core/PublicUserProfile.php
@@ -44,9 +44,25 @@ class PublicUserProfile extends \Google\Protobuf\Internal\Message
*/
private $realNickname = '';
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $userId
+ * @type string $loginName
+ * @type string $nickname
+ * nickname or alias nickname
+ * @type string $nicknameInLatin
+ * @type string $avatar
+ * @type int $availableType
+ * @type string $realNickname
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Core\User::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Core/PushType.php b/src/lib/proto/Zaly/Proto/Core/PushType.php
index b8c2031c..53b73c02 100644
--- a/src/lib/proto/Zaly/Proto/Core/PushType.php
+++ b/src/lib/proto/Zaly/Proto/Core/PushType.php
@@ -5,7 +5,7 @@
namespace Zaly\Proto\Core;
/**
- * Protobuf enum Core\PushType
+ * Protobuf type core.PushType
*/
class PushType
{
diff --git a/src/lib/proto/Zaly/Proto/Core/StatusMessage.php b/src/lib/proto/Zaly/Proto/Core/StatusMessage.php
index 4b647f19..9a444185 100644
--- a/src/lib/proto/Zaly/Proto/Core/StatusMessage.php
+++ b/src/lib/proto/Zaly/Proto/Core/StatusMessage.php
@@ -28,9 +28,21 @@ class StatusMessage extends \Google\Protobuf\Internal\Message
*/
private $isReq = false;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $msgId
+ * @type int $status
+ * @type bool $isReq
+ * whether this is a request.
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Core\Message::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Core/SyncEndMessage.php b/src/lib/proto/Zaly/Proto/Core/SyncEndMessage.php
index 0eb0dd07..819895ea 100644
--- a/src/lib/proto/Zaly/Proto/Core/SyncEndMessage.php
+++ b/src/lib/proto/Zaly/Proto/Core/SyncEndMessage.php
@@ -16,9 +16,17 @@
class SyncEndMessage extends \Google\Protobuf\Internal\Message
{
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Core\Message::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
}
diff --git a/src/lib/proto/Zaly/Proto/Core/TextMessage.php b/src/lib/proto/Zaly/Proto/Core/TextMessage.php
index e650abdf..d9eb4dab 100644
--- a/src/lib/proto/Zaly/Proto/Core/TextMessage.php
+++ b/src/lib/proto/Zaly/Proto/Core/TextMessage.php
@@ -18,9 +18,18 @@ class TextMessage extends \Google\Protobuf\Internal\Message
*/
private $body = '';
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $body
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Core\Message::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Core/TransportData.php b/src/lib/proto/Zaly/Proto/Core/TransportData.php
index 56cfba59..00e69062 100644
--- a/src/lib/proto/Zaly/Proto/Core/TransportData.php
+++ b/src/lib/proto/Zaly/Proto/Core/TransportData.php
@@ -42,9 +42,31 @@ class TransportData extends \Google\Protobuf\Internal\Message
*/
private $packageId = 0;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $action
+ * @type \Google\Protobuf\Any $body
+ * @type array|\Google\Protobuf\Internal\MapField $header
+ * transfrom TransportDataHeaderKey to string.
+ * key = "_" + TransportDataHeaderKey
+ * ex: "_1", "_9"
+ *
+ * Q: why donot use TransportDataHeaderKey directly?
+ * A: javascript(json) doesnot support int key in object.
+ * Q: why donnot use string(TransportDataHeaderKey)?
+ * A: php treat a string with a int pattern as an int, so the probuf cannot mergeFromJsonString.
+ * @type int|string $packageId
+ * uniqid for blockRequest
+ * the default php config doesnot support bcmath required by int64
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Core\Net::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Core/TransportDataHeaderKey.php b/src/lib/proto/Zaly/Proto/Core/TransportDataHeaderKey.php
index f780f5f1..307cf83f 100644
--- a/src/lib/proto/Zaly/Proto/Core/TransportDataHeaderKey.php
+++ b/src/lib/proto/Zaly/Proto/Core/TransportDataHeaderKey.php
@@ -5,7 +5,7 @@
namespace Zaly\Proto\Core;
/**
- * Protobuf enum Core\TransportDataHeaderKey
+ * Protobuf type core.TransportDataHeaderKey
*/
class TransportDataHeaderKey
{
diff --git a/src/lib/proto/Zaly/Proto/Core/UserAvailableType.php b/src/lib/proto/Zaly/Proto/Core/UserAvailableType.php
index 3d21b5f3..2bf76901 100644
--- a/src/lib/proto/Zaly/Proto/Core/UserAvailableType.php
+++ b/src/lib/proto/Zaly/Proto/Core/UserAvailableType.php
@@ -5,7 +5,7 @@
namespace Zaly\Proto\Core;
/**
- * Protobuf enum Core\UserAvailableType
+ * Protobuf type core.UserAvailableType
*/
class UserAvailableType
{
diff --git a/src/lib/proto/Zaly/Proto/Core/UserClientLangType.php b/src/lib/proto/Zaly/Proto/Core/UserClientLangType.php
index 79f05c7f..2de7b3f4 100644
--- a/src/lib/proto/Zaly/Proto/Core/UserClientLangType.php
+++ b/src/lib/proto/Zaly/Proto/Core/UserClientLangType.php
@@ -5,7 +5,7 @@
namespace Zaly\Proto\Core;
/**
- * Protobuf enum Core\UserClientLangType
+ * Protobuf type core.UserClientLangType
*/
class UserClientLangType
{
diff --git a/src/lib/proto/Zaly/Proto/Core/UserClientType.php b/src/lib/proto/Zaly/Proto/Core/UserClientType.php
index f8737759..ba276561 100644
--- a/src/lib/proto/Zaly/Proto/Core/UserClientType.php
+++ b/src/lib/proto/Zaly/Proto/Core/UserClientType.php
@@ -5,7 +5,7 @@
namespace Zaly\Proto\Core;
/**
- * Protobuf enum Core\UserClientType
+ * Protobuf type core.UserClientType
*/
class UserClientType
{
diff --git a/src/lib/proto/Zaly/Proto/Core/Version.php b/src/lib/proto/Zaly/Proto/Core/Version.php
index b7ac2441..ea482dfa 100644
--- a/src/lib/proto/Zaly/Proto/Core/Version.php
+++ b/src/lib/proto/Zaly/Proto/Core/Version.php
@@ -32,9 +32,22 @@ class Version extends \Google\Protobuf\Internal\Message
*/
private $proto = 0;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $first
+ * @type int $second
+ * @type int $third
+ * @type int $proto
+ * proto-version
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Core\Site::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Core/WebMessage.php b/src/lib/proto/Zaly/Proto/Core/WebMessage.php
index 2f5d2d6d..b6022712 100644
--- a/src/lib/proto/Zaly/Proto/Core/WebMessage.php
+++ b/src/lib/proto/Zaly/Proto/Core/WebMessage.php
@@ -34,9 +34,22 @@ class WebMessage extends \Google\Protobuf\Internal\Message
*/
private $title = '';
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $code
+ * @type int $width
+ * @type int $height
+ * @type string $hrefURL
+ * @type string $title
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Core\Message::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Core/WebNoticeMessage.php b/src/lib/proto/Zaly/Proto/Core/WebNoticeMessage.php
index 64c88018..caba2648 100644
--- a/src/lib/proto/Zaly/Proto/Core/WebNoticeMessage.php
+++ b/src/lib/proto/Zaly/Proto/Core/WebNoticeMessage.php
@@ -30,9 +30,21 @@ class WebNoticeMessage extends \Google\Protobuf\Internal\Message
*/
private $title = '';
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $code
+ * @type int $height
+ * @type string $hrefURL
+ * @type string $title
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Core\Message::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Gateway/GwSocketCloseRequest.php b/src/lib/proto/Zaly/Proto/Gateway/GwSocketCloseRequest.php
index 4dd21a80..77c652aa 100644
--- a/src/lib/proto/Zaly/Proto/Gateway/GwSocketCloseRequest.php
+++ b/src/lib/proto/Zaly/Proto/Gateway/GwSocketCloseRequest.php
@@ -18,9 +18,18 @@ class GwSocketCloseRequest extends \Google\Protobuf\Internal\Message
*/
private $socketIds;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string[]|\Google\Protobuf\Internal\RepeatedField $socketIds
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Gateway\GwSocketClose::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Gateway/GwSocketCloseResponse.php b/src/lib/proto/Zaly/Proto/Gateway/GwSocketCloseResponse.php
index 54dfb091..62419b0a 100644
--- a/src/lib/proto/Zaly/Proto/Gateway/GwSocketCloseResponse.php
+++ b/src/lib/proto/Zaly/Proto/Gateway/GwSocketCloseResponse.php
@@ -14,9 +14,17 @@
class GwSocketCloseResponse extends \Google\Protobuf\Internal\Message
{
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Gateway\GwSocketClose::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
}
diff --git a/src/lib/proto/Zaly/Proto/Gateway/GwSocketWritePackage.php b/src/lib/proto/Zaly/Proto/Gateway/GwSocketWritePackage.php
index 3a677f0a..83259246 100644
--- a/src/lib/proto/Zaly/Proto/Gateway/GwSocketWritePackage.php
+++ b/src/lib/proto/Zaly/Proto/Gateway/GwSocketWritePackage.php
@@ -22,9 +22,19 @@ class GwSocketWritePackage extends \Google\Protobuf\Internal\Message
*/
private $content = '';
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string[]|\Google\Protobuf\Internal\RepeatedField $socketIds
+ * @type string $content
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Gateway\GwSocketWrite::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Gateway/GwSocketWriteRequest.php b/src/lib/proto/Zaly/Proto/Gateway/GwSocketWriteRequest.php
index 0869077a..6feda15e 100644
--- a/src/lib/proto/Zaly/Proto/Gateway/GwSocketWriteRequest.php
+++ b/src/lib/proto/Zaly/Proto/Gateway/GwSocketWriteRequest.php
@@ -22,9 +22,18 @@ class GwSocketWriteRequest extends \Google\Protobuf\Internal\Message
*/
private $packages;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Zaly\Proto\Gateway\GwSocketWritePackage[]|\Google\Protobuf\Internal\RepeatedField $packages
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Gateway\GwSocketWrite::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Gateway/GwSocketWriteResponse.php b/src/lib/proto/Zaly/Proto/Gateway/GwSocketWriteResponse.php
index 1258fc70..834533dd 100644
--- a/src/lib/proto/Zaly/Proto/Gateway/GwSocketWriteResponse.php
+++ b/src/lib/proto/Zaly/Proto/Gateway/GwSocketWriteResponse.php
@@ -18,9 +18,18 @@ class GwSocketWriteResponse extends \Google\Protobuf\Internal\Message
*/
private $length = 0;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $length
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Gateway\GwSocketWrite::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Platform/ApiSessionVerifyRequest.php b/src/lib/proto/Zaly/Proto/Platform/ApiSessionVerifyRequest.php
index bf70026b..84af248f 100644
--- a/src/lib/proto/Zaly/Proto/Platform/ApiSessionVerifyRequest.php
+++ b/src/lib/proto/Zaly/Proto/Platform/ApiSessionVerifyRequest.php
@@ -21,9 +21,18 @@ class ApiSessionVerifyRequest extends \Google\Protobuf\Internal\Message
*/
private $preSessionId = '';
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $preSessionId
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Platform\ApiSessionVerify::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Platform/ApiSessionVerifyResponse.php b/src/lib/proto/Zaly/Proto/Platform/ApiSessionVerifyResponse.php
index a67af60a..f6a555cd 100644
--- a/src/lib/proto/Zaly/Proto/Platform/ApiSessionVerifyResponse.php
+++ b/src/lib/proto/Zaly/Proto/Platform/ApiSessionVerifyResponse.php
@@ -26,9 +26,21 @@ class ApiSessionVerifyResponse extends \Google\Protobuf\Internal\Message
*/
private $encryptedProfile = '';
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $key
+ * = rsa(randomBytesKey, siteIdPem)
+ * @type string $encryptedProfile
+ * = aes(randomBytesKey, LoginUserProfile->toBytes());
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Platform\ApiSessionVerify::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Platform/LoginUserProfile.php b/src/lib/proto/Zaly/Proto/Platform/LoginUserProfile.php
index ac60fe88..0893fa41 100644
--- a/src/lib/proto/Zaly/Proto/Platform/LoginUserProfile.php
+++ b/src/lib/proto/Zaly/Proto/Platform/LoginUserProfile.php
@@ -40,9 +40,24 @@ class LoginUserProfile extends \Google\Protobuf\Internal\Message
*/
private $invitationCode = '';
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $userId
+ * @type string $loginName
+ * @type string $nickName
+ * for register
+ * @type string $phoneCountryCode
+ * @type string $phoneNumber
+ * @type string $invitationCode
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Platform\Core::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Plugin/DuckChatGroupCheckMemberRequest.php b/src/lib/proto/Zaly/Proto/Plugin/DuckChatGroupCheckMemberRequest.php
index fb0225fb..428dd76a 100644
--- a/src/lib/proto/Zaly/Proto/Plugin/DuckChatGroupCheckMemberRequest.php
+++ b/src/lib/proto/Zaly/Proto/Plugin/DuckChatGroupCheckMemberRequest.php
@@ -25,9 +25,19 @@ class DuckChatGroupCheckMemberRequest extends \Google\Protobuf\Internal\Message
*/
private $userId = '';
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $groupId
+ * @type string $userId
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Plugin\DuckchatGroupCheckMember::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Plugin/DuckChatGroupCheckMemberResponse.php b/src/lib/proto/Zaly/Proto/Plugin/DuckChatGroupCheckMemberResponse.php
index 6ebdbf4e..9445a715 100644
--- a/src/lib/proto/Zaly/Proto/Plugin/DuckChatGroupCheckMemberResponse.php
+++ b/src/lib/proto/Zaly/Proto/Plugin/DuckChatGroupCheckMemberResponse.php
@@ -18,9 +18,18 @@ class DuckChatGroupCheckMemberResponse extends \Google\Protobuf\Internal\Message
*/
private $memberType = 0;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $memberType
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Plugin\DuckchatGroupCheckMember::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Plugin/DuckChatMessageSendRequest.php b/src/lib/proto/Zaly/Proto/Plugin/DuckChatMessageSendRequest.php
index b8a0a0ab..09066fac 100644
--- a/src/lib/proto/Zaly/Proto/Plugin/DuckChatMessageSendRequest.php
+++ b/src/lib/proto/Zaly/Proto/Plugin/DuckChatMessageSendRequest.php
@@ -21,9 +21,18 @@ class DuckChatMessageSendRequest extends \Google\Protobuf\Internal\Message
*/
private $message = null;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Zaly\Proto\Core\Message $message
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Plugin\DuckchatMessageSend::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Plugin/DuckChatMessageSendResponse.php b/src/lib/proto/Zaly/Proto/Plugin/DuckChatMessageSendResponse.php
index 6ca2e61f..663133f8 100644
--- a/src/lib/proto/Zaly/Proto/Plugin/DuckChatMessageSendResponse.php
+++ b/src/lib/proto/Zaly/Proto/Plugin/DuckChatMessageSendResponse.php
@@ -16,9 +16,17 @@
class DuckChatMessageSendResponse extends \Google\Protobuf\Internal\Message
{
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Plugin\DuckchatMessageSend::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
}
diff --git a/src/lib/proto/Zaly/Proto/Plugin/DuckChatSessionProfileRequest.php b/src/lib/proto/Zaly/Proto/Plugin/DuckChatSessionProfileRequest.php
index 44c1a522..6a79cec9 100644
--- a/src/lib/proto/Zaly/Proto/Plugin/DuckChatSessionProfileRequest.php
+++ b/src/lib/proto/Zaly/Proto/Plugin/DuckChatSessionProfileRequest.php
@@ -23,9 +23,19 @@ class DuckChatSessionProfileRequest extends \Google\Protobuf\Internal\Message
*/
private $encryptedSessionId = '';
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $encryptedSessionId
+ * 加密过的sessionId,小程序直接从cookie中获取
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Plugin\DuckchatSessionProfile::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Plugin/DuckChatSessionProfileResponse.php b/src/lib/proto/Zaly/Proto/Plugin/DuckChatSessionProfileResponse.php
index c7a1cfc8..41a55ad9 100644
--- a/src/lib/proto/Zaly/Proto/Plugin/DuckChatSessionProfileResponse.php
+++ b/src/lib/proto/Zaly/Proto/Plugin/DuckChatSessionProfileResponse.php
@@ -18,9 +18,18 @@ class DuckChatSessionProfileResponse extends \Google\Protobuf\Internal\Message
*/
private $profile = null;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Zaly\Proto\Core\AllUserProfile $profile
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Plugin\DuckchatSessionProfile::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Plugin/DuckChatUserProfileRequest.php b/src/lib/proto/Zaly/Proto/Plugin/DuckChatUserProfileRequest.php
index ef3bf18e..e42d9b76 100644
--- a/src/lib/proto/Zaly/Proto/Plugin/DuckChatUserProfileRequest.php
+++ b/src/lib/proto/Zaly/Proto/Plugin/DuckChatUserProfileRequest.php
@@ -23,9 +23,19 @@ class DuckChatUserProfileRequest extends \Google\Protobuf\Internal\Message
*/
private $userId = '';
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $userId
+ * get userId’s
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Plugin\DuckchatUserProfile::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Plugin/DuckChatUserProfileResponse.php b/src/lib/proto/Zaly/Proto/Plugin/DuckChatUserProfileResponse.php
index 757e93b6..d802971a 100644
--- a/src/lib/proto/Zaly/Proto/Plugin/DuckChatUserProfileResponse.php
+++ b/src/lib/proto/Zaly/Proto/Plugin/DuckChatUserProfileResponse.php
@@ -18,9 +18,18 @@ class DuckChatUserProfileResponse extends \Google\Protobuf\Internal\Message
*/
private $profile = null;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Zaly\Proto\Core\AllUserProfile $profile
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Plugin\DuckchatUserProfile::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Plugin/DuckChatUserRelationRequest.php b/src/lib/proto/Zaly/Proto/Plugin/DuckChatUserRelationRequest.php
index 470f11e8..d8dce75d 100644
--- a/src/lib/proto/Zaly/Proto/Plugin/DuckChatUserRelationRequest.php
+++ b/src/lib/proto/Zaly/Proto/Plugin/DuckChatUserRelationRequest.php
@@ -25,9 +25,19 @@ class DuckChatUserRelationRequest extends \Google\Protobuf\Internal\Message
*/
private $oppositeUserId = '';
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $userId
+ * @type string $oppositeUserId
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Plugin\DuckchatUserRelation::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Plugin/DuckChatUserRelationResponse.php b/src/lib/proto/Zaly/Proto/Plugin/DuckChatUserRelationResponse.php
index a83ef0e2..5f9c9f6b 100644
--- a/src/lib/proto/Zaly/Proto/Plugin/DuckChatUserRelationResponse.php
+++ b/src/lib/proto/Zaly/Proto/Plugin/DuckChatUserRelationResponse.php
@@ -18,9 +18,18 @@ class DuckChatUserRelationResponse extends \Google\Protobuf\Internal\Message
*/
private $relationType = 0;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $relationType
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Plugin\DuckchatUserRelation::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiFileDownloadRequest.php b/src/lib/proto/Zaly/Proto/Site/ApiFileDownloadRequest.php
index 6b52c91b..e2bdc6e7 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiFileDownloadRequest.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiFileDownloadRequest.php
@@ -36,9 +36,21 @@ class ApiFileDownloadRequest extends \Google\Protobuf\Internal\Message
*/
private $isGroupMessage = false;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $fileId
+ * @type bool $returnBase64
+ * @type string $messageId
+ * @type bool $isGroupMessage
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiFileDownload::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiFileDownloadResponse.php b/src/lib/proto/Zaly/Proto/Site/ApiFileDownloadResponse.php
index bf321730..e3ed1059 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiFileDownloadResponse.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiFileDownloadResponse.php
@@ -19,9 +19,20 @@ class ApiFileDownloadResponse extends \Google\Protobuf\Internal\Message
private $contentType = '';
protected $ret;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $file
+ * @type string $fileBase64
+ * @type string $contentType
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiFileDownload::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiFileUploadRequest.php b/src/lib/proto/Zaly/Proto/Site/ApiFileUploadRequest.php
index 2eaaca3d..0d6707ac 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiFileUploadRequest.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiFileUploadRequest.php
@@ -32,9 +32,20 @@ class ApiFileUploadRequest extends \Google\Protobuf\Internal\Message
*/
private $isMessageAttachment = false;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $file
+ * @type int $fileType
+ * @type bool $isMessageAttachment
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiFileUpload::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiFileUploadResponse.php b/src/lib/proto/Zaly/Proto/Site/ApiFileUploadResponse.php
index ee4b7943..fc549836 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiFileUploadResponse.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiFileUploadResponse.php
@@ -18,9 +18,18 @@ class ApiFileUploadResponse extends \Google\Protobuf\Internal\Message
*/
private $fileId = '';
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $fileId
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiFileUpload::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiFriendAcceptRequest.php b/src/lib/proto/Zaly/Proto/Site/ApiFriendAcceptRequest.php
index 22c5b2b8..d23a327f 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiFriendAcceptRequest.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiFriendAcceptRequest.php
@@ -29,9 +29,21 @@ class ApiFriendAcceptRequest extends \Google\Protobuf\Internal\Message
*/
private $agree = false;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $applyUserId
+ * user who apply me as friend
+ * @type bool $agree
+ * true:accept false:refuse
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiFriendAccept::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiFriendAcceptResponse.php b/src/lib/proto/Zaly/Proto/Site/ApiFriendAcceptResponse.php
index f93115db..9f19550e 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiFriendAcceptResponse.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiFriendAcceptResponse.php
@@ -14,9 +14,17 @@
class ApiFriendAcceptResponse extends \Google\Protobuf\Internal\Message
{
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiFriendAccept::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
}
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiFriendApplyListRequest.php b/src/lib/proto/Zaly/Proto/Site/ApiFriendApplyListRequest.php
index b851ce8b..8313beac 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiFriendApplyListRequest.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiFriendApplyListRequest.php
@@ -27,9 +27,20 @@ class ApiFriendApplyListRequest extends \Google\Protobuf\Internal\Message
*/
private $count = 0;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $offset
+ * @type int $count
+ * default 200
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiFriendApplyList::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiFriendApplyListResponse.php b/src/lib/proto/Zaly/Proto/Site/ApiFriendApplyListResponse.php
index 8ed0ea8d..04e2a8f7 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiFriendApplyListResponse.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiFriendApplyListResponse.php
@@ -22,9 +22,19 @@ class ApiFriendApplyListResponse extends \Google\Protobuf\Internal\Message
*/
private $totalCount = 0;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Zaly\Proto\Core\ApplyUserProfile[]|\Google\Protobuf\Internal\RepeatedField $list
+ * @type int $totalCount
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiFriendApplyList::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiFriendApplyRequest.php b/src/lib/proto/Zaly/Proto/Site/ApiFriendApplyRequest.php
index 879adc54..0bb4c1a4 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiFriendApplyRequest.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiFriendApplyRequest.php
@@ -25,9 +25,19 @@ class ApiFriendApplyRequest extends \Google\Protobuf\Internal\Message
*/
private $greetings = '';
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $toUserId
+ * @type string $greetings
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiFriendApply::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiFriendApplyResponse.php b/src/lib/proto/Zaly/Proto/Site/ApiFriendApplyResponse.php
index f0aa32a2..7712f73b 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiFriendApplyResponse.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiFriendApplyResponse.php
@@ -14,9 +14,17 @@
class ApiFriendApplyResponse extends \Google\Protobuf\Internal\Message
{
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiFriendApply::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
}
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiFriendDeleteRequest.php b/src/lib/proto/Zaly/Proto/Site/ApiFriendDeleteRequest.php
index 7c0bacdc..07b35369 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiFriendDeleteRequest.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiFriendDeleteRequest.php
@@ -21,9 +21,18 @@ class ApiFriendDeleteRequest extends \Google\Protobuf\Internal\Message
*/
private $toUserId = '';
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $toUserId
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiFriendDelete::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiFriendDeleteResponse.php b/src/lib/proto/Zaly/Proto/Site/ApiFriendDeleteResponse.php
index 9cc2388f..d230cb36 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiFriendDeleteResponse.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiFriendDeleteResponse.php
@@ -14,9 +14,17 @@
class ApiFriendDeleteResponse extends \Google\Protobuf\Internal\Message
{
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiFriendDelete::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
}
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiFriendListRequest.php b/src/lib/proto/Zaly/Proto/Site/ApiFriendListRequest.php
index 656b4bf0..d01e82a1 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiFriendListRequest.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiFriendListRequest.php
@@ -27,9 +27,20 @@ class ApiFriendListRequest extends \Google\Protobuf\Internal\Message
*/
private $count = 0;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $offset
+ * @type int $count
+ * default 1000
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiFriendList::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiFriendListResponse.php b/src/lib/proto/Zaly/Proto/Site/ApiFriendListResponse.php
index 96aba09d..820757ca 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiFriendListResponse.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiFriendListResponse.php
@@ -26,9 +26,21 @@ class ApiFriendListResponse extends \Google\Protobuf\Internal\Message
*/
private $totalCount = 0;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Zaly\Proto\Core\FriendUserProfile[]|\Google\Protobuf\Internal\RepeatedField $friends
+ * user friend list
+ * @type int $totalCount
+ * total count of user's friends
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiFriendList::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiFriendProfileRequest.php b/src/lib/proto/Zaly/Proto/Site/ApiFriendProfileRequest.php
index 763fdbfe..09ca6bf1 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiFriendProfileRequest.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiFriendProfileRequest.php
@@ -21,9 +21,18 @@ class ApiFriendProfileRequest extends \Google\Protobuf\Internal\Message
*/
private $userId = '';
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $userId
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiFriendProfile::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiFriendProfileResponse.php b/src/lib/proto/Zaly/Proto/Site/ApiFriendProfileResponse.php
index 3ca1442e..e9e1e440 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiFriendProfileResponse.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiFriendProfileResponse.php
@@ -18,9 +18,18 @@ class ApiFriendProfileResponse extends \Google\Protobuf\Internal\Message
*/
private $profile = null;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Zaly\Proto\Core\FriendUserProfile $profile
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiFriendProfile::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiFriendSearchRequest.php b/src/lib/proto/Zaly/Proto/Site/ApiFriendSearchRequest.php
index 5605cede..d83e6dae 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiFriendSearchRequest.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiFriendSearchRequest.php
@@ -33,9 +33,22 @@ class ApiFriendSearchRequest extends \Google\Protobuf\Internal\Message
*/
private $count = 0;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $keywords
+ * suport phone\loginName
+ * @type int $offset
+ * @type int $count
+ * default 1000
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiFriendSearch::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiFriendSearchResponse.php b/src/lib/proto/Zaly/Proto/Site/ApiFriendSearchResponse.php
index c8bf2fc1..a0b121ab 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiFriendSearchResponse.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiFriendSearchResponse.php
@@ -26,9 +26,21 @@ class ApiFriendSearchResponse extends \Google\Protobuf\Internal\Message
*/
private $totalCount = 0;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Zaly\Proto\Core\FriendUserProfile[]|\Google\Protobuf\Internal\RepeatedField $friends
+ * user friend list
+ * @type int $totalCount
+ * total count of user's friends
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiFriendSearch::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiFriendUpdateRequest.php b/src/lib/proto/Zaly/Proto/Site/ApiFriendUpdateRequest.php
index 160a67cb..5f8ad533 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiFriendUpdateRequest.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiFriendUpdateRequest.php
@@ -25,9 +25,19 @@ class ApiFriendUpdateRequest extends \Google\Protobuf\Internal\Message
*/
private $values;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $userId
+ * @type \Zaly\Proto\Site\ApiFriendUpdateValue[]|\Google\Protobuf\Internal\RepeatedField $values
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiFriendUpdate::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiFriendUpdateResponse.php b/src/lib/proto/Zaly/Proto/Site/ApiFriendUpdateResponse.php
index a14e02bc..d3b05660 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiFriendUpdateResponse.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiFriendUpdateResponse.php
@@ -18,9 +18,18 @@ class ApiFriendUpdateResponse extends \Google\Protobuf\Internal\Message
*/
private $profile = null;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Zaly\Proto\Core\FriendUserProfile $profile
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiFriendUpdate::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiFriendUpdateType.php b/src/lib/proto/Zaly/Proto/Site/ApiFriendUpdateType.php
index cc64ecd5..0a5e1d40 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiFriendUpdateType.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiFriendUpdateType.php
@@ -5,7 +5,7 @@
namespace Zaly\Proto\Site;
/**
- * Protobuf enum Site\ApiFriendUpdateType
+ * Protobuf type site.ApiFriendUpdateType
*/
class ApiFriendUpdateType
{
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiFriendUpdateValue.php b/src/lib/proto/Zaly/Proto/Site/ApiFriendUpdateValue.php
index b978c988..ea896321 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiFriendUpdateValue.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiFriendUpdateValue.php
@@ -19,9 +19,20 @@ class ApiFriendUpdateValue extends \Google\Protobuf\Internal\Message
private $type = 0;
protected $fields;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $type
+ * @type string $remark
+ * @type bool $isMute
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiFriendUpdate::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiGroupCreateRequest.php b/src/lib/proto/Zaly/Proto/Site/ApiGroupCreateRequest.php
index 73392bcc..a861abd9 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiGroupCreateRequest.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiGroupCreateRequest.php
@@ -21,9 +21,18 @@ class ApiGroupCreateRequest extends \Google\Protobuf\Internal\Message
*/
private $groupName = '';
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $groupName
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiGroupCreate::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiGroupCreateResponse.php b/src/lib/proto/Zaly/Proto/Site/ApiGroupCreateResponse.php
index 1fe56cef..01c70d7e 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiGroupCreateResponse.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiGroupCreateResponse.php
@@ -18,9 +18,18 @@ class ApiGroupCreateResponse extends \Google\Protobuf\Internal\Message
*/
private $profile = null;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Zaly\Proto\Core\AllGroupProfile $profile
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiGroupCreate::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiGroupDeleteRequest.php b/src/lib/proto/Zaly/Proto/Site/ApiGroupDeleteRequest.php
index e8dcccb9..9ff50ede 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiGroupDeleteRequest.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiGroupDeleteRequest.php
@@ -21,9 +21,18 @@ class ApiGroupDeleteRequest extends \Google\Protobuf\Internal\Message
*/
private $groupId = '';
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $groupId
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiGroupDelete::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiGroupDeleteResponse.php b/src/lib/proto/Zaly/Proto/Site/ApiGroupDeleteResponse.php
index ff8ec92a..231e69ae 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiGroupDeleteResponse.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiGroupDeleteResponse.php
@@ -14,9 +14,17 @@
class ApiGroupDeleteResponse extends \Google\Protobuf\Internal\Message
{
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiGroupDelete::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
}
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiGroupInvitableFriendsRequest.php b/src/lib/proto/Zaly/Proto/Site/ApiGroupInvitableFriendsRequest.php
index b338973f..4699d7e3 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiGroupInvitableFriendsRequest.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiGroupInvitableFriendsRequest.php
@@ -31,9 +31,21 @@ class ApiGroupInvitableFriendsRequest extends \Google\Protobuf\Internal\Message
*/
private $count = 0;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $groupId
+ * @type int $offset
+ * @type int $count
+ * default 200
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiGroupInvitableFriends::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiGroupInvitableFriendsResponse.php b/src/lib/proto/Zaly/Proto/Site/ApiGroupInvitableFriendsResponse.php
index 67591702..28f0a5b0 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiGroupInvitableFriendsResponse.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiGroupInvitableFriendsResponse.php
@@ -26,9 +26,20 @@ class ApiGroupInvitableFriendsResponse extends \Google\Protobuf\Internal\Message
*/
private $totalCount = 0;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Zaly\Proto\Core\PublicUserProfile[]|\Google\Protobuf\Internal\RepeatedField $list
+ * @type array|\Google\Protobuf\Internal\MapField $listIsMute
+ * @type int $totalCount
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiGroupInvitableFriends::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiGroupInviteRequest.php b/src/lib/proto/Zaly/Proto/Site/ApiGroupInviteRequest.php
index 242123a1..3ec0d19a 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiGroupInviteRequest.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiGroupInviteRequest.php
@@ -25,9 +25,19 @@ class ApiGroupInviteRequest extends \Google\Protobuf\Internal\Message
*/
private $userIds;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $groupId
+ * @type string[]|\Google\Protobuf\Internal\RepeatedField $userIds
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiGroupInvite::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiGroupInviteResponse.php b/src/lib/proto/Zaly/Proto/Site/ApiGroupInviteResponse.php
index b6552f50..9010be6c 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiGroupInviteResponse.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiGroupInviteResponse.php
@@ -14,9 +14,17 @@
class ApiGroupInviteResponse extends \Google\Protobuf\Internal\Message
{
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiGroupInvite::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
}
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiGroupListRequest.php b/src/lib/proto/Zaly/Proto/Site/ApiGroupListRequest.php
index c37d9041..9802b077 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiGroupListRequest.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiGroupListRequest.php
@@ -27,9 +27,20 @@ class ApiGroupListRequest extends \Google\Protobuf\Internal\Message
*/
private $count = 0;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $offset
+ * @type int $count
+ * default 200
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiGroupList::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiGroupListResponse.php b/src/lib/proto/Zaly/Proto/Site/ApiGroupListResponse.php
index 09263903..b3a00001 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiGroupListResponse.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiGroupListResponse.php
@@ -26,9 +26,20 @@ class ApiGroupListResponse extends \Google\Protobuf\Internal\Message
*/
private $totalCount = 0;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Zaly\Proto\Core\PublicGroupProfile[]|\Google\Protobuf\Internal\RepeatedField $list
+ * @type array|\Google\Protobuf\Internal\MapField $listIsMute
+ * @type int $totalCount
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiGroupList::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiGroupMembersRequest.php b/src/lib/proto/Zaly/Proto/Site/ApiGroupMembersRequest.php
index 3d6ce10c..671a405f 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiGroupMembersRequest.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiGroupMembersRequest.php
@@ -29,9 +29,20 @@ class ApiGroupMembersRequest extends \Google\Protobuf\Internal\Message
*/
private $count = 0;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $groupId
+ * @type int $offset
+ * @type int $count
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiGroupMembers::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiGroupMembersResponse.php b/src/lib/proto/Zaly/Proto/Site/ApiGroupMembersResponse.php
index ffb5f4a3..a852384b 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiGroupMembersResponse.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiGroupMembersResponse.php
@@ -22,9 +22,19 @@ class ApiGroupMembersResponse extends \Google\Protobuf\Internal\Message
*/
private $totalCount = 0;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Zaly\Proto\Site\ApiGroupMembersUserProfile[]|\Google\Protobuf\Internal\RepeatedField $list
+ * @type int $totalCount
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiGroupMembers::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiGroupMembersUserProfile.php b/src/lib/proto/Zaly/Proto/Site/ApiGroupMembersUserProfile.php
index 65d315d1..da7868e0 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiGroupMembersUserProfile.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiGroupMembersUserProfile.php
@@ -22,9 +22,19 @@ class ApiGroupMembersUserProfile extends \Google\Protobuf\Internal\Message
*/
private $type = 0;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Zaly\Proto\Core\PublicUserProfile $profile
+ * @type int $type
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiGroupMembers::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiGroupProfileRequest.php b/src/lib/proto/Zaly/Proto/Site/ApiGroupProfileRequest.php
index 77ffb0b9..677cd5dc 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiGroupProfileRequest.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiGroupProfileRequest.php
@@ -21,9 +21,18 @@ class ApiGroupProfileRequest extends \Google\Protobuf\Internal\Message
*/
private $groupId = '';
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $groupId
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiGroupProfile::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiGroupProfileResponse.php b/src/lib/proto/Zaly/Proto/Site/ApiGroupProfileResponse.php
index 039a3724..c9884fb9 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiGroupProfileResponse.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiGroupProfileResponse.php
@@ -26,9 +26,20 @@ class ApiGroupProfileResponse extends \Google\Protobuf\Internal\Message
*/
private $memberType = 0;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Zaly\Proto\Core\PublicGroupProfile $profile
+ * @type bool $isMute
+ * @type int $memberType
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiGroupProfile::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiGroupQuitRequest.php b/src/lib/proto/Zaly/Proto/Site/ApiGroupQuitRequest.php
index d28471ac..f2660f01 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiGroupQuitRequest.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiGroupQuitRequest.php
@@ -21,9 +21,18 @@ class ApiGroupQuitRequest extends \Google\Protobuf\Internal\Message
*/
private $groupId = '';
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $groupId
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiGroupQuit::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiGroupQuitResponse.php b/src/lib/proto/Zaly/Proto/Site/ApiGroupQuitResponse.php
index d8eb9bd5..5a5470d2 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiGroupQuitResponse.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiGroupQuitResponse.php
@@ -14,9 +14,17 @@
class ApiGroupQuitResponse extends \Google\Protobuf\Internal\Message
{
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiGroupQuit::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
}
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiGroupRemoveMemberRequest.php b/src/lib/proto/Zaly/Proto/Site/ApiGroupRemoveMemberRequest.php
index 1a36279d..9c5c60c5 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiGroupRemoveMemberRequest.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiGroupRemoveMemberRequest.php
@@ -25,9 +25,19 @@ class ApiGroupRemoveMemberRequest extends \Google\Protobuf\Internal\Message
*/
private $userIds;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $groupId
+ * @type string[]|\Google\Protobuf\Internal\RepeatedField $userIds
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiGroupRemoveMember::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiGroupRemoveMemberResponse.php b/src/lib/proto/Zaly/Proto/Site/ApiGroupRemoveMemberResponse.php
index 37042d9a..7a7e8f11 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiGroupRemoveMemberResponse.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiGroupRemoveMemberResponse.php
@@ -14,9 +14,17 @@
class ApiGroupRemoveMemberResponse extends \Google\Protobuf\Internal\Message
{
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiGroupRemoveMember::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
}
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiGroupUpdateRequest.php b/src/lib/proto/Zaly/Proto/Site/ApiGroupUpdateRequest.php
index 1823640e..4498313c 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiGroupUpdateRequest.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiGroupUpdateRequest.php
@@ -25,9 +25,19 @@ class ApiGroupUpdateRequest extends \Google\Protobuf\Internal\Message
*/
private $values;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $groupId
+ * @type \Zaly\Proto\Site\ApiGroupUpdateValue[]|\Google\Protobuf\Internal\RepeatedField $values
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiGroupUpdate::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiGroupUpdateResponse.php b/src/lib/proto/Zaly/Proto/Site/ApiGroupUpdateResponse.php
index dffedb08..f1c8ff01 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiGroupUpdateResponse.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiGroupUpdateResponse.php
@@ -26,9 +26,20 @@ class ApiGroupUpdateResponse extends \Google\Protobuf\Internal\Message
*/
private $memberType = 0;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Zaly\Proto\Core\PublicGroupProfile $profile
+ * @type bool $isMute
+ * @type int $memberType
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiGroupUpdate::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiGroupUpdateType.php b/src/lib/proto/Zaly/Proto/Site/ApiGroupUpdateType.php
index 33360e9f..ad9d8712 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiGroupUpdateType.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiGroupUpdateType.php
@@ -5,7 +5,7 @@
namespace Zaly\Proto\Site;
/**
- * Protobuf enum Site\ApiGroupUpdateType
+ * Protobuf type site.ApiGroupUpdateType
*/
class ApiGroupUpdateType
{
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiGroupUpdateValue.php b/src/lib/proto/Zaly/Proto/Site/ApiGroupUpdateValue.php
index a02f27fb..81e952db 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiGroupUpdateValue.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiGroupUpdateValue.php
@@ -34,9 +34,28 @@ class ApiGroupUpdateValue extends \Google\Protobuf\Internal\Message
private $speakerUserIds;
protected $fields;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $type
+ * @type int $writeType
+ * @type string $name
+ * @type int $permissionJoin
+ * @type bool $canGuestReadMessage
+ * @type \Zaly\Proto\Core\GroupDescription $description
+ * @type bool $isMute
+ * @type string[]|\Google\Protobuf\Internal\RepeatedField $adminUserIds
+ * work with: writeType
+ * oneof doesnot support repeated.
+ * @type string[]|\Google\Protobuf\Internal\RepeatedField $speakerUserIds
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiGroupUpdate::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiGwConfigRequest.php b/src/lib/proto/Zaly/Proto/Site/ApiGwConfigRequest.php
index cd0e3aa5..6a3cb48a 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiGwConfigRequest.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiGwConfigRequest.php
@@ -22,9 +22,19 @@ class ApiGwConfigRequest extends \Google\Protobuf\Internal\Message
*/
private $host = '';
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $type
+ * @type string $host
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiGwConfig::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiGwConfigResponse.php b/src/lib/proto/Zaly/Proto/Site/ApiGwConfigResponse.php
index 521dcd7b..e01c4abe 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiGwConfigResponse.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiGwConfigResponse.php
@@ -18,9 +18,18 @@ class ApiGwConfigResponse extends \Google\Protobuf\Internal\Message
*/
private $socketIdSalt = '';
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $socketIdSalt
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiGwConfig::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiGwOnDisconnectRequest.php b/src/lib/proto/Zaly/Proto/Site/ApiGwOnDisconnectRequest.php
index e15002ee..e0358ef8 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiGwOnDisconnectRequest.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiGwOnDisconnectRequest.php
@@ -20,9 +20,18 @@ class ApiGwOnDisconnectRequest extends \Google\Protobuf\Internal\Message
*/
private $socketId = '';
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $socketId
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiGwOnDisconnect::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiGwOnDisconnectResponse.php b/src/lib/proto/Zaly/Proto/Site/ApiGwOnDisconnectResponse.php
index 365495c4..02c2f667 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiGwOnDisconnectResponse.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiGwOnDisconnectResponse.php
@@ -14,9 +14,17 @@
class ApiGwOnDisconnectResponse extends \Google\Protobuf\Internal\Message
{
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiGwOnDisconnect::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
}
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiPassportAnonymousLoginRequest.php b/src/lib/proto/Zaly/Proto/Site/ApiPassportAnonymousLoginRequest.php
index 8a7b2acb..bce02f98 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiPassportAnonymousLoginRequest.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiPassportAnonymousLoginRequest.php
@@ -23,9 +23,18 @@ class ApiPassportAnonymousLoginRequest extends \Google\Protobuf\Internal\Message
*/
private $loginName = '';
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $loginName
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiPassportAnonymousLogin::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiPassportAnonymousLoginResponse.php b/src/lib/proto/Zaly/Proto/Site/ApiPassportAnonymousLoginResponse.php
index 634cd4ee..35f357f9 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiPassportAnonymousLoginResponse.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiPassportAnonymousLoginResponse.php
@@ -18,9 +18,18 @@ class ApiPassportAnonymousLoginResponse extends \Google\Protobuf\Internal\Messag
*/
private $preSessionId = '';
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $preSessionId
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiPassportAnonymousLogin::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiPassportLdapLoginRequest.php b/src/lib/proto/Zaly/Proto/Site/ApiPassportLdapLoginRequest.php
index c1ed50a4..ffb6c3d2 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiPassportLdapLoginRequest.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiPassportLdapLoginRequest.php
@@ -26,9 +26,19 @@ class ApiPassportLdapLoginRequest extends \Google\Protobuf\Internal\Message
*/
private $password = '';
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $account
+ * @type string $password
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiPassportLdapLogin::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiPassportLdapLoginResponse.php b/src/lib/proto/Zaly/Proto/Site/ApiPassportLdapLoginResponse.php
index b0ab612e..6b3b5b1f 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiPassportLdapLoginResponse.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiPassportLdapLoginResponse.php
@@ -18,9 +18,18 @@ class ApiPassportLdapLoginResponse extends \Google\Protobuf\Internal\Message
*/
private $preSessionId = '';
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $preSessionId
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiPassportLdapLogin::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiPassportPasswordFindPasswordRequest.php b/src/lib/proto/Zaly/Proto/Site/ApiPassportPasswordFindPasswordRequest.php
index 45273b03..b24a93b1 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiPassportPasswordFindPasswordRequest.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiPassportPasswordFindPasswordRequest.php
@@ -21,9 +21,18 @@ class ApiPassportPasswordFindPasswordRequest extends \Google\Protobuf\Internal\M
*/
private $loginName = '';
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $loginName
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiPassportPasswordFindPassword::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiPassportPasswordFindPasswordResponse.php b/src/lib/proto/Zaly/Proto/Site/ApiPassportPasswordFindPasswordResponse.php
index 58441ba8..ba0ff3be 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiPassportPasswordFindPasswordResponse.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiPassportPasswordFindPasswordResponse.php
@@ -14,9 +14,17 @@
class ApiPassportPasswordFindPasswordResponse extends \Google\Protobuf\Internal\Message
{
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiPassportPasswordFindPassword::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
}
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiPassportPasswordLoginRequest.php b/src/lib/proto/Zaly/Proto/Site/ApiPassportPasswordLoginRequest.php
index 0a1e7475..04925463 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiPassportPasswordLoginRequest.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiPassportPasswordLoginRequest.php
@@ -31,9 +31,20 @@ class ApiPassportPasswordLoginRequest extends \Google\Protobuf\Internal\Message
*/
private $sitePubkPem = '';
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $loginName
+ * @type string $password
+ * @type string $sitePubkPem
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiPassportPasswordLogin::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiPassportPasswordLoginResponse.php b/src/lib/proto/Zaly/Proto/Site/ApiPassportPasswordLoginResponse.php
index f2a05dc1..e9ea1e8e 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiPassportPasswordLoginResponse.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiPassportPasswordLoginResponse.php
@@ -18,9 +18,18 @@ class ApiPassportPasswordLoginResponse extends \Google\Protobuf\Internal\Message
*/
private $preSessionId = '';
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $preSessionId
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiPassportPasswordLogin::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiPassportPasswordModifyPasswordRequest.php b/src/lib/proto/Zaly/Proto/Site/ApiPassportPasswordModifyPasswordRequest.php
index b3004cfd..44c582e6 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiPassportPasswordModifyPasswordRequest.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiPassportPasswordModifyPasswordRequest.php
@@ -31,9 +31,20 @@ class ApiPassportPasswordModifyPasswordRequest extends \Google\Protobuf\Internal
*/
private $newPassword = '';
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $loginName
+ * @type string $password
+ * @type string $newPassword
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiPassportPasswordModifyPassword::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiPassportPasswordModifyPasswordResponse.php b/src/lib/proto/Zaly/Proto/Site/ApiPassportPasswordModifyPasswordResponse.php
index baa393e8..49af34d7 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiPassportPasswordModifyPasswordResponse.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiPassportPasswordModifyPasswordResponse.php
@@ -14,9 +14,17 @@
class ApiPassportPasswordModifyPasswordResponse extends \Google\Protobuf\Internal\Message
{
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiPassportPasswordModifyPassword::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
}
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiPassportPasswordRegRequest.php b/src/lib/proto/Zaly/Proto/Site/ApiPassportPasswordRegRequest.php
index ef825824..3dfcc932 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiPassportPasswordRegRequest.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiPassportPasswordRegRequest.php
@@ -42,9 +42,23 @@ class ApiPassportPasswordRegRequest extends \Google\Protobuf\Internal\Message
*/
private $invitationCode = '';
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $loginName
+ * @type string $password
+ * @type string $email
+ * @type string $nickname
+ * @type string $sitePubkPem
+ * @type string $invitationCode
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiPassportPasswordReg::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiPassportPasswordRegResponse.php b/src/lib/proto/Zaly/Proto/Site/ApiPassportPasswordRegResponse.php
index e202adc2..8d222fc3 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiPassportPasswordRegResponse.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiPassportPasswordRegResponse.php
@@ -18,9 +18,18 @@ class ApiPassportPasswordRegResponse extends \Google\Protobuf\Internal\Message
*/
private $preSessionId = '';
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $preSessionId
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiPassportPasswordReg::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiPassportPasswordResetPasswordRequest.php b/src/lib/proto/Zaly/Proto/Site/ApiPassportPasswordResetPasswordRequest.php
index ed4bcba6..dda1bafe 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiPassportPasswordResetPasswordRequest.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiPassportPasswordResetPasswordRequest.php
@@ -30,9 +30,20 @@ class ApiPassportPasswordResetPasswordRequest extends \Google\Protobuf\Internal\
*/
private $password = '';
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $loginName
+ * @type string $token
+ * @type string $password
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiPassportPasswordResetPassword::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiPassportPasswordResetPasswordResponse.php b/src/lib/proto/Zaly/Proto/Site/ApiPassportPasswordResetPasswordResponse.php
index 1fb8a95f..4f5e3651 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiPassportPasswordResetPasswordResponse.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiPassportPasswordResetPasswordResponse.php
@@ -14,9 +14,17 @@
class ApiPassportPasswordResetPasswordResponse extends \Google\Protobuf\Internal\Message
{
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiPassportPasswordResetPassword::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
}
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiPassportPasswordUpdateInvitationCodeRequest.php b/src/lib/proto/Zaly/Proto/Site/ApiPassportPasswordUpdateInvitationCodeRequest.php
new file mode 100644
index 00000000..09dc8ec3
--- /dev/null
+++ b/src/lib/proto/Zaly/Proto/Site/ApiPassportPasswordUpdateInvitationCodeRequest.php
@@ -0,0 +1,116 @@
+site.ApiPassportPasswordUpdateInvitationCodeRequest
+ */
+class ApiPassportPasswordUpdateInvitationCodeRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field string sitePubkPem = 1;
+ */
+ private $sitePubkPem = '';
+ /**
+ * Generated from protobuf field string invitationCode = 2;
+ */
+ private $invitationCode = '';
+ /**
+ * Generated from protobuf field string preSessionId = 3;
+ */
+ private $preSessionId = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $sitePubkPem
+ * @type string $invitationCode
+ * @type string $preSessionId
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Site\ApiPassportPasswordUpdateInvitationCode::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Generated from protobuf field string sitePubkPem = 1;
+ * @return string
+ */
+ public function getSitePubkPem()
+ {
+ return $this->sitePubkPem;
+ }
+
+ /**
+ * Generated from protobuf field string sitePubkPem = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setSitePubkPem($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->sitePubkPem = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field string invitationCode = 2;
+ * @return string
+ */
+ public function getInvitationCode()
+ {
+ return $this->invitationCode;
+ }
+
+ /**
+ * Generated from protobuf field string invitationCode = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setInvitationCode($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->invitationCode = $var;
+
+ return $this;
+ }
+
+ /**
+ * Generated from protobuf field string preSessionId = 3;
+ * @return string
+ */
+ public function getPreSessionId()
+ {
+ return $this->preSessionId;
+ }
+
+ /**
+ * Generated from protobuf field string preSessionId = 3;
+ * @param string $var
+ * @return $this
+ */
+ public function setPreSessionId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->preSessionId = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiPassportPasswordUpdateInvitationCodeResponse.php b/src/lib/proto/Zaly/Proto/Site/ApiPassportPasswordUpdateInvitationCodeResponse.php
new file mode 100644
index 00000000..5b3ab34a
--- /dev/null
+++ b/src/lib/proto/Zaly/Proto/Site/ApiPassportPasswordUpdateInvitationCodeResponse.php
@@ -0,0 +1,58 @@
+site.ApiPassportPasswordUpdateInvitationCodeResponse
+ */
+class ApiPassportPasswordUpdateInvitationCodeResponse extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field string preSessionId = 1;
+ */
+ private $preSessionId = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $preSessionId
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Site\ApiPassportPasswordUpdateInvitationCode::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Generated from protobuf field string preSessionId = 1;
+ * @return string
+ */
+ public function getPreSessionId()
+ {
+ return $this->preSessionId;
+ }
+
+ /**
+ * Generated from protobuf field string preSessionId = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setPreSessionId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->preSessionId = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiPluginListRequest.php b/src/lib/proto/Zaly/Proto/Site/ApiPluginListRequest.php
index 66f75051..be286a32 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiPluginListRequest.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiPluginListRequest.php
@@ -21,9 +21,18 @@ class ApiPluginListRequest extends \Google\Protobuf\Internal\Message
*/
private $usageType = 0;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $usageType
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiPluginList::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiPluginListResponse.php b/src/lib/proto/Zaly/Proto/Site/ApiPluginListResponse.php
index 81457efd..c5f9793c 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiPluginListResponse.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiPluginListResponse.php
@@ -18,9 +18,18 @@ class ApiPluginListResponse extends \Google\Protobuf\Internal\Message
*/
private $list;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Zaly\Proto\Core\PluginProfile[]|\Google\Protobuf\Internal\RepeatedField $list
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiPluginList::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiPluginProxyRequest.php b/src/lib/proto/Zaly/Proto/Site/ApiPluginProxyRequest.php
index 07de0db2..52bcba96 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiPluginProxyRequest.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiPluginProxyRequest.php
@@ -41,9 +41,23 @@ class ApiPluginProxyRequest extends \Google\Protobuf\Internal\Message
*/
private $headers;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $pluginId
+ * @type string $url
+ * @type int $method
+ * @type string $body
+ * @type string $cookie
+ * @type array|\Google\Protobuf\Internal\MapField $headers
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiPluginProxy::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiPluginProxyResponse.php b/src/lib/proto/Zaly/Proto/Site/ApiPluginProxyResponse.php
index 8274153e..108c7bf8 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiPluginProxyResponse.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiPluginProxyResponse.php
@@ -26,9 +26,20 @@ class ApiPluginProxyResponse extends \Google\Protobuf\Internal\Message
*/
private $headers;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $body
+ * @type int $httpCode
+ * @type array|\Google\Protobuf\Internal\MapField $headers
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiPluginProxy::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiSiteConfigRequest.php b/src/lib/proto/Zaly/Proto/Site/ApiSiteConfigRequest.php
index 1570beae..540dbfb1 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiSiteConfigRequest.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiSiteConfigRequest.php
@@ -23,9 +23,19 @@ class ApiSiteConfigRequest extends \Google\Protobuf\Internal\Message
*/
private $random = '';
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $random
+ * appClient only.
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiSiteConfig::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiSiteConfigResponse.php b/src/lib/proto/Zaly/Proto/Site/ApiSiteConfigResponse.php
index 8294a65f..f6ed9f1a 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiSiteConfigResponse.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiSiteConfigResponse.php
@@ -32,9 +32,22 @@ class ApiSiteConfigResponse extends \Google\Protobuf\Internal\Message
*/
private $loginPluginProfile = null;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Zaly\Proto\Core\PublicSiteConfig $config
+ * @type string $randomSignBase64
+ * randomSignBase64 = rsa(site.privk, request.random)
+ * @type bool $isSessionValid
+ * @type \Zaly\Proto\Core\PluginProfile $loginPluginProfile
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiSiteConfig::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiSiteLoginRequest.php b/src/lib/proto/Zaly/Proto/Site/ApiSiteLoginRequest.php
index ba7e4379..f6a83d4a 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiSiteLoginRequest.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiSiteLoginRequest.php
@@ -35,9 +35,21 @@ class ApiSiteLoginRequest extends \Google\Protobuf\Internal\Message
*/
private $isRegister = false;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $preSessionId
+ * @type string $devicePubkPem
+ * @type string $loginName
+ * @type bool $isRegister
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiSiteLogin::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiSiteLoginResponse.php b/src/lib/proto/Zaly/Proto/Site/ApiSiteLoginResponse.php
index 7725dd46..41d3c3cc 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiSiteLoginResponse.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiSiteLoginResponse.php
@@ -22,9 +22,19 @@ class ApiSiteLoginResponse extends \Google\Protobuf\Internal\Message
*/
private $profile = null;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $sessionId
+ * @type \Zaly\Proto\Core\AllUserProfile $profile
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiSiteLogin::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiSiteLogoutRequest.php b/src/lib/proto/Zaly/Proto/Site/ApiSiteLogoutRequest.php
index 9eb449c6..9b397c4f 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiSiteLogoutRequest.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiSiteLogoutRequest.php
@@ -17,9 +17,17 @@
class ApiSiteLogoutRequest extends \Google\Protobuf\Internal\Message
{
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiSiteLogout::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
}
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiSiteLogoutResponse.php b/src/lib/proto/Zaly/Proto/Site/ApiSiteLogoutResponse.php
index 62305e65..264e36cf 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiSiteLogoutResponse.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiSiteLogoutResponse.php
@@ -14,9 +14,17 @@
class ApiSiteLogoutResponse extends \Google\Protobuf\Internal\Message
{
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiSiteLogout::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
}
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiSyncCheckRequest.php b/src/lib/proto/Zaly/Proto/Site/ApiSyncCheckRequest.php
index ad526cf4..d8adabd0 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiSyncCheckRequest.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiSyncCheckRequest.php
@@ -25,9 +25,19 @@ class ApiSyncCheckRequest extends \Google\Protobuf\Internal\Message
*/
private $localVersion = 0;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $type
+ * @type int $localVersion
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiSyncCheck::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiSyncCheckResponse.php b/src/lib/proto/Zaly/Proto/Site/ApiSyncCheckResponse.php
index 57ec789b..cb23bce4 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiSyncCheckResponse.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiSyncCheckResponse.php
@@ -18,9 +18,18 @@ class ApiSyncCheckResponse extends \Google\Protobuf\Internal\Message
*/
private $version = 0;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $version
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiSyncCheck::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiSyncType.php b/src/lib/proto/Zaly/Proto/Site/ApiSyncType.php
index 937d0750..20daa7fe 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiSyncType.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiSyncType.php
@@ -5,7 +5,7 @@
namespace Zaly\Proto\Site;
/**
- * Protobuf enum Site\ApiSyncType
+ * Protobuf type site.ApiSyncType
*/
class ApiSyncType
{
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiTmpchatDeleteRequest.php b/src/lib/proto/Zaly/Proto/Site/ApiTmpchatDeleteRequest.php
index 7e296151..f1963ea7 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiTmpchatDeleteRequest.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiTmpchatDeleteRequest.php
@@ -21,9 +21,18 @@ class ApiTmpchatDeleteRequest extends \Google\Protobuf\Internal\Message
*/
private $toUserId = '';
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $toUserId
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiTmpchatDelete::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiTmpchatDeleteResponse.php b/src/lib/proto/Zaly/Proto/Site/ApiTmpchatDeleteResponse.php
index 01367c54..483bab86 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiTmpchatDeleteResponse.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiTmpchatDeleteResponse.php
@@ -14,9 +14,17 @@
class ApiTmpchatDeleteResponse extends \Google\Protobuf\Internal\Message
{
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiTmpchatDelete::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
}
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiTmpchatGroupRequest.php b/src/lib/proto/Zaly/Proto/Site/ApiTmpchatGroupRequest.php
index 6642b408..cfabb5b4 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiTmpchatGroupRequest.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiTmpchatGroupRequest.php
@@ -25,9 +25,19 @@ class ApiTmpchatGroupRequest extends \Google\Protobuf\Internal\Message
*/
private $toUserId = '';
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $groupId
+ * @type string $toUserId
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiTmpchatGroup::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiTmpchatGroupResponse.php b/src/lib/proto/Zaly/Proto/Site/ApiTmpchatGroupResponse.php
index eb9563be..7183e2e6 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiTmpchatGroupResponse.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiTmpchatGroupResponse.php
@@ -14,9 +14,17 @@
class ApiTmpchatGroupResponse extends \Google\Protobuf\Internal\Message
{
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiTmpchatGroup::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
}
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiUserProfileRequest.php b/src/lib/proto/Zaly/Proto/Site/ApiUserProfileRequest.php
index c8e6d526..8bfbf104 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiUserProfileRequest.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiUserProfileRequest.php
@@ -17,9 +17,17 @@
class ApiUserProfileRequest extends \Google\Protobuf\Internal\Message
{
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiUserProfile::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
}
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiUserProfileResponse.php b/src/lib/proto/Zaly/Proto/Site/ApiUserProfileResponse.php
index c3976fd3..330a7ecd 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiUserProfileResponse.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiUserProfileResponse.php
@@ -18,9 +18,18 @@ class ApiUserProfileResponse extends \Google\Protobuf\Internal\Message
*/
private $profile = null;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Zaly\Proto\Core\AllUserProfile $profile
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiUserProfile::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiUserUpdateRequest.php b/src/lib/proto/Zaly/Proto/Site/ApiUserUpdateRequest.php
index 413d98f5..07f6a113 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiUserUpdateRequest.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiUserUpdateRequest.php
@@ -21,9 +21,18 @@ class ApiUserUpdateRequest extends \Google\Protobuf\Internal\Message
*/
private $values;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Zaly\Proto\Site\ApiUserUpdateValue[]|\Google\Protobuf\Internal\RepeatedField $values
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiUserUpdate::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiUserUpdateResponse.php b/src/lib/proto/Zaly/Proto/Site/ApiUserUpdateResponse.php
index 25308250..8340a84c 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiUserUpdateResponse.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiUserUpdateResponse.php
@@ -18,9 +18,18 @@ class ApiUserUpdateResponse extends \Google\Protobuf\Internal\Message
*/
private $profile = null;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Zaly\Proto\Core\AllUserProfile $profile
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiUserUpdate::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiUserUpdateType.php b/src/lib/proto/Zaly/Proto/Site/ApiUserUpdateType.php
index 1468c2da..2bc5230d 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiUserUpdateType.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiUserUpdateType.php
@@ -5,7 +5,7 @@
namespace Zaly\Proto\Site;
/**
- * Protobuf enum Site\ApiUserUpdateType
+ * Protobuf type site.ApiUserUpdateType
*/
class ApiUserUpdateType
{
diff --git a/src/lib/proto/Zaly/Proto/Site/ApiUserUpdateValue.php b/src/lib/proto/Zaly/Proto/Site/ApiUserUpdateValue.php
index 209e4098..0dbc336d 100644
--- a/src/lib/proto/Zaly/Proto/Site/ApiUserUpdateValue.php
+++ b/src/lib/proto/Zaly/Proto/Site/ApiUserUpdateValue.php
@@ -19,9 +19,20 @@ class ApiUserUpdateValue extends \Google\Protobuf\Internal\Message
private $type = 0;
protected $fields;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $type
+ * @type string $avatar
+ * @type string $nickname
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ApiUserUpdate::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ImCtsAuthRequest.php b/src/lib/proto/Zaly/Proto/Site/ImCtsAuthRequest.php
index e7004f00..edb79c6d 100644
--- a/src/lib/proto/Zaly/Proto/Site/ImCtsAuthRequest.php
+++ b/src/lib/proto/Zaly/Proto/Site/ImCtsAuthRequest.php
@@ -20,9 +20,17 @@
class ImCtsAuthRequest extends \Google\Protobuf\Internal\Message
{
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ImCtsAuth::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
}
diff --git a/src/lib/proto/Zaly/Proto/Site/ImCtsAuthResponse.php b/src/lib/proto/Zaly/Proto/Site/ImCtsAuthResponse.php
index 5edca486..36d17e69 100644
--- a/src/lib/proto/Zaly/Proto/Site/ImCtsAuthResponse.php
+++ b/src/lib/proto/Zaly/Proto/Site/ImCtsAuthResponse.php
@@ -14,9 +14,17 @@
class ImCtsAuthResponse extends \Google\Protobuf\Internal\Message
{
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ImCtsAuth::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
}
diff --git a/src/lib/proto/Zaly/Proto/Site/ImCtsMessageRequest.php b/src/lib/proto/Zaly/Proto/Site/ImCtsMessageRequest.php
index 8697d189..5bf62152 100644
--- a/src/lib/proto/Zaly/Proto/Site/ImCtsMessageRequest.php
+++ b/src/lib/proto/Zaly/Proto/Site/ImCtsMessageRequest.php
@@ -21,9 +21,18 @@ class ImCtsMessageRequest extends \Google\Protobuf\Internal\Message
*/
private $message = null;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Zaly\Proto\Core\Message $message
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ImCtsMessage::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ImCtsPingRequest.php b/src/lib/proto/Zaly/Proto/Site/ImCtsPingRequest.php
index fd2937e7..f9aed6a6 100644
--- a/src/lib/proto/Zaly/Proto/Site/ImCtsPingRequest.php
+++ b/src/lib/proto/Zaly/Proto/Site/ImCtsPingRequest.php
@@ -20,9 +20,18 @@ class ImCtsPingRequest extends \Google\Protobuf\Internal\Message
*/
private $random = '';
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $random
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ImCtsPing::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ImCtsSyncRequest.php b/src/lib/proto/Zaly/Proto/Site/ImCtsSyncRequest.php
index b172b9d3..8063ac12 100644
--- a/src/lib/proto/Zaly/Proto/Site/ImCtsSyncRequest.php
+++ b/src/lib/proto/Zaly/Proto/Site/ImCtsSyncRequest.php
@@ -32,9 +32,22 @@ class ImCtsSyncRequest extends \Google\Protobuf\Internal\Message
*/
private $updatePointer = false;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $u2Count
+ * @type int $groupCount
+ * @type bool $updatePointer
+ * if true: update the user's pointer to the value in MessageSyncReq
+ * for http-only server.
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ImCtsSync::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/proto/Zaly/Proto/Site/ImCtsUpdatePointerRequest.php b/src/lib/proto/Zaly/Proto/Site/ImCtsUpdatePointerRequest.php
index 5eeb8037..8acc876c 100644
--- a/src/lib/proto/Zaly/Proto/Site/ImCtsUpdatePointerRequest.php
+++ b/src/lib/proto/Zaly/Proto/Site/ImCtsUpdatePointerRequest.php
@@ -25,9 +25,19 @@ class ImCtsUpdatePointerRequest extends \Google\Protobuf\Internal\Message
*/
private $groupsPointer;
- public function __construct() {
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int|string $u2Pointer
+ * @type array|\Google\Protobuf\Internal\MapField $groupsPointer
+ * }
+ */
+ public function __construct($data = NULL) {
\GPBMetadata\Site\ImCtsUpdatePointer::initOnce();
- parent::__construct();
+ parent::__construct($data);
}
/**
diff --git a/src/lib/wpf/Wpf_Loader.php b/src/lib/wpf/Wpf_Loader.php
index c973f851..8fb13d36 100644
--- a/src/lib/wpf/Wpf_Loader.php
+++ b/src/lib/wpf/Wpf_Loader.php
@@ -8,14 +8,19 @@ public function __construct() {
$this->pathList = array();
}
+ private $registedClasses = array();
+ public function registerClass(array $classAndPath) {
+ $this->registedClasses = $classAndPath;
+ }
+
public function addDir($dir) {
$this->pathList[] = $dir;
}
-
+
public function addNamedDir($name, $dir) {
$this->pathList[$name] = $dir;
}
-
+
public function classNameToPath($className) {
$path = '';
$lastpos = strrpos($className, "_");
@@ -32,13 +37,20 @@ public function classNameToPath($className) {
}
public function load($className) {
- $classNamePath = $this->classNameToPath($className);
- foreach ($this->pathList as $dir) {
- $tmppath = $dir . $classNamePath;
- if (file_exists($tmppath)) {
- require_once($tmppath);
- return;
- }
- }
+
+ $classNamePath = "";
+ if (isset($this->registedClasses[$className])) {
+ $classNamePath = WPF_LIB_DIR . "/../" . $this->registedClasses[$className];
+ } else {
+ $classNamePath = $this->classNameToPath($className);
+ foreach ($this->pathList as $dir) {
+ $tmppath = $dir . $classNamePath;
+ if (file_exists($tmppath)) {
+ $classNamePath = $tmppath;
+ break;
+ }
+ }
+ }
+ require_once ($classNamePath);
}
}
diff --git a/src/lib/wpf/init.php b/src/lib/wpf/init.php
index 51ffedbe..e4150321 100644
--- a/src/lib/wpf/init.php
+++ b/src/lib/wpf/init.php
@@ -36,6 +36,64 @@
$autoloader->addDir(WPF_LIB_DIR . '/../controller/');
spl_autoload_register(array($autoloader, 'load'));
+// For performance
+//
+// autoload: the most commonly used files from autoload "file_exists" Stat.
+$preAutoloadFiles = array(
+ 'Api_Group_BaseController' => '/controller/Api/Group/Api_Group_BaseController.php',
+ 'Api_Group_ProfileController' => '/controller/Api/Group/Api_Group_ProfileController.php',
+ 'BaseController' => '/controller/BaseController.php',
+ 'GPBMetadata\\Core\Net' => '/lib/proto/GPBMetadata/Core/Net.php',
+ 'GPBMetadata\\Google\\Protobuf\\Any' => '/lib/proto/GPBMetadata/Google/Protobuf/Any.php',
+ 'GPBMetadata\\Google\\Protobuf\\Internal\\Descriptor' => '/lib/proto/GPBMetadata/Google/Protobuf/Internal/Descriptor.php',
+ 'Google\\Protobuf\\Any' => '/lib/proto/Google/Protobuf/Any.php',
+ 'Google\\Protobuf\\Descriptor' => '/lib/proto/Google/Protobuf/Descriptor.php',
+ 'Google\\Protobuf\\EnumDescriptor' => '/lib/proto/Google/Protobuf/EnumDescriptor.php',
+ 'Google\\Protobuf\\EnumValueDescriptor' => '/lib/proto/Google/Protobuf/EnumValueDescriptor.php',
+ 'Google\\Protobuf\\FieldDescriptor' => '/lib/proto/Google/Protobuf/FieldDescriptor.php',
+ 'Google\\Protobuf\\Internal\\CodedInputStream' => '/lib/proto/Google/Protobuf/Internal/CodedInputStream.php',
+ 'Google\\Protobuf\\Internal\\CodedOutputStream' => '/lib/proto/Google/Protobuf/Internal/CodedOutputStream.php',
+ 'Google\\Protobuf\\Internal\\Descriptor' => '/lib/proto/Google/Protobuf/Internal/Descriptor.php',
+ 'Google\\Protobuf\\Internal\\DescriptorPool' => '/lib/proto/Google/Protobuf/Internal/DescriptorPool.php',
+ 'Google\\Protobuf\\Internal\\DescriptorProto' => '/lib/proto/Google/Protobuf/Internal/DescriptorProto.php',
+ 'Google\\Protobuf\\Internal\\EnumBuilderContext' => '/lib/proto/Google/Protobuf/Internal/EnumBuilderContext.php',
+ 'Google\\Protobuf\\Internal\\EnumDescriptor' => '/lib/proto/Google/Protobuf/Internal/EnumDescriptor.php',
+ 'Google\\Protobuf\\Internal\\EnumDescriptorProto' => '/lib/proto/Google/Protobuf/Internal/EnumDescriptorProto.php',
+ 'Google\\Protobuf\\Internal\\EnumValueDescriptorProto' => '/lib/proto/Google/Protobuf/Internal/EnumValueDescriptorProto.php',
+ 'Google\\Protobuf\\Internal\\FieldDescriptor' => '/lib/proto/Google/Protobuf/Internal/FieldDescriptor.php',
+ 'Google\\Protobuf\\Internal\\FieldDescriptorProto' => '/lib/proto/Google/Protobuf/Internal/FieldDescriptorProto.php',
+ 'Google\\Protobuf\\Internal\\FileDescriptor' => '/lib/proto/Google/Protobuf/Internal/FileDescriptor.php',
+ 'Google\\Protobuf\\Internal\\FileDescriptorProto' => '/lib/proto/Google/Protobuf/Internal/FileDescriptorProto.php',
+ 'Google\\Protobuf\\Internal\\FileDescriptorSet' => '/lib/proto/Google/Protobuf/Internal/FileDescriptorSet.php',
+ 'Google\\Protobuf\\Internal\\FileOptions' => '/lib/proto/Google/Protobuf/Internal/FileOptions.php',
+ 'Google\\Protobuf\\Internal\\GPBJsonWire' => '/lib/proto/Google/Protobuf/Internal/GPBJsonWire.php',
+ 'Google\\Protobuf\\Internal\\GPBLabel' => '/lib/proto/Google/Protobuf/Internal/GPBLabel.php',
+ 'Google\\Protobuf\\Internal\\GPBType' => '/lib/proto/Google/Protobuf/Internal/GPBType.php',
+ 'Google\\Protobuf\\Internal\\GPBUtil' => '/lib/proto/Google/Protobuf/Internal/GPBUtil.php',
+ 'Google\\Protobuf\\Internal\\GPBWire' => '/lib/proto/Google/Protobuf/Internal/GPBWire.php',
+ 'Google\\Protobuf\\Internal\\GetPublicDescriptorTrait' => '/lib/proto/Google/Protobuf/Internal/GetPublicDescriptorTrait.php',
+ 'Google\\Protobuf\\Internal\\HasPublicDescriptorTrait' => '/lib/proto/Google/Protobuf/Internal/HasPublicDescriptorTrait.php',
+ 'Google\\Protobuf\\Internal\\MapField' => '/lib/proto/Google/Protobuf/Internal/MapField.php',
+ 'Google\\Protobuf\\Internal\\MapFieldIter' => '/lib/proto/Google/Protobuf/Internal/MapFieldIter.php',
+ 'Google\\Protobuf\\Internal\\Message' => '/lib/proto/Google/Protobuf/Internal/Message.php',
+ 'Google\\Protobuf\\Internal\\MessageBuilderContext' => '/lib/proto/Google/Protobuf/Internal/MessageBuilderContext.php',
+ 'Google\\Protobuf\\Internal\\MessageOptions' => '/lib/proto/Google/Protobuf/Internal/MessageOptions.php',
+ 'Google\\Protobuf\\Internal\\RawInputStream' => '/lib/proto/Google/Protobuf/Internal/RawInputStream.php',
+ 'Google\\Protobuf\\Internal\\RepeatedField' => '/lib/proto/Google/Protobuf/Internal/RepeatedField.php',
+ 'Google\\Protobuf\\Internal\\RepeatedFieldIter' => '/lib/proto/Google/Protobuf/Internal/RepeatedFieldIter.php',
+ 'HttpBaseController' => '/controller/HttpBaseController.php',
+ 'Im_BaseController' => '/controller/Im/Im_BaseController.php',
+ 'Im_Cts_SyncController' => '/controller/Im/Cts/Im_Cts_SyncController.php',
+ 'ZalyConfig' => '/lib/Util/ZalyConfig.php',
+ 'ZalyErrorBase' => '/lib/Util/ZalyErrorBase.php',
+ 'ZalyErrorZh' => '/lib/Util/ZalyErrorZh.php',
+ 'ZalyHelper' => '/lib/Util/ZalyHelper.php',
+ 'Zaly\\Proto\\Core\\TransportData' => '/lib/proto/Zaly/Proto/Core/TransportData.php',
+ 'Zaly\\Proto\\Core\\TransportDataHeaderKey' => '/lib/proto/Zaly/Proto/Core/TransportDataHeaderKey.php',
+ 'Zaly\\Proto\\Core\\UserClientLangType' => '/lib/proto/Zaly/Proto/Core/UserClientLangType.php',
+);
+$autoloader->registerClass($preAutoloadFiles);
+
//生成WEB程序管理器,开始执行逻辑
$web = new Wpf_Web();
$web->run();
diff --git a/src/model/File/File_Manager.php b/src/model/File/File_Manager.php
index edebb719..4c6112ee 100644
--- a/src/model/File/File_Manager.php
+++ b/src/model/File/File_Manager.php
@@ -25,10 +25,10 @@ public function __construct()
$this->wpf_Logger = new Wpf_Logger();
}
- public function getPath($dateDir, $fileId)
+ public function getPath($dateDir, $fileId, $isCreateFolder = true)
{
$dirName = WPF_LIB_DIR . "/../{$this->attachmentDir}/$dateDir";
- if (!is_dir($dirName)) {
+ if (!is_dir($dirName) && $isCreateFolder) {
mkdir($dirName, 0755, true);
}
return $dirName . "/" . $fileId;
@@ -43,7 +43,7 @@ public function readFile($fileId)
$fileName = explode("-", $fileId);
$dirName = $fileName[0];
$fileId = $fileName[1];
- $path = $this->getPath($dirName, $fileId);
+ $path = $this->getPath($dirName, $fileId, false);
return file_get_contents($path);
}
diff --git a/src/model/PassportPasswordPreSessionTable.php b/src/model/PassportPasswordPreSessionTable.php
index c57fb8fa..69a7d7cd 100644
--- a/src/model/PassportPasswordPreSessionTable.php
+++ b/src/model/PassportPasswordPreSessionTable.php
@@ -64,8 +64,6 @@ public function getInfoByPreSessionId($preSessionId)
}
}
-
-
public function delInfoByPreSessionId($preSessionId)
{
$tag = __CLASS__ . "-" . __FILE__;
@@ -83,5 +81,22 @@ public function delInfoByPreSessionId($preSessionId)
}
}
+ public function delInfoByUserId($userId)
+ {
+ $tag = __CLASS__ . "-" . __FILE__;
+ $startTime = microtime(true);
+ try {
+ $sql = "delete from $this->table where userId=:userId";
+ $prepare = $this->db->prepare($sql);
+ $this->handlePrepareError($tag, $prepare);
+ $prepare->bindValue(":usrId", $userId);
+ $prepare->execute();
+ $this->ctx->Wpf_Logger->writeSqlLog($tag, $sql, $userId, $startTime);
+ } catch (Exception $ex) {
+ $this->ctx->Wpf_Logger->error($tag, "error_msg=" . $ex->getMessage());
+ throw new Exception("delete failed");
+ return false;
+ }
+ }
}
\ No newline at end of file
diff --git a/src/public/css/init.css b/src/public/css/init.css
index 148f294d..3a7ac10c 100644
--- a/src/public/css/init.css
+++ b/src/public/css/init.css
@@ -90,7 +90,7 @@ body,html {
outline: none;
}
.choose_login_type {
- margin-right: 34rem;
+ margin-right: 32rem;
}
@media (max-width: 500px) {
diff --git a/src/public/css/login.css b/src/public/css/login.css
index 3b0232e0..0ba00114 100755
--- a/src/public/css/login.css
+++ b/src/public/css/login.css
@@ -36,7 +36,6 @@ body,html {
}
.login_name_div{
- height:4rem;
position: relative;
font-size:1.88rem;
font-family:PingFangSC-Regular;
@@ -44,8 +43,11 @@ body,html {
margin-top: 5rem;
}
+.margin-top4 {
+ margin-top: 4rem;
+}
+
.input_login_site {
- height: 4rem;
top: 0;
bottom: 0;
right: 0;
@@ -53,6 +55,7 @@ body,html {
margin: auto 0;
margin-left: 3rem;
width: 25rem;
+ line-height: 3rem;
}
.img {
@@ -64,7 +67,6 @@ body,html {
right: 0;
left: 0;
margin: auto 0;
- margin-bottom: 1rem;
}
.img-failed {
width: 2rem;
@@ -127,7 +129,7 @@ input,
.register_site {
font-size:1.88rem;
font-family:PingFangSC-Regular;
- color:rgba(223,223,223,1);
+ color:rgba(20,16,48,1);
vertical-align:middle;
outline: none;
border-style:none;
@@ -186,9 +188,6 @@ input:active,
color:rgba(20,16,48,1);
}
-.login_name_div {
- margin-top: 1rem;
-}
.color-white {
color: white;
}
@@ -205,6 +204,10 @@ input:active,
.register_button:hover,
.register_button:focus,
.register_button:active,
+.update_code_btn,
+.update_code_btn:hover,
+.update_code_btn:focus,
+.update_code_btn:active,
.register_code_button,
.register_code_button:hover,
.register_code_button:focus,
@@ -285,7 +288,9 @@ input:active,
position: absolute;
cursor: pointer;
}
-
+.margin-top2 {
+ margin-top: 2rem;
+}
@media (max-width: 500px) {
.zaly_login {
width: 100%;
@@ -302,7 +307,9 @@ input:active,
.login-header {
display:none;
}
- .login_name_div {
- margin-top: 7rem;
+
+ .login_name_div_mobile {
+ margin-top:7rem;
}
+
}
\ No newline at end of file
diff --git a/src/public/js/config/lang.properties b/src/public/js/config/lang.properties
index 7877c121..a811d199 100644
--- a/src/public/js/config/lang.properties
+++ b/src/public/js/config/lang.properties
@@ -67,7 +67,10 @@ loginNamePlaceholder=输入登录名
registerLoginNamePlaceholder=用户名以字母、数字、下划线,1-16个字符
enterPasswordPlaceholder=输入密码
registerTip=注册
+login*site*btn=登录站点
+register*Site*Tip=Register Site
registerBtnTip=注册并登录
+registerNicknameTip=输入昵称
registerBtnCodeTip=下一步
forgetPasswordTip=忘记密码?
enterRepasswordPlaceholder=再次输入密码
diff --git a/src/public/js/config/lang_en.properties b/src/public/js/config/lang_en.properties
index e6e6dc61..410e0421 100644
--- a/src/public/js/config/lang_en.properties
+++ b/src/public/js/config/lang_en.properties
@@ -69,6 +69,9 @@ registerLoginNamePlaceholder=LoginName is alphanumeric, underscore, 1-16 charact
enterPasswordPlaceholder=Please Enter Password
enterCodePlaceholder=Please Enter Password
registerTip=Register
+registerNicknameTip=Nickname
+login*site*btn=Login Site
+register*Site*Tip=Register Site
registerBtnTip=Register And Login
registerBtnCodeTip=Next
forgetPasswordTip=Forget Password
diff --git a/src/public/js/config/lang_zh.properties b/src/public/js/config/lang_zh.properties
index 7877c121..d5b879a8 100644
--- a/src/public/js/config/lang_zh.properties
+++ b/src/public/js/config/lang_zh.properties
@@ -67,6 +67,9 @@ loginNamePlaceholder=输入登录名
registerLoginNamePlaceholder=用户名以字母、数字、下划线,1-16个字符
enterPasswordPlaceholder=输入密码
registerTip=注册
+login*site*btn=登录站点
+register*Site*Tip=注册站点
+registerNicknameTip=输入昵称
registerBtnTip=注册并登录
registerBtnCodeTip=下一步
forgetPasswordTip=忘记密码?
diff --git a/src/public/js/im/zalyAction.js b/src/public/js/im/zalyAction.js
index 983bd6c6..11f94437 100755
--- a/src/public/js/im/zalyAction.js
+++ b/src/public/js/im/zalyAction.js
@@ -39,6 +39,7 @@ var ZalyAction = {
api_passport_passwordFindPassword :"site.ApiPassportPasswordFindPasswordRequest",
api_passport_passwordResetPassword :"site.ApiPassportPasswordResetPasswordRequest",
duckchat_message_send : "plugin.DuckChatMessageSendRequest",
+ api_passport_passwordUpdateInvitationCode:"site.ApiPassportPasswordUpdateInvitationCodeRequest",
api_friend_search:"site.ApiFriendSearchRequest",
diff --git a/src/public/js/im/zalyBaseWs.js b/src/public/js/im/zalyBaseWs.js
index fedae48d..5b423f9d 100755
--- a/src/public/js/im/zalyBaseWs.js
+++ b/src/public/js/im/zalyBaseWs.js
@@ -4,6 +4,8 @@ landingPageUrl="";
var config = localStorage.getItem(siteConfigKey);
var enableWebsocketGw = localStorage.getItem(websocketGW);
+
+
wsUrlSuffix = "?body_format=json";
var packageId = localStorage.getItem(PACKAGE_ID);
diff --git a/src/public/js/im/zalyClient.js b/src/public/js/im/zalyClient.js
index 937ae995..420fec25 100755
--- a/src/public/js/im/zalyClient.js
+++ b/src/public/js/im/zalyClient.js
@@ -45,7 +45,7 @@ function handleClientSendRequest(action, reqData, callback, isHttp)
var header = {};
header[HeaderSessionid] = sessionId;
header[HeaderHostUrl] = originDomain;
- header[HeaderUserClientLang] = languageName = navigator.language == "en-US" ? "0" : "1";
+ header[HeaderUserClientLang] = languageName == "en-US" ? "0" : "1";
var packageId = localStorage.getItem(PACKAGE_ID);
@@ -56,9 +56,10 @@ function handleClientSendRequest(action, reqData, callback, isHttp)
"packageId" : Number(packageId),
};
- var packageId = localStorage.setItem(PACKAGE_ID, (Number(packageId)+1));
- this.callback = callback;
+ localStorage.setItem(PACKAGE_ID, (Number(packageId)+1));
+
var transportDataJson = JSON.stringify(transportData);
+
var enableWebsocketGW = localStorage.getItem(websocketGW);
if(enableWebsocketGW == "true" && !isHttp && wsUrl != null && wsUrl) {
putWsQueue(transportDataJson, callback);
diff --git a/src/public/js/im/zalyGroupMsg.js b/src/public/js/im/zalyGroupMsg.js
index e86b8715..606c9c64 100755
--- a/src/public/js/im/zalyGroupMsg.js
+++ b/src/public/js/im/zalyGroupMsg.js
@@ -75,7 +75,7 @@ function getNotMsgImg(userId, avatarImgId)
}
sessionStorage.setItem(userImgKey, Date.parse(new Date()));
- var requestUrl = "./index.php?action=http.file.downloadMessageFile&fileId="+avatarImgId+"&returnBase64=0&isGroupMessage=1";
+ var requestUrl = downloadFileUrl + "&fileId="+avatarImgId+"&returnBase64=0";
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && (this.status == 200 || this.status == 304)) {
@@ -98,7 +98,7 @@ function getMsgImg(imgId, isGroupMessage, msgId)
if(imgId == undefined || imgId == "" || imgId.length<1) {
return false;
}
- var requestUrl = "./index.php?action=http.file.downloadMessageFile&fileId="+imgId + "&returnBase64=0&isGroupMessage="+isGroupMessage+"&messageId="+msgId;
+ var requestUrl = downloadFileUrl + "&fileId="+imgId + "&returnBase64=0&isGroupMessage="+isGroupMessage+"&messageId="+msgId;
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && (this.status == 200 || this.status == 304)) {
diff --git a/src/public/js/im/zalyIm.js b/src/public/js/im/zalyIm.js
index b7218004..550e4925 100755
--- a/src/public/js/im/zalyIm.js
+++ b/src/public/js/im/zalyIm.js
@@ -67,7 +67,7 @@ function handleImSendRequest(action, reqData, callback)
var header = {};
header[HeaderSessionid] = sessionId;
header[HeaderHostUrl] = originDomain;
- header[HeaderUserClientLang] = languageName = navigator.language == "en-US" ? "0" : "1";
+ header[HeaderUserClientLang] = languageName == "en-US" ? "0" : "1";
var packageId = localStorage.getItem(PACKAGE_ID);
@@ -81,6 +81,7 @@ function handleImSendRequest(action, reqData, callback)
var packageId = localStorage.setItem(PACKAGE_ID, (Number(packageId)+1));
var transportDataJson = JSON.stringify(transportData);
+
var enableWebsocketGw = localStorage.getItem(websocketGW);
if(enableWebsocketGw == "true" && wsUrl != null && wsUrl) {
websocketIm(transportDataJson, callback);
diff --git a/src/public/js/im/zalyKey.js b/src/public/js/im/zalyKey.js
index 68883b67..316ab36e 100755
--- a/src/public/js/im/zalyKey.js
+++ b/src/public/js/im/zalyKey.js
@@ -190,3 +190,8 @@ reqTimeout = 1000*60*5;///5分钟
defaultUserName = "匿名";
+downloadFileUrl = "./index.php?action=http.file.downloadFile";
+languageName = navigator.language == "en-US" ? "en" : "zh";
+
+languageName = "zh";
+
diff --git a/src/public/js/im/zalyMsg.js b/src/public/js/im/zalyMsg.js
index ee5c0969..9d0e9913 100755
--- a/src/public/js/im/zalyMsg.js
+++ b/src/public/js/im/zalyMsg.js
@@ -355,6 +355,7 @@ function handleSyncMsgForRoom(results)
}
}
}catch (error) {
+ console.log("error msg ==" + error.message);
isSyncingMsg = false;
}
}
@@ -374,10 +375,12 @@ function handleSyncMsg(msg)
getFriendApplyList();
return;
};
+
var msg = handleMsgInfo(msg);
var currentChatSessionId = localStorage.getItem(chatSessionIdKey);
var isNewMsg = handleMsgForMsgRoom(msg.chatSessionId, msg);
+
///是自己群的消息,并且是新消息
if(msg.chatSessionId == currentChatSessionId && isNewMsg) {
appendMsgHtml(msg);
@@ -466,6 +469,7 @@ function handleMsgForMsgRoom(chatSessionId, pushMsg)
if(pushMsg != undefined) {
msgList.push(pushMsg);
+
var isNewMsg = uniqueMsgAndCheckMsgId(msgList, pushMsg.msgId, roomChatSessionKey);
return isNewMsg;
@@ -883,6 +887,7 @@ function getMsgSizeForDiv(msg)
}
return getMsgSize(msg['image'].width, msg['image'].height, h, w);
}
+
function getWebMsgHref(msgId, msgRoomType)
{
var url = "./index.php?action=http.file.downloadWebMsg&msgId="+msgId+"&isGroupMessage="+(msgRoomType==GROUP_MSG ? 1 : 0);
diff --git a/src/public/js/login/login.js b/src/public/js/login/login.js
index 756cc02a..9a32c664 100644
--- a/src/public/js/login/login.js
+++ b/src/public/js/login/login.js
@@ -34,6 +34,15 @@ jQuery.i18n.properties({
+refererKey = "site_referer";
+siteConfig = {};
+enableInvitationCode=0;
+enableRealName=0;
+sitePubkPem="";
+invitationCode='';
+nickname="";
+allowShareRealname=0;
+preSessionId="";
refererUrl = document.referrer;
secondNum = 120;
isSending = false;
@@ -42,6 +51,43 @@ var protocol = window.location.protocol;
var host = window.location.host;
var pathname = window.location.pathname;
originDomain = protocol+"//"+host+pathname;
+isRegister=false;
+
+
+function zalyLoginConfig(results) {
+ if(typeof results == "object" ) {
+ siteConfig = results;
+ } else {
+ siteConfig = JSON.parse(results);
+ }
+ enableInvitationCode = siteConfig.enableInvitationCode;
+ enableRealName=siteConfig.enableRealName;
+ sitePubkPem = siteConfig.sitePubkPem;
+}
+
+function loginSuccess()
+{
+ handleRedirect();
+}
+
+function handleRedirect()
+{
+ if(refererUrl) {
+ if(refererUrl.indexOf("?") > -1) {
+ refererUrl = refererUrl+"&preSessionId="+preSessionId+"&isRegister="+isRegister;
+ } else {
+ refererUrl = refererUrl+"?preSessionId="+preSessionId+"&isRegister="+isRegister;
+ }
+ window.location.href = refererUrl;
+ }
+}
+
+
+function loginFailed()
+{
+ zalyjsAlert("登录失败");
+ console.log("登录失败");
+}
if(refererUrl != undefined && refererUrl.length>1) {
siteConfigJsUrl = "./index.php?action=page.siteConfig&callback=zalyLoginConfig";
@@ -99,35 +145,9 @@ $(".input_login_site").bind('input porpertychange',function(){
}
});
-$(".login_input_loginName").bind('input porpertychange',function(){
- if($(".login_input_loginName").val().length>0) {
- $(".login_input_loginName").addClass("black");
- }
- enableLoginSiteBtn();
-});
-
-$(".login_input_pwd").bind('input porpertychange',function(){
- if($(".login_input_pwd").val().length>0) {
- $(".login_input_pwd").addClass("black");
- }
- enableLoginSiteBtn();
-});
-
-function enableLoginSiteBtn()
-{
- if($(".login_input_pwd").val().length>0 && $(".login_input_loginName").val().length>0) {
- $(".login_button").attr("disabled", false);
- $(".login_button").addClass("btn-enable-color");
- } else {
- $(".login_button").attr("disabled", true);
- $(".login_button").removeClass("btn-enable-color");
- }
-}
-
function registerForPassportPassword()
{
- // $(".input_login_site").val("")/**/;
- var html = template("tpl-login-div", {
+ var html = template("tpl-register-div", {
enableInvitationCode : enableInvitationCode
});
html = handleHtmlLanguage(html);
@@ -143,7 +163,7 @@ function returnRegisterDiv() {
function handleHtmlLanguage(html)
{
-
+ console.log($.i18n.map['registerBtnTip']);
$(html).find("[data-local-placeholder]").each(function () {
var placeholderValue = $(this).attr("data-local-placeholder");
var placeholder = $(this).attr("placeholder");
@@ -154,12 +174,12 @@ function handleHtmlLanguage(html)
$(html).find("[data-local-value]").each(function () {
var changeHtmlValue = $(this).attr("data-local-value");
var valueHtml = $(this).html();
-
var newValueHtml = $.i18n.map[changeHtmlValue];
-
+ // $(this).html(newValueHtml);
html = html.replace(valueHtml, newValueHtml);
});
+ console.log(html);
return html;
}
@@ -252,11 +272,11 @@ function checkRegisterInfo()
$(".register_input_email_failed")[0].style.display = "none";
if(registerPassword != repassword) {
- alert($.i18n.map["passwordIsNotSameJsTip"]);
+ zalyjsAlert($.i18n.map["passwordIsNotSameJsTip"]);
return false;
}
if(!validateEmail(registerEmail)) {
- alert($.i18n.map["emailJsTip"]);
+ zalyjsAlert($.i18n.map["emailJsTip"]);
return false;
}
return true;
@@ -272,35 +292,81 @@ function isLoginName(loginName)
return reg.test(loginName);
}
+function loginNameExist()
+{
+ zalyjsAlert("用户名已经在站点被注册");
+}
+
+function loginNameNotExist()
+{
+ if(sitePubkPem.length<1) {
+ zalyjsAlert("站点公钥获取失败");
+ return false;
+ }
+
+ var action = "api.passport.passwordReg";
+ var reqData = {
+ loginName:registerLoginName,
+ password:registerPassword,
+ email:registerEmail,
+ nickname:registernNickname,
+ sitePubkPem:sitePubkPem,
+ invitationCode:invitationCode,
+ }
+ handleClientSendRequest(action, reqData, handlePassportPasswordReg);
+}
$(document).on("click", ".register_button", function () {
+ invitationCode = $(".register_input_code").val();
var flag = checkRegisterInfo();
if(flag == false) {
return false;
}
-
- invitationCode = $(".register_input_code").val();
var jsUrl = "./index.php?action=page.js&loginName="+registerLoginName+"&success_callback=loginNameExist&fail_callback=loginNameNotExist";
addJsByDynamic(jsUrl);
});
+$(document).on("click", ".update_code_btn", function () {
+ invitationCode = $(".update_input_code").val();
+ var action = "api.passport.passwordUpdateInvitationCode";
+ var reqData = {
+ sitePubkPem:sitePubkPem,
+ invitationCode:invitationCode,
+ preSessionId:preSessionId,
+ }
+ handleClientSendRequest(action, reqData, handlePassportPasswordUpdateInvationCode);
+});
+
+function handlePassportPasswordUpdateInvationCode(results)
+{
+ isRegister = true;
+ preSessionId = results.preSessionId;
+ if(refererUrl != undefined && refererUrl.length>1) {
+ handleRedirect();
+ } else {
+ console.log("call js " + clientType + " zalyJsLoginSuccess" + " == presessionid=="+preSessionId);
+ zalyjsLoginSuccess(loginName, preSessionId, isRegister, loginFailed);
+ }
+}
function handlePassportPasswordReg(results)
{
- var preSessionId = results.preSessionId;
+ isRegister = true;
+ preSessionId = results.preSessionId;
if(refererUrl != undefined && refererUrl.length>1) {
- handleRedirect(preSessionId, 1);
+ handleRedirect();
} else {
- zalyjsLoginSuccess(registerLoginName, preSessionId, true, loginFailed, "loginFailed");
+ zalyjsLoginSuccess(registerLoginName, preSessionId, isRegister, loginFailed);
}
}
function validateEmail(email)
{
- var re = /\S+@\S+\.\S+/;
+ var re = /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/;
return re.test(email);
}
+
$(document).on("click", ".login_button", function () {
loginName = $(".login_input_loginName").val();
@@ -308,13 +374,15 @@ $(document).on("click", ".login_button", function () {
var isFocus = false;
if(loginName == "" || loginName == undefined || loginName.length<0) {
$(".login_input_loginName").focus();
- $(".login_input_loginName").addClass("outline");
+ $(".login_input_loginName_failed")[0].style.display = "block";
isFocus = true;
}
+
if(loginPassword == "" || loginPassword == undefined || loginPassword.length<0) {
- $(".login_input_pwd").addClass("outline");
+ $(".login_input_pwd_failed")[0].style.display = "block";
if (isFocus == false) {
$(".login_input_pwd").focus();
+ $(".login_input_loginName_failed")[0].style.display = "none";
isFocus = true;
}
}
@@ -322,8 +390,10 @@ $(document).on("click", ".login_button", function () {
if(isFocus == true ) {
return false;
}
+ $(".login_input_pwd_failed")[0].style.display = "none";
+
if(sitePubkPem.length<1) {
- alert("站点公钥获取失败");
+ zalyjsAlert("站点公钥获取失败");
return false;
}
var action = "api.passport.passwordLogin";
@@ -337,21 +407,35 @@ $(document).on("click", ".login_button", function () {
function handleApiPassportPasswordLogin(results)
{
- var preSessionId = results.preSessionId;
+ isRegister = false;
+ preSessionId = results.preSessionId;
if(refererUrl != undefined && refererUrl.length>1) {
- handleRedirect(preSessionId, 0);
+ var jsUrl = "./index.php?action=page.js&loginName="+loginName+"&success_callback=loginSuccess&fail_callback=loginFailNeedRegister";
+ addJsByDynamic(jsUrl);
} else {
- zalyjsLoginSuccess(loginName, preSessionId, false, loginFailed, "loginFailed");
+ zalyjsLoginSuccess(loginName, preSessionId, isRegister, loginFailNeedRegister);
}
}
-function loginFailed(results)
+function loginFailNeedRegister()
{
- console.log(results);
+ if(enableInvitationCode != "1") {
+ if(isRegister == true) {
+ console.log("isRegister is always true isregister ==" + isRegister);
+ return false;
+ }
+ isRegister = true;
+ if(refererUrl != undefined && refererUrl.length>1) {
+ handleRedirect();
+ } else {
+ zalyjsLoginSuccess(loginName, preSessionId, isRegister, loginFailed);
+ }
+ } else {
+ $(".zaly_login_by_pwd")[0].style.display = "none";
+ $(".zaly_site_update-invitecode")[0].style.display = "block";
+ }
}
-
-
function getVerifyCode()
{
if(isSending == true) {
@@ -360,7 +444,7 @@ function getVerifyCode()
var loginName = $(".forget_input_loginName").val();
if(loginName.length < 1) {
////TODO 换成 页面漂浮报错
- alert($.i18n.map["loginNameNotNullJsTip"]);
+ zalyjsAlert($.i18n.map["loginNameNotNullJsTip"]);
return false;
}
@@ -409,7 +493,7 @@ $(document).on("click", ".reset_pwd_button", function () {
var loginName = $(".forget_input_loginName").val();
if(repassword != password) {
- alert($.i18n.map["passwordIsNotSameJsTip"]);
+ zalyjsAlert($.i18n.map["passwordIsNotSameJsTip"]);
return;
}
if(loginName == "" || loginName == undefined || loginName.length<0) {
@@ -443,7 +527,8 @@ function handleResetPwd()
function returnLoginPage()
{
- window.location.reload();
+ $(".zaly_site_register-repwd")[0].style.display = "none";
+ $(".zaly_login_by_pwd")[0].style.display = "block";
}
function clearLoginName()
diff --git a/src/public/js/zalyjsNative.js b/src/public/js/zalyjsNative.js
index bb343785..66d8d4f4 100644
--- a/src/public/js/zalyjsNative.js
+++ b/src/public/js/zalyjsNative.js
@@ -151,3 +151,5 @@ function zalyjsAlert(str)
alert(str);
}
}
+
+
diff --git a/src/views/login/loginSite.php b/src/views/login/loginSite.php
index 70add394..0cd31f94 100755
--- a/src/views/login/loginSite.php
+++ b/src/views/login/loginSite.php
@@ -8,8 +8,7 @@
-
-
+
@@ -22,19 +21,22 @@
Login
-