diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000..293725f7b8 Binary files /dev/null and b/.DS_Store differ diff --git a/.gitignore b/.gitignore index f7d6b44db2..bf38afe29f 100644 --- a/.gitignore +++ b/.gitignore @@ -144,3 +144,4 @@ node_modules actor-sdk/sdk-api/api-language/solutions/im.actor.api/source_gen actor-sdk/sdk-api/api-language/solutions/im.actor.api/source_gen.caches actor-sdk/sdk-api/api-language/solutions/im.actor.api/classes_gen +.DS_Store diff --git a/actor-sdk/.DS_Store b/actor-sdk/.DS_Store new file mode 100644 index 0000000000..1daca14518 Binary files /dev/null and b/actor-sdk/.DS_Store differ diff --git a/actor-sdk/sdk-api/actor-extension.json b/actor-sdk/sdk-api/actor-extension.json index 31f2c8782f..2c50475b07 100644 --- a/actor-sdk/sdk-api/actor-extension.json +++ b/actor-sdk/sdk-api/actor-extension.json @@ -1,7 +1,9 @@ { "version": "0.1", - "scala-package": "im.actor.extension.api", - "java-package": "im.actor.extension.api", - "aliases": [], - "sections": [] -} + "scala-package": "im.actor.api.xloto.rpc", + "java-package": "im.actor.core.xloto.api", + "aliases": [ + + ], + "sections": [ +]} \ No newline at end of file diff --git a/actor-sdk/sdk-api/actor.json b/actor-sdk/sdk-api/actor.json index b27bd3cb55..5cb24ac55d 100644 --- a/actor-sdk/sdk-api/actor.json +++ b/actor-sdk/sdk-api/actor.json @@ -77,10 +77,9 @@ "name": "PASSWORD", "id": 2 } - ] - } - }, - { + ] + } + }, { "type": "enum", "content": { "name": "EmailActivationType", @@ -97,20521 +96,3862 @@ "name": "PASSWORD", "id": 3 } - ] - } - }, - { - "type": "rpc", + ] + } + },{"type":"rpc","content":{ +"name":"StartPhoneAuth", +"header":191, +"response":{"type":"anonymous","header":193, "doc":[ +"Phone Activation response",{"type":"reference","argument":"transactionHash","category":"danger","description":" Hash of transaction"},{"type":"reference","argument":"isRegistered","category":"full","description":" Is User registered"}] ,"attributes":[{"type":"string","id":1,"name":"transactionHash"} +,{"type":"bool","id":2,"name":"isRegistered"} +,{"type":{"type":"opt","childType":{"type":"enum","childType":"PhoneActivationType"}},"id":3,"name":"activationType"} +]}, +"doc":[ +"Start Phone Activation",{"type":"reference","argument":"phoneNumber","category":"full","description":"Phone number"},{"type":"reference","argument":"appId","category":"hidden","description":"Appication Id"},{"type":"reference","argument":"apiKey","category":"hidden","description":"Application API key"},{"type":"reference","argument":"deviceHash","category":"full","description":"Hash of device unique id and app bundle id. Used for autologout users when app is reinstalled"},{"type":"reference","argument":"deviceTitle","category":"full","description":"Device Title"},{"type":"reference","argument":"timeZone","category":"full","description":"TimeZone of device"},{"type":"reference","argument":"preferredLanguages","category":"full","description":"Preferred languages of device"}],"attributes":[ +{"type":"int64","id":1,"name":"phoneNumber"} +,{"type":"int32","id":2,"name":"appId"} +,{"type":"string","id":3,"name":"apiKey"} +,{"type":"bytes","id":4,"name":"deviceHash"} +,{"type":"string","id":5,"name":"deviceTitle"} +,{"type":{"type":"opt","childType":"string"},"id":6,"name":"timeZone"} +,{"type":{"type":"list","childType":"string"},"id":7,"name":"preferredLanguages"} +]}},{"type":"rpc","content":{ +"name":"SendCodeByPhoneCall", +"header":197, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Dial phone and dictate auth code",{"type":"reference","argument":"transactionHash","category":"danger","description":"Transaction hash"}],"attributes":[ +{"type":"string","id":1,"name":"transactionHash"} +]}},{"type":"rpc","content":{ +"name":"StartEmailAuth", +"header":185, +"response":{"type":"anonymous","header":186, "doc":[ +"Email Activation response",{"type":"reference","argument":"transactionHash","category":"danger","description":" Hash of activation transaction"},{"type":"reference","argument":"isRegistered","category":"full","description":" true if user is registered"},{"type":"reference","argument":"activationType","category":"full","description":" Email Activation type"}] ,"attributes":[{"type":"string","id":1,"name":"transactionHash"} +,{"type":"bool","id":2,"name":"isRegistered"} +,{"type":{"type":"enum","childType":"EmailActivationType"},"id":3,"name":"activationType"} +]}, +"doc":[ +"Start EMail Activation",{"type":"reference","argument":"email","category":"full","description":"Email"},{"type":"reference","argument":"appId","category":"hidden","description":"Application Id"},{"type":"reference","argument":"apiKey","category":"hidden","description":"Application API key"},{"type":"reference","argument":"deviceHash","category":"full","description":"Hash of device unique id and app bundle id. Used for autologout users when app is reinstalled"},{"type":"reference","argument":"deviceTitle","category":"full","description":"Device Title"},{"type":"reference","argument":"timeZone","category":"full","description":"TimeZone of device"},{"type":"reference","argument":"preferredLanguages","category":"full","description":"Preferred languages"}],"attributes":[ +{"type":"string","id":1,"name":"email"} +,{"type":"int32","id":2,"name":"appId"} +,{"type":"string","id":3,"name":"apiKey"} +,{"type":"bytes","id":4,"name":"deviceHash"} +,{"type":"string","id":5,"name":"deviceTitle"} +,{"type":{"type":"opt","childType":"string"},"id":6,"name":"timeZone"} +,{"type":{"type":"list","childType":"string"},"id":7,"name":"preferredLanguages"} +]}},{"type":"rpc","content":{ +"name":"StartAnonymousAuth", +"header":198, +"response":{"type":"reference","name":"Auth"}, +"doc":[ +"Starting Anonymous login",{"type":"reference","argument":"name","category":"full","description":"Name of new user"},{"type":"reference","argument":"appId","category":"hidden","description":"Application Id"},{"type":"reference","argument":"apiKey","category":"hidden","description":"Application API key"},{"type":"reference","argument":"deviceHash","category":"full","description":"Hash of device unique id and app bundle id. Used for autologout users when app is reinstalled"},{"type":"reference","argument":"deviceTitle","category":"full","description":"Device Title"},{"type":"reference","argument":"timeZone","category":"full","description":"TimeZone of device"},{"type":"reference","argument":"preferredLanguages","category":"full","description":"Preferred languages"}],"attributes":[ +{"type":"string","id":1,"name":"name"} +,{"type":"int32","id":2,"name":"appId"} +,{"type":"string","id":3,"name":"apiKey"} +,{"type":"bytes","id":4,"name":"deviceHash"} +,{"type":"string","id":5,"name":"deviceTitle"} +,{"type":{"type":"opt","childType":"string"},"id":6,"name":"timeZone"} +,{"type":{"type":"list","childType":"string"},"id":7,"name":"preferredLanguages"} +]}},{"type":"rpc","content":{ +"name":"StartTokenAuth", +"header":203, +"response":{"type":"reference","name":"Auth"}, +"doc":[ +"Starting token-based login",{"type":"reference","argument":"token","category":"full","description":"Token for authentication"},{"type":"reference","argument":"appId","category":"hidden","description":"Application Id"},{"type":"reference","argument":"apiKey","category":"hidden","description":"Application API key"},{"type":"reference","argument":"deviceHash","category":"full","description":"Hash of device unique id and app bundle id. Used for autologout users when app is reinstalled"},{"type":"reference","argument":"deviceTitle","category":"full","description":"Device Title"},{"type":"reference","argument":"timeZone","category":"full","description":"TimeZone of device"},{"type":"reference","argument":"preferredLanguages","category":"full","description":"Preferred languages"}],"attributes":[ +{"type":"string","id":1,"name":"token"} +,{"type":"int32","id":2,"name":"appId"} +,{"type":"string","id":3,"name":"apiKey"} +,{"type":"bytes","id":4,"name":"deviceHash"} +,{"type":"string","id":5,"name":"deviceTitle"} +,{"type":{"type":"opt","childType":"string"},"id":6,"name":"timeZone"} +,{"type":{"type":"list","childType":"string"},"id":7,"name":"preferredLanguages"} +]}},{"type":"rpc","content":{ +"name":"StartUsernameAuth", +"header":2571, +"response":{"type":"anonymous","header":2572, "doc":[ +"Result of login auth start. If is not registered move to signup.",{"type":"reference","argument":"transactionHash","category":"danger","description":" Authentication transaction hash"},{"type":"reference","argument":"isRegistered","category":"full","description":" If user is registered with this username"}] ,"attributes":[{"type":"string","id":1,"name":"transactionHash"} +,{"type":"bool","id":2,"name":"isRegistered"} +]}, +"doc":[ +"Starting Login Authentication",{"type":"reference","argument":"username","category":"full","description":"Username for signing in"},{"type":"reference","argument":"appId","category":"hidden","description":"Application id"},{"type":"reference","argument":"apiKey","category":"hidden","description":"Application API key"},{"type":"reference","argument":"deviceHash","category":"full","description":"Hash of device unique id and app bundle id. Used for autologout users when app is reinstalled"},{"type":"reference","argument":"deviceTitle","category":"full","description":"Device Title"},{"type":"reference","argument":"timeZone","category":"full","description":"Time Zone of device"},{"type":"reference","argument":"preferredLanguages","category":"full","description":"Preferred languages of device"}],"attributes":[ +{"type":"string","id":1,"name":"username"} +,{"type":"int32","id":2,"name":"appId"} +,{"type":"string","id":3,"name":"apiKey"} +,{"type":"bytes","id":4,"name":"deviceHash"} +,{"type":"string","id":5,"name":"deviceTitle"} +,{"type":{"type":"opt","childType":"string"},"id":6,"name":"timeZone"} +,{"type":{"type":"list","childType":"string"},"id":7,"name":"preferredLanguages"} +]}},{"type":"rpc","content":{ +"name":"ValidateCode", +"header":189, +"response":{"type":"reference","name":"Auth"}, +"doc":[ +"Performing user sign in.",{"type":"reference","argument":"transactionHash","category":"danger","description":"Hash of transaction"},{"type":"reference","argument":"code","category":"hidden","description":"Activation code"}],"attributes":[ +{"type":"string","id":1,"name":"transactionHash"} +,{"type":"string","id":2,"name":"code"} +]}},{"type":"rpc","content":{ +"name":"ValidatePassword", +"header":207, +"response":{"type":"reference","name":"Auth"}, +"doc":[ +"Validation of account password",{"type":"reference","argument":"transactionHash","category":"full","description":"Hash of transaction"},{"type":"reference","argument":"password","category":"full","description":"Password for account"}],"attributes":[ +{"type":"string","id":1,"name":"transactionHash"} +,{"type":"string","id":2,"name":"password"} +]}},{"type":"rpc","content":{ +"name":"GetOAuth2Params", +"header":194, +"response":{"type":"anonymous","header":195, "doc":[ +{"type":"reference","argument":"authUrl","category":"hidden","description":" Authentication url"}] ,"attributes":[{"type":"string","id":1,"name":"authUrl"} +]}, +"doc":[ +"Loading OAuth2 Parameters",{"type":"reference","argument":"transactionHash","category":"danger","description":"Hash of transaction"},{"type":"reference","argument":"redirectUrl","category":"full","description":"Redirect URL for Application"}],"attributes":[ +{"type":"string","id":1,"name":"transactionHash"} +,{"type":"string","id":2,"name":"redirectUrl"} +]}},{"type":"rpc","content":{ +"name":"CompleteOAuth2", +"header":196, +"response":{"type":"reference","name":"Auth"}, +"doc":[ +"Complete OAuth2 Authentication",{"type":"reference","argument":"transactionHash","category":"danger","description":"Hash of transaction"},{"type":"reference","argument":"code","category":"danger","description":"Authentication Code"}],"attributes":[ +{"type":"string","id":1,"name":"transactionHash"} +,{"type":"string","id":2,"name":"code"} +]}},{"type":"rpc","content":{ +"name":"SignUp", +"header":190, +"response":{"type":"reference","name":"Auth"}, +"doc":[ +"Perform user SignUp",{"type":"reference","argument":"transactionHash","category":"danger","description":"Hash of transaction"},{"type":"reference","argument":"name","category":"full","description":"User name"},{"type":"reference","argument":"sex","category":"full","description":"Optional user sex"},{"type":"reference","argument":"password","category":"full","description":"Password for password-based accounts"}],"attributes":[ +{"type":"string","id":1,"name":"transactionHash"} +,{"type":"string","id":2,"name":"name"} +,{"type":{"type":"opt","childType":{"type":"enum","childType":"Sex"}},"id":3,"name":"sex"} +,{"type":{"type":"opt","childType":"string"},"id":4,"name":"password"} +]}},{"type":"response","content":{ +"name":"Auth", +"header":5, +"doc":[ +"Authentication result",{"type":"reference","argument":"user","category":"compact","description":" The authenticated User"},{"type":"reference","argument":"config","category":"full","description":" Current config of server"}],"attributes":[ +{"type":{"type":"struct","childType":"User"},"id":2,"name":"user"} +,{"type":{"type":"struct","childType":"Config"},"id":3,"name":"config"} +]}}, { + "type":"struct", + "content": { + "name":"AuthSession", +"doc":[ +"Authentication session",{"type":"reference","argument":"id","category":"full","description":" Unuque ID of session"},{"type":"reference","argument":"authHolder","category":"full","description":" holder of session. 0 - this device, 1 - other."},{"type":"reference","argument":"appId","category":"full","description":" Application Id (user in SignIn/SignUp)"},{"type":"reference","argument":"appTitle","category":"full","description":" Title of application"},{"type":"reference","argument":"deviceTitle","category":"full","description":" Title of device"},{"type":"reference","argument":"authTime","category":"full","description":" Time of session creating"},{"type":"reference","argument":"authLocation","category":"hidden","description":" two-letter country code of session create"},{"type":"reference","argument":"latitude","category":"hidden","description":" optional latitude of auth if available"},{"type":"reference","argument":"longitude","category":"hidden","description":" optional longitude of auth if available"}],"attributes":[ +{"type":"int32","id":1,"name":"id"} +,{"type":{"type":"enum","childType":"AuthHolder"},"id":2,"name":"authHolder"} +,{"type":"int32","id":3,"name":"appId"} +,{"type":"string","id":4,"name":"appTitle"} +,{"type":"string","id":5,"name":"deviceTitle"} +,{"type":"int32","id":6,"name":"authTime"} +,{"type":"string","id":7,"name":"authLocation"} +,{"type":{"type":"opt","childType":"double"},"id":8,"name":"latitude"} +,{"type":{"type":"opt","childType":"double"},"id":9,"name":"longitude"} +]}}, { + "type": "enum", "content": { - "name": "StartPhoneAuth", - "header": 191, - "response": { - "type": "anonymous", - "header": 193, - "doc": [ - "Phone Activation response", - { - "type": "reference", - "argument": "transactionHash", - "category": "danger", - "description": " Hash of transaction" - }, - { - "type": "reference", - "argument": "isRegistered", - "category": "full", - "description": " Is User registered" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "transactionHash" - }, - { - "type": "bool", - "id": 2, - "name": "isRegistered" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "enum", - "childType": "PhoneActivationType" - } - }, - "id": 3, - "name": "activationType" - } - ] - }, - "doc": [ - "Start Phone Activation", - { - "type": "reference", - "argument": "phoneNumber", - "category": "full", - "description": "Phone number" - }, - { - "type": "reference", - "argument": "appId", - "category": "hidden", - "description": "Appication Id" - }, + "name": "AuthHolder", + "values": [ { - "type": "reference", - "argument": "apiKey", - "category": "hidden", - "description": "Application API key" + "name": "ThisDevice", + "id": 1 }, { - "type": "reference", - "argument": "deviceHash", - "category": "full", - "description": "Hash of device unique id and app bundle id. Used for autologout users when app is reinstalled" - }, + "name": "OtherDevice", + "id": 2 + } + ] + } + },{"type":"rpc","content":{ +"name":"GetAuthSessions", +"header":80, +"response":{"type":"anonymous","header":81, "doc":[ +"Current Auth sessions",{"type":"reference","argument":"userAuths","category":"compact","description":" User authentications"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"AuthSession"}},"id":1,"name":"userAuths"} +]}, +"doc":[ +"Getting of all active user's authentication sessions"],"attributes":[ +]}},{"type":"rpc","content":{ +"name":"TerminateSession", +"header":82, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"SignOut on specified user's session",{"type":"reference","argument":"id","category":"full","description":"id from AuthItem"}],"attributes":[ +{"type":"int32","id":1,"name":"id"} +]}},{"type":"rpc","content":{ +"name":"TerminateAllSessions", +"header":83, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"SignOut on all exept current sessions"],"attributes":[ +]}},{"type":"rpc","content":{ +"name":"SignOut", +"header":84, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"SignOut current session"],"attributes":[ +]}},{"type":"comment","content":"OBSOLETE METHODS"},{"type":"rpc","content":{ +"name":"SignInObsolete", +"header":3, +"response":{"type":"reference","name":"Auth"}, +"doc":[ +"Performing user signin",{"type":"reference","argument":"phoneNumber","category":"danger","description":"Phone number in international format"},{"type":"reference","argument":"smsHash","category":"danger","description":"Code request hash from RequestAuthCode"},{"type":"reference","argument":"smsCode","category":"danger","description":"Confirmation code from SMS"},{"type":"reference","argument":"deviceHash","category":"full","description":"Hash of device unique id and app bundle id. Used for autologout users when app is reinstalled"},{"type":"reference","argument":"deviceTitle","category":"full","description":"Device title like 'Steven's iPhone'"},{"type":"reference","argument":"appId","category":"hidden","description":"Application ID"},{"type":"reference","argument":"appKey","category":"hidden","description":"Application API key"}],"attributes":[ +{"type":"int64","id":1,"name":"phoneNumber"} +,{"type":"string","id":2,"name":"smsHash"} +,{"type":"string","id":3,"name":"smsCode"} +,{"type":"bytes","id":5,"name":"deviceHash"} +,{"type":"string","id":6,"name":"deviceTitle"} +,{"type":"int32","id":7,"name":"appId"} +,{"type":"string","id":8,"name":"appKey"} +]}},{"type":"rpc","content":{ +"name":"SignUpObsolete", +"header":4, +"response":{"type":"reference","name":"Auth"}, +"doc":[ +"Performing user signup. If user perform signup on already registered user it just override previous","profile information",{"type":"reference","argument":"phoneNumber","category":"danger","description":"Phone number in international format"},{"type":"reference","argument":"smsHash","category":"danger","description":"Code request hash from RequestAuthCode"},{"type":"reference","argument":"smsCode","category":"danger","description":"Confirmation code from SMS"},{"type":"reference","argument":"name","category":"full","description":"User name"},{"type":"reference","argument":"deviceHash","category":"full","description":"Hash of device unique id and app bundle id. Used for autologout users when app is reinstalled"},{"type":"reference","argument":"deviceTitle","category":"full","description":"Device title like 'Steven's iPhone'"},{"type":"reference","argument":"appId","category":"hidden","description":"Application ID"},{"type":"reference","argument":"appKey","category":"hidden","description":"pplication API key"}],"attributes":[ +{"type":"int64","id":1,"name":"phoneNumber"} +,{"type":"string","id":2,"name":"smsHash"} +,{"type":"string","id":3,"name":"smsCode"} +,{"type":"string","id":4,"name":"name"} +,{"type":"bytes","id":7,"name":"deviceHash"} +,{"type":"string","id":8,"name":"deviceTitle"} +,{"type":"int32","id":9,"name":"appId"} +,{"type":"string","id":10,"name":"appKey"} +,{"type":"bool","id":11,"name":"isSilent"} +]}},{"type":"rpc","content":{ +"name":"SendAuthCodeObsolete", +"header":1, +"response":{"type":"anonymous","header":2, "doc":[ +"Sms Request response",{"type":"reference","argument":"smsHash","category":"danger","description":" Hash of SMS request"},{"type":"reference","argument":"isRegistered","category":"full","description":" true if user is registered"}] ,"attributes":[{"type":"string","id":1,"name":"smsHash"} +,{"type":"bool","id":2,"name":"isRegistered"} +]}, +"doc":[ +"Sending SMS with activation code",{"type":"reference","argument":"phoneNumber","category":"full","description":"Phone number in international format"},{"type":"reference","argument":"appId","category":"hidden","description":"Application ID"},{"type":"reference","argument":"apiKey","category":"hidden","description":"Application API key"}],"attributes":[ +{"type":"int64","id":1,"name":"phoneNumber"} +,{"type":"int32","id":2,"name":"appId"} +,{"type":"string","id":3,"name":"apiKey"} +]}},{"type":"rpc","content":{ +"name":"SendAuthCallObsolete", +"header":90, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Requesting Phone activation",{"type":"reference","argument":"phoneNumber","category":"full","description":"Phone number in international format"},{"type":"reference","argument":"smsHash","category":"danger","description":"Code request hash from RequestAuthCode"},{"type":"reference","argument":"appId","category":"hidden","description":"Application ID"},{"type":"reference","argument":"apiKey","category":"hidden","description":"Application API key"}],"attributes":[ +{"type":"int64","id":1,"name":"phoneNumber"} +,{"type":"string","id":2,"name":"smsHash"} +,{"type":"int32","id":3,"name":"appId"} +,{"type":"string","id":4,"name":"apiKey"} +]}}]}, { + "title": "Users", + "package": "users", + "doc": [ + "Users are objects that secured by accessHash. You can't load user profile by it's id.", + "You can't send message to user without finding it's object in Updates or by calling", + "method for user search, contacts import or some other methods.", + "", + "Applications need to keep all Users information forever.", + "", + "Each User have optional localName - name of user that was set by current user and can be changed", + "any time by calling EditUserLocalName method." + ], + "items": [ + { + "type": "enum", + "content": { + "name": "Sex", + "values": [ { - "type": "reference", - "argument": "deviceTitle", - "category": "full", - "description": "Device Title" + "name": "Unknown", + "id": 1 }, { - "type": "reference", - "argument": "timeZone", - "category": "full", - "description": "TimeZone of device" + "name": "Male", + "id": 2 }, { - "type": "reference", - "argument": "preferredLanguages", - "category": "full", - "description": "Preferred languages of device" + "name": "Female", + "id": 3 } - ], - "attributes": [ + ] + } + }, { + "type": "enum", + "content": { + "name": "ContactType", + "values": [ { - "type": "int64", - "id": 1, - "name": "phoneNumber" + "name": "Phone", + "id": 1 }, { - "type": "int32", - "id": 2, - "name": "appId" + "name": "Email", + "id": 2 }, { - "type": "string", - "id": 3, - "name": "apiKey" + "name": "Web", + "id": 3 }, { - "type": "bytes", - "id": 4, - "name": "deviceHash" - }, + "name": "Social", + "id": 4 + } + ] + } + }, { + "type":"struct", + "content": { + "name":"ContactRecord", +"doc":[ +"Contact information record",{"type":"reference","argument":"type","category":"full","description":" Record type"},{"type":"reference","argument":"typeSpec","category":"hidden","description":" Value for specification type of contact, for example 'mobile/standalone/office' for phones or 'vk/fb/telegram' for extenrnal networks."},{"type":"reference","argument":"stringValue","category":"full","description":" String value of record"},{"type":"reference","argument":"longValue","category":"full","description":" Long value of record"},{"type":"reference","argument":"title","category":"full","description":" Title of record"},{"type":"reference","argument":"subtitle","category":"hidden","description":" Subtitle of record"}],"expandable":"true","attributes":[ +{"type":{"type":"enum","childType":"ContactType"},"id":1,"name":"type"} +,{"type":{"type":"opt","childType":"string"},"id":6,"name":"typeSpec"} +,{"type":{"type":"opt","childType":"string"},"id":2,"name":"stringValue"} +,{"type":{"type":"opt","childType":"int64"},"id":3,"name":"longValue"} +,{"type":{"type":"opt","childType":"string"},"id":4,"name":"title"} +,{"type":{"type":"opt","childType":"string"},"id":5,"name":"subtitle"} +]}}, { + "type":"struct", + "content": { + "name":"User", +"doc":[ +"Main user object",{"type":"reference","argument":"id","category":"full","description":" uid"},{"type":"reference","argument":"accessHash","category":"danger","description":" user's access hash"},{"type":"reference","argument":"name","category":"full","description":" user's name"},{"type":"reference","argument":"localName","category":"full","description":" user's local name"},{"type":"reference","argument":"nick","category":"full","description":" User's nickname"},{"type":"reference","argument":"sex","category":"full","description":" optional sex of user"},{"type":"reference","argument":"avatar","category":"compact","description":" avatar of user"},{"type":"reference","argument":"isBot","category":"full","description":" Is user actually bot. By default is false."},{"type":"reference","argument":"ext","category":"full","description":" Extension values"},{"type":"reference","argument":"about","category":"full","description":" [DEPRECATED] User's about information"},{"type":"reference","argument":"contactInfo","category":"compact","description":" [DEPRECATED] Contact information of user"},{"type":"reference","argument":"preferredLanguages","category":"full","description":" [DEPRECATED] Preferred user languages"},{"type":"reference","argument":"timeZone","category":"full","description":" [DEPRECATED] Time Zone of user in TZ format"},{"type":"reference","argument":"botCommands","category":"full","description":" [DEPRECATED] Available Bot Commands"}],"expandable":"true","attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"id"} +,{"type":"int64","id":2,"name":"accessHash"} +,{"type":"string","id":3,"name":"name"} +,{"type":{"type":"opt","childType":"string"},"id":4,"name":"localName"} +,{"type":{"type":"opt","childType":"string"},"id":13,"name":"nick"} +,{"type":{"type":"opt","childType":{"type":"enum","childType":"Sex"}},"id":5,"name":"sex"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"Avatar"}},"id":8,"name":"avatar"} +,{"type":{"type":"opt","childType":"bool"},"id":11,"name":"isBot"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"MapValue"}},"id":20,"name":"ext"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"ContactRecord"}},"id":12,"name":"contactInfo", "deprecated":"true"} +,{"type":{"type":"opt","childType":"string"},"id":14,"name":"about", "deprecated":"true"} +,{"type":{"type":"list","childType":"string"},"id":16,"name":"preferredLanguages", "deprecated":"true"} +,{"type":{"type":"opt","childType":"string"},"id":17,"name":"timeZone", "deprecated":"true"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"BotCommand"}},"id":19,"name":"botCommands", "deprecated":"true"} +]}}, { + "type":"struct", + "content": { + "name":"FullUser", +"doc":[ +"Full User representation",{"type":"reference","argument":"id","category":"full","description":" User's Id"},{"type":"reference","argument":"contactInfo","category":"compact","description":" User's contact information"},{"type":"reference","argument":"about","category":"full","description":" User's about information"},{"type":"reference","argument":"preferredLanguages","category":"full","description":" Preferred user languages"},{"type":"reference","argument":"timeZone","category":"full","description":" Time Zone of user in TZ format"},{"type":"reference","argument":"botCommands","category":"full","description":" Available Commands for Bot"},{"type":"reference","argument":"ext","category":"full","description":" Extension values. NOTE: This values are not related to ext field in User object."},{"type":"reference","argument":"isBlocked","category":"full","description":" Is user blocked. Default is false."}],"expandable":"true","attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"id"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"ContactRecord"}},"id":2,"name":"contactInfo"} +,{"type":{"type":"opt","childType":"string"},"id":3,"name":"about"} +,{"type":{"type":"list","childType":"string"},"id":4,"name":"preferredLanguages"} +,{"type":{"type":"opt","childType":"string"},"id":5,"name":"timeZone"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"BotCommand"}},"id":6,"name":"botCommands"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"MapValue"}},"id":7,"name":"ext"} +,{"type":{"type":"opt","childType":"bool"},"id":8,"name":"isBlocked"} +]}}, { + "type":"struct", + "content": { + "name":"BotCommand", +"doc":[ +"Available bot commands",{"type":"reference","argument":"slashCommand","category":"full","description":" Slash command name (wihtout slash)"},{"type":"reference","argument":"description","category":"full","description":" Slash command description"},{"type":"reference","argument":"locKey","category":"full","description":" Optional Localization Key for i18n"}],"attributes":[ +{"type":"string","id":1,"name":"slashCommand"} +,{"type":"string","id":2,"name":"description"} +,{"type":{"type":"opt","childType":"string"},"id":3,"name":"locKey"} +]}},{"type":"rpc","content":{ +"name":"EditUserLocalName", +"header":96, +"response":{"type":"reference","name":"Seq"}, +"doc":[ +"Renaming of user's visible name",{"type":"reference","argument":"uid","category":"full","description":"target User's uid"},{"type":"reference","argument":"accessHash","category":"danger","description":"User's accessHash"},{"type":"reference","argument":"name","category":"full","description":"New user name"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":"int64","id":2,"name":"accessHash"} +,{"type":"string","id":3,"name":"name"} +]}},{"type":"update","content":{ +"name":"UserAvatarChanged", +"header":16, +"doc":[ +"Update about avatar changed",{"type":"reference","argument":"uid","category":"full","description":" user's uid"},{"type":"reference","argument":"avatar","category":"compact","description":" user's new avatar"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"Avatar"}},"id":2,"name":"avatar"} +]}},{"type":"update","content":{ +"name":"UserNameChanged", +"header":32, +"doc":[ +"Update about name changed",{"type":"reference","argument":"uid","category":"full","description":" user's uid"},{"type":"reference","argument":"name","category":"full","description":" user's name"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":"string","id":2,"name":"name"} +]}},{"type":"update","content":{ +"name":"UserLocalNameChanged", +"header":51, +"doc":[ +"Update about local name changed",{"type":"reference","argument":"uid","category":"full","description":" user's uid"},{"type":"reference","argument":"localName","category":"full","description":" new user's local name"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":{"type":"opt","childType":"string"},"id":2,"name":"localName"} +]}},{"type":"update","content":{ +"name":"UserContactsChanged", +"header":134, +"doc":[ +"Update about contact information change",{"type":"reference","argument":"uid","category":"full","description":" user's uid"},{"type":"reference","argument":"contactRecords","category":"compact","description":" new phones list"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"ContactRecord"}},"id":4,"name":"contactRecords"} +]}},{"type":"update","content":{ +"name":"UserNickChanged", +"header":209, +"doc":[ +"Update about nick changed",{"type":"reference","argument":"uid","category":"full","description":" user's uid"},{"type":"reference","argument":"nickname","category":"full","description":" user's new nickname"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":{"type":"opt","childType":"string"},"id":2,"name":"nickname"} +]}},{"type":"update","content":{ +"name":"UserAboutChanged", +"header":210, +"doc":[ +"Update about user's about changed",{"type":"reference","argument":"uid","category":"full","description":" User's uid"},{"type":"reference","argument":"about","category":"full","description":" User's about"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":{"type":"opt","childType":"string"},"id":2,"name":"about"} +]}},{"type":"update","content":{ +"name":"UserPreferredLanguagesChanged", +"header":212, +"doc":[ +"Update about user's preferred languages",{"type":"reference","argument":"uid","category":"full","description":" User's uid"},{"type":"reference","argument":"preferredLanguages","category":"full","description":" User's preferred languages. Can be empty."}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":{"type":"list","childType":"string"},"id":2,"name":"preferredLanguages"} +]}},{"type":"update","content":{ +"name":"UserTimeZoneChanged", +"header":216, +"doc":[ +"User TimeZone changed",{"type":"reference","argument":"uid","category":"full","description":" User's uid"},{"type":"reference","argument":"timeZone","category":"full","description":" User's new time zone in TZ format"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":{"type":"opt","childType":"string"},"id":2,"name":"timeZone"} +]}},{"type":"update","content":{ +"name":"UserBotCommandsChanged", +"header":217, +"doc":[ +"Update about bot commands changed",{"type":"reference","argument":"uid","category":"full","description":" User's Id"},{"type":"reference","argument":"commands","category":"full","description":" New List of commands"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"BotCommand"}},"id":2,"name":"commands"} +]}},{"type":"update","content":{ +"name":"UserExtChanged", +"header":218, +"doc":[ +"Update about user ext changed",{"type":"reference","argument":"uid","category":"full","description":" User's id"},{"type":"reference","argument":"ext","category":"full","description":" New Ext Value in User (NOT FullUser) object."}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"MapValue"}},"id":2,"name":"ext"} +]}},{"type":"update","content":{ +"name":"UserFullExtChanged", +"header":219, +"doc":[ +"Update about user ext changed",{"type":"reference","argument":"uid","category":"full","description":" User's Id"},{"type":"reference","argument":"ext","category":"full","description":" New Ext Value in FullUser (NOT User) object."}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"MapValue"}},"id":3,"name":"ext"} +]}},{"type":"rpc","content":{ +"name":"LoadFullUsers", +"header":2649, +"response":{"type":"anonymous","header":2650, "doc":[ +{"type":"reference","argument":"fullUsers","category":"compact","description":" Loaded users"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"FullUser"}},"id":1,"name":"fullUsers"} +]}, +"doc":[ +"Loading Full User information",{"type":"reference","argument":"userPeers","category":"compact","description":"User's peers to load. Should be non-empy"}],"attributes":[ +{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":1,"name":"userPeers"} +]}}]}, { + "title": "Profile", + "package": "profile", + "items": [ +{"type":"rpc","content":{ +"name":"EditName", +"header":53, +"response":{"type":"reference","name":"Seq"}, +"doc":[ +"Changing account's name",{"type":"reference","argument":"name","category":"full","description":"New name"}],"attributes":[ +{"type":"string","id":1,"name":"name"} +]}},{"type":"rpc","content":{ +"name":"EditNickName", +"header":205, +"response":{"type":"reference","name":"Seq"}, +"doc":[ +"Changing account's nickname",{"type":"reference","argument":"nickname","category":"full","description":"New Nickname"}],"attributes":[ +{"type":{"type":"opt","childType":"string"},"id":1,"name":"nickname"} +]}},{"type":"rpc","content":{ +"name":"CheckNickName", +"header":206, +"response":{"type":"reference","name":"Bool"}, +"doc":[ +"Checking availability of nickname",{"type":"reference","argument":"nickname","category":"full","description":"Nickname for checking"}],"attributes":[ +{"type":"string","id":1,"name":"nickname"} +]}},{"type":"rpc","content":{ +"name":"EditAbout", +"header":212, +"response":{"type":"reference","name":"Seq"}, +"doc":[ +"Changing about information",{"type":"reference","argument":"about","category":"full","description":"new about information"}],"attributes":[ +{"type":{"type":"opt","childType":"string"},"id":1,"name":"about"} +]}},{"type":"rpc","content":{ +"name":"EditAvatar", +"header":31, +"response":{"type":"anonymous","header":103, "doc":[ +"Response for change account avatar",{"type":"reference","argument":"avatar","category":"full","description":" New avatar"},{"type":"reference","argument":"seq","category":"full","description":" Sequence number"},{"type":"reference","argument":"state","category":"compact","description":" Sequence state"}] ,"attributes":[{"type":{"type":"struct","childType":"Avatar"},"id":1,"name":"avatar"} +,{"type":"int32","id":2,"name":"seq"} +,{"type":{"type":"alias","childType":"seq_state"},"id":3,"name":"state"} +]}, +"doc":[ +"Changing account's avatar",{"type":"reference","argument":"fileLocation","category":"compact","description":"File Location of uploaded unencrypted avatar"}],"attributes":[ +{"type":{"type":"struct","childType":"FileLocation"},"id":1,"name":"fileLocation"} +]}},{"type":"rpc","content":{ +"name":"RemoveAvatar", +"header":91, +"response":{"type":"reference","name":"Seq"}, +"doc":[ +"Removing account's avatar"],"attributes":[ +]}},{"type":"rpc","content":{ +"name":"EditMyTimeZone", +"header":144, +"response":{"type":"reference","name":"Seq"}, +"doc":[ +"Updating user's time zone",{"type":"reference","argument":"tz","category":"full","description":"New Time Zone"}],"attributes":[ +{"type":"string","id":1,"name":"tz"} +]}},{"type":"rpc","content":{ +"name":"EditMyPreferredLanguages", +"header":145, +"response":{"type":"reference","name":"Seq"}, +"doc":[ +"Changing preffered languages",{"type":"reference","argument":"preferredLanguages","category":"full","description":"Preffered Languages"}],"attributes":[ +{"type":{"type":"list","childType":"string"},"id":1,"name":"preferredLanguages"} +]}}]}, { + "title": "Contacts", + "package": "contacts", + "doc": [ + "Before working with contact list is is useful to import contacts from phone first by calling", + "method ImportContacts#0x07.", + "", + "All phone numbers MUST be preprocessed before import by some library (like libphonenumber)", + "and build international phone number depending on current users phone and/or locale.", + "", + "For loading contact list from server use GetContacts#0x57.", + "If during this call there are some updates about contact list change", + "it is recommended to call it again. Also applications need to sync contacts on application start.", + "", + "For searching for users without adding to contacts list use method FindContacts#0x70.", + "", + "For adding/deleting contacts AddContact#0x72 and DeleteContact#0x59." + ], + "items": [ + { + "type":"struct", + "content": { + "name":"PhoneToImport", +"doc":[ +"Phone for import",{"type":"reference","argument":"phoneNumber","category":"full","description":" phone number for import in international format"},{"type":"reference","argument":"name","category":"full","description":" optional name for contact"}],"attributes":[ +{"type":"int64","id":1,"name":"phoneNumber"} +,{"type":{"type":"opt","childType":"string"},"id":2,"name":"name"} +]}}, { + "type":"struct", + "content": { + "name":"EmailToImport", +"doc":[ +"Email for import",{"type":"reference","argument":"email","category":"full","description":" email for importing"},{"type":"reference","argument":"name","category":"full","description":" optional name for contact"}],"attributes":[ +{"type":"string","id":1,"name":"email"} +,{"type":{"type":"opt","childType":"string"},"id":2,"name":"name"} +]}},{"type":"rpc","content":{ +"name":"ImportContacts", +"header":7, +"response":{"type":"anonymous","header":8, "doc":[ +"Imported contacts",{"type":"reference","argument":"users","category":"compact","description":" Imported users"},{"type":"reference","argument":"seq","category":"full","description":" Sequence number if users are imported"},{"type":"reference","argument":"state","category":"compact","description":" Sequence state if users are imported"},{"type":"reference","argument":"userPeers","category":"full","description":" Imported user peers"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":1,"name":"users"} +,{"type":"int32","id":2,"name":"seq"} +,{"type":{"type":"alias","childType":"seq_state"},"id":3,"name":"state"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":4,"name":"userPeers"} +]}, +"doc":[ +"Importing phones and emails for building contact list","Maximum amount of items for import per method call equals to 100.",{"type":"reference","argument":"phones","category":"compact","description":"Phones for import"},{"type":"reference","argument":"emails","category":"compact","description":"Emails for import"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled optimizations"}],"attributes":[ +{"type":{"type":"list","childType":{"type":"struct","childType":"PhoneToImport"}},"id":1,"name":"phones"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"EmailToImport"}},"id":2,"name":"emails"} +,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":3,"name":"optimizations"} +]}},{"type":"empty"},{"type":"rpc","content":{ +"name":"GetContacts", +"header":87, +"response":{"type":"anonymous","header":88, "doc":[ +"Current contact list",{"type":"reference","argument":"users","category":"hidden","description":" User list if list is changed"},{"type":"reference","argument":"isNotChanged","category":"full","description":" is list changed"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":1,"name":"users"} +,{"type":"bool","id":2,"name":"isNotChanged"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":3,"name":"userPeers"} +]}, +"doc":[ +"Getting current contact list","SHA256 hash of list of a comma-separated list of contact UIDs in ascending","order may be passed in contactsHash parameter.","If the contact list was not changed, isNotChanged will be true.",{"type":"reference","argument":"contactsHash","category":"full","description":"Hash of saved list in application"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled optimizations"}],"attributes":[ +{"type":"string","id":1,"name":"contactsHash"} +,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":2,"name":"optimizations"} +]}},{"type":"rpc","content":{ +"name":"RemoveContact", +"header":89, +"response":{"type":"reference","name":"Seq"}, +"doc":[ +"Removing contact from contact list",{"type":"reference","argument":"uid","category":"full","description":"Contact's UID"},{"type":"reference","argument":"accessHash","category":"danger","description":"Contact's AccessHash"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":"int64","id":2,"name":"accessHash"} +]}},{"type":"rpc","content":{ +"name":"AddContact", +"header":114, +"response":{"type":"reference","name":"Seq"}, +"doc":[ +"Adding contact to contact list",{"type":"reference","argument":"uid","category":"full","description":"Contact's UID"},{"type":"reference","argument":"accessHash","category":"danger","description":"Contact's AccessHash"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":"int64","id":2,"name":"accessHash"} +]}},{"type":"rpc","content":{ +"name":"SearchContacts", +"header":112, +"response":{"type":"anonymous","header":113, "doc":[ +"Founded users",{"type":"reference","argument":"users","category":"compact","description":" Founded users"},{"type":"reference","argument":"userPeers","category":"compact","description":" Founded users peers"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":1,"name":"users"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":2,"name":"userPeers"} +]}, +"doc":[ +"Searching contacts by user's query",{"type":"reference","argument":"request","category":"full","description":"Search query"}],"attributes":[ +{"type":"string","id":1,"name":"request"} +,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":2,"name":"optimizations"} +]}},{"type":"empty"},{"type":"update","content":{ +"name":"ContactRegistered", +"header":5, +"doc":[ +"Update about contact registration",{"type":"reference","argument":"uid","category":"full","description":" contact's uid"},{"type":"reference","argument":"isSilent","category":"full","description":" is registration silent. If this value is true then don't show notification about registration"},{"type":"reference","argument":"date","category":"full","description":" date of registration"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":"bool","id":2,"name":"isSilent"} +,{"type":{"type":"alias","childType":"date"},"id":3,"name":"date"} +,{"type":{"type":"alias","childType":"randomId"},"id":4,"name":"rid"} +]}},{"type":"update","content":{ +"name":"ContactsAdded", +"header":40, +"doc":[ +"Update about contacts added",{"type":"reference","argument":"uids","category":"compact","description":" added contacts"}],"attributes":[ +{"type":{"type":"list","childType":{"type":"alias","childType":"userId"}},"id":1,"name":"uids"} +]}},{"type":"update","content":{ +"name":"ContactsRemoved", +"header":41, +"doc":[ +"Update about contacts removed",{"type":"reference","argument":"uids","category":"compact","description":" removed contacts"}],"attributes":[ +{"type":{"type":"list","childType":{"type":"alias","childType":"userId"}},"id":1,"name":"uids"} +]}}]}, { + "title": "Privacy", + "package": "privacy", + "items": [ +{"type":"rpc","content":{ +"name":"BlockUser", +"header":2636, +"response":{"type":"reference","name":"Seq"}, +"doc":[ +"Block User",{"type":"reference","argument":"peer","category":"full","description":"Peer for blocking"}],"attributes":[ +{"type":{"type":"struct","childType":"UserOutPeer"},"id":1,"name":"peer"} +]}},{"type":"rpc","content":{ +"name":"UnblockUser", +"header":2637, +"response":{"type":"reference","name":"Seq"}, +"doc":[ +"Unblock User",{"type":"reference","argument":"peer","category":"full","description":"Peer for unblocking"}],"attributes":[ +{"type":{"type":"struct","childType":"UserOutPeer"},"id":1,"name":"peer"} +]}},{"type":"rpc","content":{ +"name":"LoadBlockedUsers", +"header":2638, +"response":{"type":"anonymous","header":2639, "doc":[ +{"type":"reference","argument":"userPeers","category":"full","description":" Blocked user peers"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":1,"name":"userPeers"} +]}, +"doc":[ +"Load Blocked Users"],"attributes":[ +]}},{"type":"update","content":{ +"name":"UserBlocked", +"header":2629, +"doc":[ +"Update about User Blocked",{"type":"reference","argument":"uid","category":"full","description":" User Id"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +]}},{"type":"update","content":{ +"name":"UserUnblocked", +"header":2630, +"doc":[ +"Update about User Unblocked",{"type":"reference","argument":"uid","category":"full","description":" User Id"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +]}}]}, { + "title": "Messaging", + "package": "messaging", + "doc": [ + "Actor can work with encrypted and plain messages in one conversation. For both types of messages API", + "contains a bit different methods. Also encrypted and plain messages have different schemes.", + "

Messages

", + "Message entity contains:", + "", + "

Message content

", + "Message can be one of three basic types of messages: Text Message, File Message and Service message.", + "All messages can contain extensions. For example we can send text message and add markdown extension with", + "formatted text in markdown and clients that support this extension will show markdown, and that clients that", + "not supported extension then show simple text. File messages can have photo, video or voice extensions.", + "Service message can have extensions extensions such as \"user added\", \"group created\", \"avatar changed\", etc.", + "

Send messages

", + "Sending messages looks same for encrypted and plain messages. Client MUST prepare all required data", + "before sending message (for example FastThumb for photo/video/documents) and call required methods.", + "Encrypted messages differs here only by a little different scheme and encryption.", + "

WRONG_KEYS and incorrect keys

", + "For sending encrypted messages client MUST send messages encrypted for all own and receivers keys.", + "If client send encryption with missing, old or incorrect keys it will receive WRONG_KEYS.", + "In WRONG_KEYS you need to deserialize relatedData from RpcError to WrongKeysErrorData", + "and get detailed information about keys. Sometimes there are some broken keys on server and client can't", + "encrypt messages with it than client MUST send empty encrypted key in request elsewhere API return WRONG_KEYS.", + "

Encrypted messages and New Devices

", + "When you send message to someone and when he registered with new device there are no way to receive old encrypted", + "messages on new device and because of this there are a problem about read/delivery statuses.", + "Alice send messages to Bob, but Bob lose his device and buy new iPhone and installed Actor.", + "Alice receive notification about new device and send another message. Bob open chat with Alice and", + "send read status with maximum message read date. Alice will mark all sent messages as read and one that", + "was not delivered. We can use status notifications per message, but in VERY heavy conversations it will be", + "a lot of unnecessary traffic. For resolving this small issue we have different ways of message statuses", + "for encrypted and plain messages. Also it is recomended to mark all undelivered messages on new device update as", + "not devered with warring sign.", + "

Message Read and Delivery

", + "There are two different ways for read and delivery statuses for encrypted and plain messages.", + "For encrypted messages used status change by RandomId and for plain messages used by maximum", + "date of read/delivered message." + ], + "items": [ + { + "type":"struct", + "content": { + "name":"MessageAttributes", +"doc":[ +"Message Attributes",{"type":"reference","argument":"isMentioned","category":"full","description":" Is mentioned. If set overrides built-in value."},{"type":"reference","argument":"isHighlighted","category":"full","description":" Is message highlighted. Default is false."},{"type":"reference","argument":"isNotified","category":"full","description":" Is notified. If set overrides built-in settings."},{"type":"reference","argument":"isOnlyForYou","category":"full","description":" If this message is only for you. Default is false"}],"attributes":[ +{"type":{"type":"opt","childType":"bool"},"id":1,"name":"isMentioned"} +,{"type":{"type":"opt","childType":"bool"},"id":2,"name":"isHighlighted"} +,{"type":{"type":"opt","childType":"bool"},"id":3,"name":"isNotified"} +,{"type":{"type":"opt","childType":"bool"},"id":4,"name":"isOnlyForYou"} +]}}, { + "type":"struct", + "content": { + "name":"QuotedMessage", +"doc":[ +"Quoted Message",{"type":"reference","argument":"messageId","category":"full","description":" Message Id if present"},{"type":"reference","argument":"publicGroupId","category":"full","description":" Public Group id if present"},{"type":"reference","argument":"senderUserId","category":"full","description":" Sender of message"},{"type":"reference","argument":"messageDate","category":"full","description":" Date of message"},{"type":"reference","argument":"quotedMessageContent","category":"full","description":" Optional Quoted Message Content. Can be empty if messageId is present and message is in current peer."}],"attributes":[ +{"type":{"type":"opt","childType":{"type":"alias","childType":"randomId"}},"id":1,"name":"messageId"} +,{"type":{"type":"opt","childType":{"type":"alias","childType":"groupId"}},"id":2,"name":"publicGroupId"} +,{"type":{"type":"alias","childType":"userId"},"id":3,"name":"senderUserId"} +,{"type":{"type":"alias","childType":"date"},"id":4,"name":"messageDate"} +,{"type":{"type":"opt","childType":{"type":"trait","childType":"Message"}},"id":5,"name":"quotedMessageContent"} +]}},{"type":"trait","content":{ +"isContainer":"true","name":"Message","attributes":[ +]}}, { + "type":"struct", + "content": { + "name":"TextMessage", +"doc":[ +"Text message",{"type":"reference","argument":"text","category":"danger","description":" the text"},{"type":"reference","argument":"mentions","category":"full","description":" User mentions in message"},{"type":"reference","argument":"ext","category":"full","description":" Optional bytes of extension"}],"trait":{"name":"Message","key":1},"expandable":"true","attributes":[ +{"type":"string","id":1,"name":"text"} +,{"type":{"type":"list","childType":{"type":"alias","childType":"userId"}},"id":2,"name":"mentions"} +,{"type":{"type":"opt","childType":{"type":"trait","childType":"TextMessageEx"}},"id":3,"name":"ext"} +]}},{"type":"trait","content":{ +"isContainer":"true","name":"TextMessageEx","attributes":[ +]}}, { + "type":"struct", + "content": { + "name":"TextExMarkdown", +"doc":[ +"Markdown extension",{"type":"reference","argument":"markdown","category":"full","description":" Markdown text"}],"trait":{"name":"TextMessageEx","key":1},"expandable":"true","attributes":[ +{"type":"string","id":2,"name":"markdown"} +]}}, { + "type":"struct", + "content": { + "name":"TextModernMessage", +"doc":[ +"Modern text message",{"type":"reference","argument":"text","category":"full","description":" optional text of message"},{"type":"reference","argument":"senderNameOverride","category":"full","description":" optional overriding of sender"},{"type":"reference","argument":"senderPhotoOverride","category":"full","description":" optional overriding sender's photo"},{"type":"reference","argument":"style","category":"full","description":" optional paragraph style"},{"type":"reference","argument":"attaches","category":"full","description":" optional Attaches of message"}],"trait":{"name":"TextMessageEx","key":2},"expandable":"true","attributes":[ +{"type":{"type":"opt","childType":"string"},"id":1,"name":"text"} +,{"type":{"type":"opt","childType":"string"},"id":2,"name":"senderNameOverride"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"Avatar"}},"id":3,"name":"senderPhotoOverride"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"ParagraphStyle"}},"id":4,"name":"style"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"TextModernAttach"}},"id":5,"name":"attaches"} +]}}, { + "type":"struct", + "content": { + "name":"ParagraphStyle", +"doc":[ +"Paragraph style",{"type":"reference","argument":"showParagraph","category":"full","description":" Show quote-like paragraph?"},{"type":"reference","argument":"paragraphColor","category":"full","description":" Override paragraph color"},{"type":"reference","argument":"bgColor","category":"full","description":" Override background color"}],"attributes":[ +{"type":{"type":"opt","childType":"bool"},"id":1,"name":"showParagraph"} +,{"type":{"type":"opt","childType":{"type":"trait","childType":"Color"}},"id":2,"name":"paragraphColor"} +,{"type":{"type":"opt","childType":{"type":"trait","childType":"Color"}},"id":3,"name":"bgColor"} +]}}, { + "type":"struct", + "content": { + "name":"TextModernAttach", +"doc":[ +"Attaches to message",{"type":"reference","argument":"title","category":"full","description":" Attach of message"},{"type":"reference","argument":"titleUrl","category":"full","description":" Attach title url"},{"type":"reference","argument":"titleIcon","category":"full","description":" Attach title icon"},{"type":"reference","argument":"text","category":"full","description":" Attach text"},{"type":"reference","argument":"style","category":"full","description":" Attach style"}],"expandable":"true","attributes":[ +{"type":{"type":"opt","childType":"string"},"id":1,"name":"title"} +,{"type":{"type":"opt","childType":"string"},"id":2,"name":"titleUrl"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"ImageLocation"}},"id":3,"name":"titleIcon"} +,{"type":{"type":"opt","childType":"string"},"id":4,"name":"text"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"ParagraphStyle"}},"id":5,"name":"style"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"TextModernField"}},"id":6,"name":"fields"} +]}}, { + "type":"struct", + "content": { + "name":"TextModernField", +"doc":[ +"Modern message fields",{"type":"reference","argument":"title","category":"full","description":" Field title"},{"type":"reference","argument":"value","category":"full","description":" Field value"},{"type":"reference","argument":"isShort","category":"full","description":" Is field can be shown in compact way (default is TRUE)"}],"expandable":"true","attributes":[ +{"type":"string","id":1,"name":"title"} +,{"type":"string","id":2,"name":"value"} +,{"type":{"type":"opt","childType":"bool"},"id":3,"name":"isShort"} +]}}, { + "type":"struct", + "content": { + "name":"TextCommand", +"doc":[ +"Text Command Message for bots",{"type":"reference","argument":"command","category":"full","description":" Slash-Command For execution"},{"type":"reference","argument":"args","category":"full","description":" Arguments of slash command"}],"trait":{"name":"TextMessageEx","key":3},"expandable":"true","attributes":[ +{"type":"string","id":1,"name":"command"} +,{"type":"string","id":2,"name":"args"} +]}}, { + "type":"struct", + "content": { + "name":"ServiceMessage", +"doc":[ +"Service message",{"type":"reference","argument":"text","category":"full","description":" service message text"},{"type":"reference","argument":"ext","category":"compact","description":" Extension"}],"trait":{"name":"Message","key":2},"expandable":"true","attributes":[ +{"type":"string","id":1,"name":"text"} +,{"type":{"type":"opt","childType":{"type":"trait","childType":"ServiceEx"}},"id":3,"name":"ext"} +]}},{"type":"trait","content":{ +"isContainer":"true","name":"ServiceEx","attributes":[ +]}}, { + "type":"struct", + "content": { + "name":"ServiceExUserInvited", +"doc":[ +"Service message about adding user to group",{"type":"reference","argument":"invitedUid","category":"full","description":" added user id"}],"trait":{"name":"ServiceEx","key":1},"expandable":"true","attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"invitedUid"} +]}}, { + "type":"struct", + "content": { + "name":"ServiceExUserJoined", +"doc":[ +"Service message about user join to group"],"trait":{"name":"ServiceEx","key":17},"expandable":"true","attributes":[ +]}}, { + "type":"struct", + "content": { + "name":"ServiceExUserKicked", +"doc":[ +"Service message about kicking user from group",{"type":"reference","argument":"kickedUid","category":"full","description":" kicked user id"}],"trait":{"name":"ServiceEx","key":2},"expandable":"true","attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"kickedUid"} +]}}, { + "type":"struct", + "content": { + "name":"ServiceExUserLeft", +"doc":[ +"Service message about user left group"],"trait":{"name":"ServiceEx","key":3},"expandable":"true","attributes":[ +]}}, { + "type":"struct", + "content": { + "name":"ServiceExGroupCreated", +"doc":[ +"Service message about group creating"],"trait":{"name":"ServiceEx","key":4},"expandable":"true","attributes":[ +]}}, { + "type":"struct", + "content": { + "name":"ServiceExChangedTitle", +"doc":[ +"Service message about group title change",{"type":"reference","argument":"title","category":"full","description":" New group title"}],"trait":{"name":"ServiceEx","key":5},"expandable":"true","attributes":[ +{"type":"string","id":1,"name":"title"} +]}}, { + "type":"struct", + "content": { + "name":"ServiceExChangedTopic", +"doc":[ +"Service message on group topic change",{"type":"reference","argument":"topic","category":"full","description":" New group topic"}],"trait":{"name":"ServiceEx","key":18},"expandable":"true","attributes":[ +{"type":{"type":"opt","childType":"string"},"id":1,"name":"topic"} +]}}, { + "type":"struct", + "content": { + "name":"ServiceExChangedAbout", +"doc":[ +"Service message on group about change",{"type":"reference","argument":"about","category":"full","description":" New group about"}],"trait":{"name":"ServiceEx","key":19},"expandable":"true","attributes":[ +{"type":{"type":"opt","childType":"string"},"id":1,"name":"about"} +]}}, { + "type":"struct", + "content": { + "name":"ServiceExChangedAvatar", +"doc":[ +"Service message about avatar change",{"type":"reference","argument":"avatar","category":"compact","description":" Updated avatar"}],"trait":{"name":"ServiceEx","key":6},"expandable":"true","attributes":[ +{"type":{"type":"opt","childType":{"type":"struct","childType":"Avatar"}},"id":1,"name":"avatar"} +]}}, { + "type":"struct", + "content": { + "name":"ServiceExContactRegistered", +"doc":[ +"Service message about user registration",{"type":"reference","argument":"uid","category":"full","description":" User Id"}],"trait":{"name":"ServiceEx","key":8},"expandable":"true","attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +]}}, { + "type":"struct", + "content": { + "name":"ServiceExPhoneMissed", +"doc":[ +"Update about missing phone call"],"trait":{"name":"ServiceEx","key":9},"expandable":"true","attributes":[ +]}}, { + "type":"struct", + "content": { + "name":"ServiceExPhoneCall", +"doc":[ +"Update about phone call",{"type":"reference","argument":"duration","category":"full","description":" Duration of a phone call"}],"trait":{"name":"ServiceEx","key":16},"expandable":"true","attributes":[ +{"type":"int32","id":1,"name":"duration"} +]}}, { + "type":"struct", + "content": { + "name":"ServiceExChatArchived", +"doc":[ +"Message about chat archived"],"trait":{"name":"ServiceEx","key":20},"expandable":"true","attributes":[ +]}}, { + "type":"struct", + "content": { + "name":"ServiceExChatRestored", +"doc":[ +"Message about chat restored"],"trait":{"name":"ServiceEx","key":21},"expandable":"true","attributes":[ +]}}, { + "type":"struct", + "content": { + "name":"DocumentMessage", +"doc":[ +"File message",{"type":"reference","argument":"fileId","category":"full","description":" file id"},{"type":"reference","argument":"accessHash","category":"danger","description":" file access hash"},{"type":"reference","argument":"fileSize","category":"full","description":" file size"},{"type":"reference","argument":"name","category":"full","description":" name of file"},{"type":"reference","argument":"mimeType","category":"full","description":" mimetype of file"},{"type":"reference","argument":"thumb","category":"compact","description":" optional thumb of file. JPEG less that 90x90 with 60-70 quality."},{"type":"reference","argument":"ext","category":"compact","description":" Extension"}],"trait":{"name":"Message","key":3},"expandable":"true","attributes":[ +{"type":"int64","id":1,"name":"fileId"} +,{"type":"int64","id":2,"name":"accessHash"} +,{"type":"int32","id":3,"name":"fileSize"} +,{"type":"string","id":4,"name":"name"} +,{"type":"string","id":5,"name":"mimeType"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"FastThumb"}},"id":6,"name":"thumb"} +,{"type":{"type":"opt","childType":{"type":"trait","childType":"DocumentEx"}},"id":8,"name":"ext"} +]}},{"type":"trait","content":{ +"isContainer":"true","name":"DocumentEx","attributes":[ +]}}, { + "type":"struct", + "content": { + "name":"DocumentExPhoto", +"doc":[ +"File photo extension. Can be set ONLY for JPEG.",{"type":"reference","argument":"w","category":"full","description":" image width"},{"type":"reference","argument":"h","category":"full","description":" image height"}],"trait":{"name":"DocumentEx","key":1},"expandable":"true","attributes":[ +{"type":"int32","id":1,"name":"w"} +,{"type":"int32","id":2,"name":"h"} +]}}, { + "type":"struct", + "content": { + "name":"DocumentExVideo", +"doc":[ +"File video extension",{"type":"reference","argument":"w","category":"full","description":" video width"},{"type":"reference","argument":"h","category":"full","description":" video height"},{"type":"reference","argument":"duration","category":"full","description":" video duration"}],"trait":{"name":"DocumentEx","key":2},"expandable":"true","attributes":[ +{"type":"int32","id":1,"name":"w"} +,{"type":"int32","id":2,"name":"h"} +,{"type":"int32","id":3,"name":"duration"} +]}}, { + "type":"struct", + "content": { + "name":"DocumentExVoice", +"doc":[ +"File voice extension",{"type":"reference","argument":"duration","category":"full","description":" voice duration"}],"trait":{"name":"DocumentEx","key":3},"expandable":"true","attributes":[ +{"type":"int32","id":1,"name":"duration"} +]}}, { + "type":"struct", + "content": { + "name":"DocumentExAnimation", +"doc":[ +"Animation extension. Can be set ONLY for GIF.",{"type":"reference","argument":"w","category":"full","description":" Animation width"},{"type":"reference","argument":"h","category":"full","description":" Animation height"}],"trait":{"name":"DocumentEx","key":6},"expandable":"true","attributes":[ +{"type":"int32","id":1,"name":"w"} +,{"type":"int32","id":2,"name":"h"} +]}}, { + "type":"struct", + "content": { + "name":"DocumentExAnimationVid", +"doc":[ +"Animation video extension. More compact version of Animation with video codec instead of GIF.","Can be set ONLY for MP4.",{"type":"reference","argument":"w","category":"full","description":" Animation width"},{"type":"reference","argument":"h","category":"full","description":" Animation height"},{"type":"reference","argument":"duration","category":"full","description":" Animation duration"}],"trait":{"name":"DocumentEx","key":7},"expandable":"true","attributes":[ +{"type":"int32","id":1,"name":"w"} +,{"type":"int32","id":2,"name":"h"} +,{"type":"int32","id":3,"name":"duration"} +]}}, { + "type":"struct", + "content": { + "name":"JsonMessage", +"doc":[ +"Custom-data JsonMessage",{"type":"reference","argument":"rawJson","category":"danger","description":" JSON object"}],"trait":{"name":"Message","key":4},"expandable":"true","attributes":[ +{"type":"string","id":1,"name":"rawJson"} +]}}, { + "type":"struct", + "content": { + "name":"UnsupportedMessage", +"doc":[ +"Explicit type for unsupported message"],"trait":{"name":"Message","key":5},"expandable":"true","attributes":[ +]}}, { + "type":"struct", + "content": { + "name":"StickerMessage", +"doc":[ +"Sticker message",{"type":"reference","argument":"stickerId","category":"full","description":" Optional Unique ID of sticker"},{"type":"reference","argument":"fastPreview","category":"full","description":" Optional Fast preview of sticker in webp format"},{"type":"reference","argument":"image512","category":"full","description":" Optional 512x512 sticker image in webp format"},{"type":"reference","argument":"image256","category":"full","description":" Optional 256x256 sticker image in webp format"},{"type":"reference","argument":"stickerCollectionId","category":"full","description":" Optional Collection ID"},{"type":"reference","argument":"stickerCollectionAccessHash","category":"full","description":" Optional Collection Access Hash"}],"trait":{"name":"Message","key":6},"expandable":"true","attributes":[ +{"type":{"type":"opt","childType":"int32"},"id":1,"name":"stickerId"} +,{"type":{"type":"opt","childType":"bytes"},"id":2,"name":"fastPreview"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"ImageLocation"}},"id":3,"name":"image512"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"ImageLocation"}},"id":4,"name":"image256"} +,{"type":{"type":"opt","childType":"int32"},"id":5,"name":"stickerCollectionId"} +,{"type":{"type":"opt","childType":"int64"},"id":6,"name":"stickerCollectionAccessHash"} +]}}, { + "type":"struct", + "content": { + "name":"BinaryMessage", +"doc":[ +"Binary Message. Useful for implementing your own content types",{"type":"reference","argument":"contentTag","category":"full","description":" Content Tag"},{"type":"reference","argument":"msg","category":"compact","description":" Message contents"}],"trait":{"name":"Message","key":7},"expandable":"true","attributes":[ +{"type":"string","id":1,"name":"contentTag"} +,{"type":"bytes","id":2,"name":"msg"} +]}}, { + "type":"struct", + "content": { + "name":"EncryptedMessage", +"doc":[ +"Encrypted Message",{"type":"reference","argument":"box","category":"full","description":" Encrypted box"}],"trait":{"name":"Message","key":8},"expandable":"true","attributes":[ +{"type":{"type":"struct","childType":"EncryptedBox"},"id":1,"name":"box"} +]}}, { + "type":"struct", + "content": { + "name":"EmptyMessage", +"doc":[ +"Empty Message"],"trait":{"name":"Message","key":9},"expandable":"true","attributes":[ +]}}, { + "type":"struct", + "content": { + "name":"DialogShort", +"doc":[ +"Short Dialog from grouped conversation list",{"type":"reference","argument":"peer","category":"full","description":" Peer of conversation"},{"type":"reference","argument":"counter","category":"full","description":" Conversation unread count"},{"type":"reference","argument":"date","category":"full","description":" Conversation top message date"}],"attributes":[ +{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"} +,{"type":"int32","id":2,"name":"counter"} +,{"type":{"type":"alias","childType":"date"},"id":4,"name":"date"} +]}}, { + "type":"struct", + "content": { + "name":"DialogGroup", +"doc":[ +"Grouped dialog list",{"type":"reference","argument":"title","category":"full","description":" Title of group"},{"type":"reference","argument":"key","category":"full","description":" Key of group"},{"type":"reference","argument":"dialogs","category":"full","description":" Conversations in group"}],"attributes":[ +{"type":"string","id":1,"name":"title"} +,{"type":"string","id":2,"name":"key"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"DialogShort"}},"id":3,"name":"dialogs"} +]}}, { + "type":"struct", + "content": { + "name":"MessageReaction", +"doc":[ +"Reaction to message",{"type":"reference","argument":"users","category":"full","description":" User's reaction"},{"type":"reference","argument":"code","category":"full","description":" Reaction EMOJI code"}],"attributes":[ +{"type":{"type":"list","childType":{"type":"alias","childType":"userId"}},"id":1,"name":"users"} +,{"type":"string","id":2,"name":"code"} +]}}, { + "type":"struct", + "content": { + "name":"MessageOutReference", +"doc":[ +"Message Out Reference",{"type":"reference","argument":"peer","category":"full","description":" Out Peer of message"},{"type":"reference","argument":"rid","category":"full","description":" Message random id"}],"attributes":[ +{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"} +,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"rid"} +]}},{"type":"rpc","content":{ +"name":"SendMessage", +"header":92, +"response":{"type":"reference","name":"SeqDate"}, +"doc":[ +"Sending plain message",{"type":"reference","argument":"peer","category":"full","description":"Destination peer for message"},{"type":"reference","argument":"rid","category":"full","description":"Message random id (generated on client side)"},{"type":"reference","argument":"message","category":"full","description":"The message"},{"type":"reference","argument":"isOnlyForUser","category":"full","description":"If message is shown only for specific user"},{"type":"reference","argument":"quotedMessageReference","category":"full","description":"Quoted message if present"}],"attributes":[ +{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"} +,{"type":{"type":"alias","childType":"randomId"},"id":3,"name":"rid"} +,{"type":{"type":"trait","childType":"Message"},"id":4,"name":"message"} +,{"type":{"type":"opt","childType":{"type":"alias","childType":"userId"}},"id":5,"name":"isOnlyForUser"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"MessageOutReference"}},"id":6,"name":"quotedMessageReference"} +]}},{"type":"rpc","content":{ +"name":"UpdateMessage", +"header":2658, +"response":{"type":"reference","name":"SeqDate"}, +"doc":[ +"Changing Message content",{"type":"reference","argument":"peer","category":"full","description":"Destination Peer"},{"type":"reference","argument":"rid","category":"full","description":"Message random id"},{"type":"reference","argument":"updatedMessage","category":"full","description":"Updated Message content"}],"attributes":[ +{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"} +,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"rid"} +,{"type":{"type":"trait","childType":"Message"},"id":3,"name":"updatedMessage"} +]}},{"type":"rpc","content":{ +"name":"MessageReceived", +"header":55, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Confirmation of plain message receive by device",{"type":"reference","argument":"peer","category":"full","description":"Destination peer"},{"type":"reference","argument":"date","category":"full","description":"Maximum date of received messages"}],"attributes":[ +{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"} +,{"type":{"type":"alias","childType":"date"},"id":3,"name":"date"} +]}},{"type":"rpc","content":{ +"name":"MessageRead", +"header":57, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Marking plain messages as read",{"type":"reference","argument":"peer","category":"full","description":"Destination peer"},{"type":"reference","argument":"date","category":"full","description":"Maximum date of read messages"}],"attributes":[ +{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"} +,{"type":{"type":"alias","childType":"date"},"id":3,"name":"date"} +]}},{"type":"rpc","content":{ +"name":"DeleteMessage", +"header":98, +"response":{"type":"reference","name":"Seq"}, +"doc":[ +"Deleting messages",{"type":"reference","argument":"peer","category":"full","description":"Destination peer"},{"type":"reference","argument":"rids","category":"full","description":"Message random id"}],"attributes":[ +{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"} +,{"type":{"type":"list","childType":{"type":"alias","childType":"randomId"}},"id":3,"name":"rids"} +]}},{"type":"rpc","content":{ +"name":"ClearChat", +"header":99, +"response":{"type":"reference","name":"Seq"}, +"doc":[ +"Clearing of conversation (without removing dialog from dialogs list)",{"type":"reference","argument":"peer","category":"full","description":"Conversation peer"}],"attributes":[ +{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"} +]}},{"type":"rpc","content":{ +"name":"DeleteChat", +"header":100, +"response":{"type":"reference","name":"Seq"}, +"doc":[ +"Deleting of conversation (also leave group for group conversations)",{"type":"reference","argument":"peer","category":"full","description":"Conversation peer"}],"attributes":[ +{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"} +]}},{"type":"rpc","content":{ +"name":"ArchiveChat", +"header":2654, +"response":{"type":"reference","name":"Seq"}, +"doc":[ +"Archiving chat",{"type":"reference","argument":"peer","category":"full","description":"Conversation peer"}],"attributes":[ +{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"} +]}},{"type":"rpc","content":{ +"name":"MessageSetReaction", +"header":210, +"response":{"type":"reference","name":"ReactionsResponse"}, +"doc":[ +"Setting Message reaction",{"type":"reference","argument":"peer","category":"full","description":"Destination peer"},{"type":"reference","argument":"rid","category":"full","description":"Message random id"},{"type":"reference","argument":"code","category":"full","description":"Reaction code"}],"attributes":[ +{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"} +,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"rid"} +,{"type":"string","id":3,"name":"code"} +]}},{"type":"rpc","content":{ +"name":"MessageRemoveReaction", +"header":220, +"response":{"type":"reference","name":"ReactionsResponse"}, +"doc":[ +"Removing Message reaction",{"type":"reference","argument":"peer","category":"full","description":"Destination peer"},{"type":"reference","argument":"rid","category":"full","description":"Message random id"},{"type":"reference","argument":"code","category":"full","description":"Reaction code"}],"attributes":[ +{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"} +,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"rid"} +,{"type":"string","id":3,"name":"code"} +]}},{"type":"response","content":{ +"name":"ReactionsResponse", +"header":219, +"doc":[ +"Response for reactions change"],"attributes":[ +{"type":"int32","id":1,"name":"seq"} +,{"type":{"type":"alias","childType":"seq_state"},"id":2,"name":"state"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"MessageReaction"}},"id":3,"name":"reactions"} +]}},{"type":"update","content":{ +"name":"Message", +"header":55, +"doc":[ +"Update about plain message",{"type":"reference","argument":"peer","category":"full","description":" Destination peer"},{"type":"reference","argument":"senderUid","category":"full","description":" Sender of message"},{"type":"reference","argument":"date","category":"full","description":" date of message"},{"type":"reference","argument":"rid","category":"full","description":" Rid of message"},{"type":"reference","argument":"message","category":"full","description":" message content"},{"type":"reference","argument":"attributes","category":"full","description":" optional message attributes"},{"type":"reference","argument":"quotedMessage","category":"full","description":" optional quoted message"}],"attributes":[ +{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"} +,{"type":{"type":"alias","childType":"userId"},"id":2,"name":"senderUid"} +,{"type":{"type":"alias","childType":"date"},"id":3,"name":"date"} +,{"type":{"type":"alias","childType":"randomId"},"id":4,"name":"rid"} +,{"type":{"type":"trait","childType":"Message"},"id":5,"name":"message"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"MessageAttributes"}},"id":6,"name":"attributes"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"QuotedMessage"}},"id":7,"name":"quotedMessage"} +]}},{"type":"update","content":{ +"name":"MessageContentChanged", +"header":162, +"doc":[ +"Update about message change",{"type":"reference","argument":"peer","category":"full","description":" Destination peer"},{"type":"reference","argument":"rid","category":"full","description":" Rid of message"},{"type":"reference","argument":"message","category":"full","description":" Message content"}],"attributes":[ +{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"} +,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"rid"} +,{"type":{"type":"trait","childType":"Message"},"id":3,"name":"message"} +]}},{"type":"update","content":{ +"name":"MessageQuotedChanged", +"header":169, +"doc":[ +"Update about quoted message changed",{"type":"reference","argument":"peer","category":"full","description":" Destination peer"},{"type":"reference","argument":"rid","category":"full","description":" Rid of message"},{"type":"reference","argument":"quotedMessage","category":"full","description":" Quoted Message"}],"attributes":[ +{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"} +,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"rid"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"QuotedMessage"}},"id":3,"name":"quotedMessage"} +]}},{"type":"update","content":{ +"name":"MessageDateChanged", +"header":163, +"doc":[ +"Update about message date changed",{"type":"reference","argument":"peer","category":"full","description":" Destination peer"},{"type":"reference","argument":"rid","category":"full","description":" Rid of message"},{"type":"reference","argument":"date","category":"full","description":" Date of message"}],"attributes":[ +{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"} +,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"rid"} +,{"type":{"type":"alias","childType":"date"},"id":3,"name":"date"} +]}},{"type":"update","content":{ +"name":"MessageSent", +"header":4, +"doc":[ +"Update about message sent",{"type":"reference","argument":"peer","category":"full","description":" Destination peer"},{"type":"reference","argument":"rid","category":"full","description":" Rid of message"},{"type":"reference","argument":"date","category":"full","description":" Date of message"}],"attributes":[ +{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"} +,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"rid"} +,{"type":{"type":"alias","childType":"date"},"id":3,"name":"date"} +]}},{"type":"update","content":{ +"name":"MessageReceived", +"header":54, +"doc":[ +"Update about message received",{"type":"reference","argument":"peer","category":"full","description":" Destination peer"},{"type":"reference","argument":"startDate","category":"full","description":" Start date of received message"},{"type":"reference","argument":"receivedDate","category":"full","description":" Date of receive"}],"attributes":[ +{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"} +,{"type":{"type":"alias","childType":"date"},"id":2,"name":"startDate"} +,{"type":{"type":"alias","childType":"date"},"id":3,"name":"receivedDate"} +]}},{"type":"update","content":{ +"name":"MessageRead", +"header":19, +"doc":[ +"Update about message read",{"type":"reference","argument":"peer","category":"full","description":" Destination peer"},{"type":"reference","argument":"startDate","category":"full","description":" Start date of read message"},{"type":"reference","argument":"readDate","category":"full","description":" Date of read"}],"attributes":[ +{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"} +,{"type":{"type":"alias","childType":"date"},"id":2,"name":"startDate"} +,{"type":{"type":"alias","childType":"date"},"id":3,"name":"readDate"} +]}},{"type":"update","content":{ +"name":"MessageReadByMe", +"header":50, +"doc":[ +"Update about message read by me",{"type":"reference","argument":"peer","category":"full","description":" Destination peer"},{"type":"reference","argument":"startDate","category":"full","description":" Start date of read message"},{"type":"reference","argument":"unreadCounter","category":"full","description":" Optional unread counter in conversation"}],"attributes":[ +{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"} +,{"type":{"type":"alias","childType":"date"},"id":2,"name":"startDate"} +,{"type":{"type":"opt","childType":"int32"},"id":3,"name":"unreadCounter"} +]}},{"type":"update","content":{ +"name":"MessageDelete", +"header":46, +"doc":[ +"Update about message delete",{"type":"reference","argument":"peer","category":"full","description":" Destination peer"},{"type":"reference","argument":"rids","category":"full","description":" Deleted messages"}],"attributes":[ +{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"} +,{"type":{"type":"list","childType":{"type":"alias","childType":"randomId"}},"id":2,"name":"rids"} +]}},{"type":"update","content":{ +"name":"ChatClear", +"header":47, +"doc":[ +"Update about chat clear",{"type":"reference","argument":"peer","category":"full","description":" Destination peer"}],"attributes":[ +{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"} +]}},{"type":"update","content":{ +"name":"ChatDelete", +"header":48, +"doc":[ +"Update about chat delete",{"type":"reference","argument":"peer","category":"full","description":" Destination peer"}],"attributes":[ +{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"} +]}},{"type":"update","content":{ +"name":"ChatArchive", +"header":94, +"doc":[ +"Update about chat archive",{"type":"reference","argument":"peer","category":"full","description":" Destination peer"}],"attributes":[ +{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"} +]}},{"type":"update","content":{ +"name":"ChatDropCache", +"header":2690, +"doc":[ +"Update about cache drop",{"type":"reference","argument":"peer","category":"full","description":" Destination peer"}],"attributes":[ +{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"} +]}},{"type":"update","content":{ +"name":"ChatGroupsChanged", +"header":1, +"doc":[ +"Update about chat groups changed. Called only when adding, removing and reordering of grouped dialog.",{"type":"reference","argument":"dialogs","category":"compact","description":" New dialgos list"}],"attributes":[ +{"type":{"type":"list","childType":{"type":"struct","childType":"DialogGroup"}},"id":1,"name":"dialogs"} +]}},{"type":"update","content":{ +"name":"ReactionsUpdate", +"header":222, +"doc":[ +"Update about reactions change",{"type":"reference","argument":"peer","category":"full","description":" Destination peer"},{"type":"reference","argument":"rid","category":"full","description":" Message random id"},{"type":"reference","argument":"reactions","category":"full","description":" New Reactions"}],"attributes":[ +{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"} +,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"rid"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"MessageReaction"}},"id":3,"name":"reactions"} +]}}, { + "type": "enum", + "content": { + "name": "MessageState", + "values": [ { - "type": "string", - "id": 5, - "name": "deviceTitle" + "name": "Sent", + "id": 1 }, { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 6, - "name": "timeZone" + "name": "Received", + "id": 2 }, { - "type": { - "type": "list", - "childType": "string" - }, - "id": 7, - "name": "preferredLanguages" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "SendCodeByPhoneCall", - "header": 197, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Dial phone and dictate auth code", - { - "type": "reference", - "argument": "transactionHash", - "category": "danger", - "description": "Transaction hash" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "transactionHash" + "name": "Read", + "id": 3 } - ] - } - }, - { - "type": "rpc", + ] + } + }, { + "type":"struct", + "content": { + "name":"MessageContainer", +"doc":[ +"Message from history",{"type":"reference","argument":"senderUid","category":"full","description":" Sender of mesasge"},{"type":"reference","argument":"rid","category":"full","description":" Random Id of message"},{"type":"reference","argument":"date","category":"full","description":" Date of message"},{"type":"reference","argument":"message","category":"full","description":" Content of message"},{"type":"reference","argument":"reactions","category":"full","description":" Message reactions"},{"type":"reference","argument":"attribute","category":"full","description":" Optional message attributes"},{"type":"reference","argument":"quotedMessage","category":"full","description":" Optional quoted Message"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"senderUid"} +,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"rid"} +,{"type":{"type":"alias","childType":"date"},"id":3,"name":"date"} +,{"type":{"type":"trait","childType":"Message"},"id":5,"name":"message"} +,{"type":{"type":"opt","childType":{"type":"enum","childType":"MessageState"}},"id":6,"name":"state"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"MessageReaction"}},"id":7,"name":"reactions"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"MessageAttributes"}},"id":8,"name":"attribute"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"QuotedMessage"}},"id":9,"name":"quotedMessage"} +]}}, { + "type": "enum", "content": { - "name": "StartEmailAuth", - "header": 185, - "response": { - "type": "anonymous", - "header": 186, - "doc": [ - "Email Activation response", - { - "type": "reference", - "argument": "transactionHash", - "category": "danger", - "description": " Hash of activation transaction" - }, - { - "type": "reference", - "argument": "isRegistered", - "category": "full", - "description": " true if user is registered" - }, - { - "type": "reference", - "argument": "activationType", - "category": "full", - "description": " Email Activation type" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "transactionHash" - }, - { - "type": "bool", - "id": 2, - "name": "isRegistered" - }, - { - "type": { - "type": "enum", - "childType": "EmailActivationType" - }, - "id": 3, - "name": "activationType" - } - ] - }, - "doc": [ - "Start EMail Activation", - { - "type": "reference", - "argument": "email", - "category": "full", - "description": "Email" - }, - { - "type": "reference", - "argument": "appId", - "category": "hidden", - "description": "Application Id" - }, + "name": "ListLoadMode", + "values": [ { - "type": "reference", - "argument": "apiKey", - "category": "hidden", - "description": "Application API key" + "name": "Forward", + "id": 1 }, { - "type": "reference", - "argument": "deviceHash", - "category": "full", - "description": "Hash of device unique id and app bundle id. Used for autologout users when app is reinstalled" + "name": "Backward", + "id": 2 }, { - "type": "reference", - "argument": "deviceTitle", - "category": "full", - "description": "Device Title" - }, + "name": "Both", + "id": 3 + } + ] + } + },{"type":"rpc","content":{ +"name":"LoadHistory", +"header":118, +"response":{"type":"anonymous","header":119, "doc":[ +"Loaded history",{"type":"reference","argument":"history","category":"compact","description":" Messages"},{"type":"reference","argument":"users","category":"compact","description":" Loaded users"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"MessageContainer"}},"id":1,"name":"history"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":2,"name":"users"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":4,"name":"userPeers"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"Group"}},"id":5,"name":"groups"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"GroupOutPeer"}},"id":6,"name":"groupPeers"} +]}, +"doc":[ +"Loading history of chat",{"type":"reference","argument":"peer","category":"full","description":"Peer of conversation"},{"type":"reference","argument":"date","category":"full","description":"start date of messages for loading or 0 for loading from start"},{"type":"reference","argument":"loadMode","category":"full","description":"Loading mode: Forward loading, backward or both ways"},{"type":"reference","argument":"limit","category":"full","description":"maximum amount of messages (max is 100)"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled optimizations"}],"attributes":[ +{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"} +,{"type":{"type":"alias","childType":"date"},"id":3,"name":"date"} +,{"type":{"type":"opt","childType":{"type":"enum","childType":"ListLoadMode"}},"id":5,"name":"loadMode"} +,{"type":"int32","id":4,"name":"limit"} +,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":6,"name":"optimizations"} +]}}, { + "type":"struct", + "content": { + "name":"Dialog", +"doc":[ +"Conversation from history",{"type":"reference","argument":"peer","category":"full","description":" Peer of conversation"},{"type":"reference","argument":"unreadCount","category":"full","description":" plain messages unread messages count"},{"type":"reference","argument":"sortDate","category":"full","description":" date of conversation for sorting"},{"type":"reference","argument":"senderUid","category":"full","description":" Sender of top message (may be zero)"},{"type":"reference","argument":"rid","category":"full","description":" Random ID of top message (may be zero)"},{"type":"reference","argument":"date","category":"full","description":" Date of top message (can't be zero)"},{"type":"reference","argument":"message","category":"full","description":" Content of message"},{"type":"reference","argument":"firstUnreadDate","category":"full","description":" Date of first unread message"},{"type":"reference","argument":"attributes","category":"full","description":" Optional top message attributes"}],"attributes":[ +{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"} +,{"type":"int32","id":3,"name":"unreadCount"} +,{"type":{"type":"alias","childType":"date"},"id":4,"name":"sortDate"} +,{"type":{"type":"alias","childType":"userId"},"id":5,"name":"senderUid"} +,{"type":{"type":"alias","childType":"randomId"},"id":6,"name":"rid"} +,{"type":{"type":"alias","childType":"date"},"id":7,"name":"date"} +,{"type":{"type":"trait","childType":"Message"},"id":8,"name":"message"} +,{"type":{"type":"opt","childType":{"type":"enum","childType":"MessageState"}},"id":9,"name":"state"} +,{"type":{"type":"opt","childType":{"type":"alias","childType":"date"}},"id":10,"name":"firstUnreadDate"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"MessageAttributes"}},"id":11,"name":"attributes"} +]}},{"type":"rpc","content":{ +"name":"LoadDialogs", +"header":104, +"response":{"type":"anonymous","header":105, "doc":[ +"Loaded dialogs",{"type":"reference","argument":"groups","category":"compact","description":" Loaded groups"},{"type":"reference","argument":"users","category":"compact","description":" Loaded users"},{"type":"reference","argument":"dialogs","category":"compact","description":" Loaded dialogs"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"Group"}},"id":1,"name":"groups"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":2,"name":"users"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"Dialog"}},"id":3,"name":"dialogs"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":4,"name":"userPeers"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"GroupOutPeer"}},"id":5,"name":"groupPeers"} +]}, +"doc":[ +"Loading conversation history",{"type":"reference","argument":"minDate","category":"full","description":"start date of conversation loading. Use 0 to load latest messages"},{"type":"reference","argument":"limit","category":"full","description":"limit maximum amount of messages (max is 100)"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled optimizations"}],"attributes":[ +{"type":{"type":"alias","childType":"date"},"id":1,"name":"minDate"} +,{"type":"int32","id":2,"name":"limit"} +,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":3,"name":"optimizations"} +]}},{"type":"rpc","content":{ +"name":"LoadArchived", +"header":2651, +"response":{"type":"anonymous","header":2652, "doc":[ +"Archived dialogs",{"type":"reference","argument":"groups","category":"full","description":" Referenced groups"},{"type":"reference","argument":"users","category":"full","description":" Referenced users"},{"type":"reference","argument":"dialogs","category":"full","description":" Archived dialogs"},{"type":"reference","argument":"nextOffset","category":"compact","description":" Offset for next bunch"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"Group"}},"id":1,"name":"groups"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":2,"name":"users"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"Dialog"}},"id":3,"name":"dialogs"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":5,"name":"userPeers"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"GroupOutPeer"}},"id":6,"name":"groupPeers"} +,{"type":{"type":"opt","childType":"bytes"},"id":4,"name":"nextOffset"} +]}, +"doc":[ +"Loading archived messages",{"type":"reference","argument":"nextOffset","category":"compact","description":"Optional next offset"},{"type":"reference","argument":"limit","category":"full","description":"Maximum number of elements"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled optimizations"}],"attributes":[ +{"type":{"type":"opt","childType":"bytes"},"id":1,"name":"nextOffset"} +,{"type":"int32","id":2,"name":"limit"} +,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":3,"name":"optimizations"} +]}},{"type":"rpc","content":{ +"name":"LoadGroupedDialogs", +"header":225, +"response":{"type":"anonymous","header":226, "doc":[ +"Loaded grouped dialogs",{"type":"reference","argument":"dialogs","category":"compact","description":" Loaded groups of dialogs"},{"type":"reference","argument":"users","category":"compact","description":" Loaded users"},{"type":"reference","argument":"groups","category":"full","description":" Loaded groups"},{"type":"reference","argument":"showArchived","category":"full","description":" Show archived section"},{"type":"reference","argument":"showInvite","category":"full","description":" Show invite message"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"DialogGroup"}},"id":1,"name":"dialogs"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":2,"name":"users"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"Group"}},"id":3,"name":"groups"} +,{"type":{"type":"opt","childType":"bool"},"id":4,"name":"showArchived"} +,{"type":{"type":"opt","childType":"bool"},"id":5,"name":"showInvite"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":6,"name":"userPeers"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"GroupOutPeer"}},"id":7,"name":"groupPeers"} +]}, +"doc":[ +"Load all dialogs from grouped list"],"attributes":[ +{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":1,"name":"optimizations"} +]}},{"type":"response","content":{ +"name":"DialogsOrder", +"header":235, +"doc":[ +"Dialogs order response",{"type":"reference","argument":"seq","category":"full","description":" update seq"},{"type":"reference","argument":"state","category":"full","description":" update state"},{"type":"reference","argument":"groups","category":"full","description":" Update groups"}],"attributes":[ +{"type":"int32","id":1,"name":"seq"} +,{"type":{"type":"alias","childType":"seq_state"},"id":2,"name":"state"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"DialogGroup"}},"id":3,"name":"groups"} +]}},{"type":"rpc","content":{ +"name":"HideDialog", +"header":231, +"response":{"type":"reference","name":"DialogsOrder"}, +"doc":[ +"Hide Dialog from grouped list",{"type":"reference","argument":"peer","category":"full","description":"Dialog peer"}],"attributes":[ +{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"} +]}},{"type":"rpc","content":{ +"name":"ShowDialog", +"header":232, +"response":{"type":"reference","name":"DialogsOrder"}, +"doc":[ +"Show Dialog in grouped list"],"attributes":[ +{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"} +]}},{"type":"rpc","content":{ +"name":"FavouriteDialog", +"header":224, +"response":{"type":"reference","name":"DialogsOrder"}, +"doc":[ +"Marking dialog as favourite",{"type":"reference","argument":"peer","category":"full","description":"Peer for favouriting"}],"attributes":[ +{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"} +]}},{"type":"rpc","content":{ +"name":"UnfavouriteDialog", +"header":227, +"response":{"type":"reference","name":"DialogsOrder"}, +"doc":[ +"Making dialog as unfavourite",{"type":"reference","argument":"peer","category":"full","description":"Peer for favouriting"}],"attributes":[ +{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"} +]}},{"type":"rpc","content":{ +"name":"NotifyDialogOpened", +"header":2785, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Notifying about dialog open",{"type":"reference","argument":"peer","category":"full","description":"Peer that was opened"}],"attributes":[ +{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"} +]}}]}, { + "title": "Groups", + "package": "groups", + "items": [ +{"type":"comment","content":"Entities"}, { + "type":"struct", + "content": { + "name":"Member", +"doc":[ +"Member information",{"type":"reference","argument":"uid","category":"full","description":" User id"},{"type":"reference","argument":"inviterUid","category":"full","description":" User inviter id"},{"type":"reference","argument":"date","category":"full","description":" Adding date"},{"type":"reference","argument":"isAdmin","category":"full","description":" is member admin of group"}],"expandable":"true","attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":{"type":"alias","childType":"userId"},"id":2,"name":"inviterUid"} +,{"type":"int64","id":3,"name":"date"} +,{"type":{"type":"opt","childType":"bool"},"id":4,"name":"isAdmin"} +]}}, { + "type": "enum", + "content": { + "name": "GroupType", + "values": [ { - "type": "reference", - "argument": "timeZone", - "category": "full", - "description": "TimeZone of device" + "name": "GROUP", + "id": 1 }, { - "type": "reference", - "argument": "preferredLanguages", - "category": "full", - "description": "Preferred languages" + "name": "CHANNEL", + "id": 2 } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "email" - }, + ] + } + }, { + "type": "enum", + "content": { + "name": "GroupPermissions", + "values": [ { - "type": "int32", - "id": 2, - "name": "appId" + "name": "SEND_MESSAGE", + "id": 1 }, { - "type": "string", - "id": 3, - "name": "apiKey" + "name": "CLEAR", + "id": 2 }, { - "type": "bytes", - "id": 4, - "name": "deviceHash" + "name": "LEAVE", + "id": 3 }, { - "type": "string", - "id": 5, - "name": "deviceTitle" + "name": "DELETE", + "id": 4 }, { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 6, - "name": "timeZone" + "name": "JOIN", + "id": 5 }, { - "type": { - "type": "list", - "childType": "string" - }, - "id": 7, - "name": "preferredLanguages" + "name": "VIEW_INFO", + "id": 6 } - ] - } - }, - { - "type": "rpc", + ] + } + }, { + "type": "enum", "content": { - "name": "StartAnonymousAuth", - "header": 198, - "response": { - "type": "reference", - "name": "Auth" - }, - "doc": [ - "Starting Anonymous login", - { - "type": "reference", - "argument": "name", - "category": "full", - "description": "Name of new user" - }, + "name": "GroupFullPermissions", + "values": [ { - "type": "reference", - "argument": "appId", - "category": "hidden", - "description": "Application Id" + "name": "EDIT_INFO", + "id": 1 }, { - "type": "reference", - "argument": "apiKey", - "category": "hidden", - "description": "Application API key" + "name": "VIEW_MEMBERS", + "id": 2 }, { - "type": "reference", - "argument": "deviceHash", - "category": "full", - "description": "Hash of device unique id and app bundle id. Used for autologout users when app is reinstalled" + "name": "INVITE_MEMBERS", + "id": 3 }, { - "type": "reference", - "argument": "deviceTitle", - "category": "full", - "description": "Device Title" + "name": "INVITE_VIA_LINK", + "id": 4 }, { - "type": "reference", - "argument": "timeZone", - "category": "full", - "description": "TimeZone of device" + "name": "CALL", + "id": 5 }, { - "type": "reference", - "argument": "preferredLanguages", - "category": "full", - "description": "Preferred languages" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "name" + "name": "EDIT_ADMIN_SETTINGS", + "id": 6 }, { - "type": "int32", - "id": 2, - "name": "appId" + "name": "VIEW_ADMINS", + "id": 7 }, { - "type": "string", - "id": 3, - "name": "apiKey" + "name": "EDIT_ADMINS", + "id": 8 }, { - "type": "bytes", - "id": 4, - "name": "deviceHash" + "name": "KICK_INVITED", + "id": 9 }, { - "type": "string", - "id": 5, - "name": "deviceTitle" + "name": "KICK_ANYONE", + "id": 10 }, { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 6, - "name": "timeZone" + "name": "EDIT_FOREIGN", + "id": 11 }, { - "type": { - "type": "list", - "childType": "string" - }, - "id": 7, - "name": "preferredLanguages" + "name": "DELETE_FOREIGN", + "id": 12 } - ] - } - }, + ] + } + }, { + "type":"struct", + "content": { + "name":"Group", +"doc":[ +"Group information","","Permissions.","Permissions of this structure is about group messages operation, such as","ability to send messages, clear chat, leave group and so on. This operations","Can be held outside of the Group Info page.","","Default value is ZERO, Opposide iz ONE. If Default is FALSE then ONE == TRUE.","If default is TRUE then ONE == FALSE.","Bits:","0 - canSendMessage. Default is FALSE.","1 - canClear. Default is FALSE.","2 - canLeave. Default is FALSE.","3 - canDelete. Default is FALSE.","4 - canJoin. Default is FALSE.","5 - canViewInfo. Default is FALSE.","",{"type":"reference","argument":"id","category":"full","description":" group id"},{"type":"reference","argument":"accessHash","category":"danger","description":" Access hash of group"},{"type":"reference","argument":"title","category":"full","description":" Title of group"},{"type":"reference","argument":"avatar","category":"compact","description":" Avatar of group"},{"type":"reference","argument":"membersCount","category":"full","description":" Number of members"},{"type":"reference","argument":"isHidden","category":"full","description":" Is group hidden (not showing it in recent list). Default is false."},{"type":"reference","argument":"isMember","category":"full","description":" Is current user a member of a group. Default is true."},{"type":"reference","argument":"groupType","category":"full","description":" Group Type. Used only for displaying information. Default is GROUP."},{"type":"reference","argument":"permissions","category":"full","description":" Permissions of group object"},{"type":"reference","argument":"isDeleted","category":"full","description":" Is this group deleted"},{"type":"reference","argument":"ext","category":"full","description":" Group extension Data"},{"type":"reference","argument":"isAdmin","category":"full","description":" [DEPRECATED] Is current user an admin of a group"},{"type":"reference","argument":"theme","category":"hidden","description":" [DEPRECATED] Theme of group"},{"type":"reference","argument":"about","category":"hidden","description":" [DEPRECATED] About of group"},{"type":"reference","argument":"creatorUid","category":"hidden","description":" [DEPRECATED] Group creator"},{"type":"reference","argument":"members","category":"compact","description":" [DEPRECATED] Members of group"},{"type":"reference","argument":"createDate","category":"full","description":" [DEPRECATED] Date of creation"}],"expandable":"true","attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"id"} +,{"type":"int64","id":2,"name":"accessHash"} +,{"type":"string","id":3,"name":"title"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"Avatar"}},"id":4,"name":"avatar"} +,{"type":{"type":"opt","childType":"int32"},"id":24,"name":"membersCount"} +,{"type":{"type":"opt","childType":"bool"},"id":6,"name":"isMember"} +,{"type":{"type":"opt","childType":"bool"},"id":20,"name":"isHidden"} +,{"type":{"type":"opt","childType":{"type":"enum","childType":"GroupType"}},"id":25,"name":"groupType"} +,{"type":{"type":"opt","childType":"int64"},"id":26,"name":"permissions"} +,{"type":{"type":"opt","childType":"bool"},"id":27,"name":"isDeleted"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"MapValue"}},"id":22,"name":"ext"} +,{"type":{"type":"opt","childType":"bool"},"id":16,"name":"isAdmin", "deprecated":"true"} +,{"type":{"type":"alias","childType":"userId"},"id":8,"name":"creatorUid", "deprecated":"true"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"Member"}},"id":9,"name":"members", "deprecated":"true"} +,{"type":{"type":"alias","childType":"date"},"id":10,"name":"createDate", "deprecated":"true"} +,{"type":{"type":"opt","childType":"string"},"id":17,"name":"theme", "deprecated":"true"} +,{"type":{"type":"opt","childType":"string"},"id":18,"name":"about", "deprecated":"true"} +]}}, { + "type":"struct", + "content": { + "name":"GroupFull", +"doc":[ +"Goup Full information","Permissions.","Idea of Group Full mermissions is about Group Info pages. This permissions","are usefull only when trying to view and update group settings and not related","to chat messages itself.","Default value is ZERO, Opposide iz ONE. If Default is FALSE then ONE == TRUE.","If default is TRUE then ONE == FALSE.","Bits:","0 - canEditInfo. Default is FALSE.","1 - canViewMembers. Default is FALSE.","2 - canInviteMembers. Default is FALSE.","3 - canInviteViaLink. Default is FALSE.","4 - canCall. Default is FALSE.","5 - canEditAdminSettings. Default is FALSE.","6 - canViewAdmins. Default is FALSE.","7 - canEditAdmins. Default is FALSE.","8 - canKickInvited. Default is FALSE.","9 - canKickAnyone. Default is FALSE.","10 - canEditForeign. Default is FALSE.","11 - canDeleteForeign. Default is FALSE.","",{"type":"reference","argument":"id","category":"full","description":" Group Id"},{"type":"reference","argument":"createDate","category":"full","description":" Date created"},{"type":"reference","argument":"ownerUid","category":"full","description":" Optional group owner"},{"type":"reference","argument":"members","category":"full","description":" Group members. Can be empty when isAsyncMembers enabled."},{"type":"reference","argument":"theme","category":"full","description":" Group Theme"},{"type":"reference","argument":"about","category":"full","description":" Group about"},{"type":"reference","argument":"isAsyncMembers","category":"full","description":" Is Members need to be loaded asynchronous. Default is false."},{"type":"reference","argument":"isSharedHistory","category":"full","description":" Is history shared among all users. Default is false."},{"type":"reference","argument":"shortName","category":"full","description":" Group's short name"},{"type":"reference","argument":"permissions","category":"full","description":" Group Permissions"}],"expandable":"true","attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"id"} +,{"type":{"type":"alias","childType":"date"},"id":6,"name":"createDate"} +,{"type":{"type":"opt","childType":{"type":"alias","childType":"userId"}},"id":5,"name":"ownerUid"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"Member"}},"id":12,"name":"members"} +,{"type":{"type":"opt","childType":"string"},"id":2,"name":"theme"} +,{"type":{"type":"opt","childType":"string"},"id":3,"name":"about"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"MapValue"}},"id":7,"name":"ext"} +,{"type":{"type":"opt","childType":"bool"},"id":11,"name":"isAsyncMembers"} +,{"type":{"type":"opt","childType":"bool"},"id":10,"name":"isSharedHistory"} +,{"type":{"type":"opt","childType":"string"},"id":14,"name":"shortName"} +,{"type":{"type":"opt","childType":"int64"},"id":27,"name":"permissions"} +]}},{"type":"rpc","content":{ +"name":"LoadFullGroups", +"header":2782, +"response":{"type":"anonymous","header":2783, "doc":[ +{"type":"reference","argument":"groups","category":"compact","description":" Groups to load"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"GroupFull"}},"id":1,"name":"groups"} +]}, +"doc":[ +"Loading Full Groups",{"type":"reference","argument":"groups","category":"compact","description":"Groups to load"}],"attributes":[ +{"type":{"type":"list","childType":{"type":"struct","childType":"GroupOutPeer"}},"id":1,"name":"groups"} +]}},{"type":"rpc","content":{ +"name":"LoadMembers", +"header":2786, +"response":{"type":"anonymous","header":2787, "doc":[ +{"type":"reference","argument":"users","category":"full","description":" Group members"},{"type":"reference","argument":"next","category":"full","description":" Load more reference"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"Member"}},"id":3,"name":"members"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":1,"name":"users"} +,{"type":{"type":"opt","childType":"bytes"},"id":2,"name":"next"} +]}, +"doc":[ +"Loading group members",{"type":"reference","argument":"group","category":"full","description":"Group peer"},{"type":"reference","argument":"limit","category":"full","description":"Limit members"},{"type":"reference","argument":"next","category":"full","description":"Load more reference"}],"attributes":[ +{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"group"} +,{"type":"int32","id":2,"name":"limit"} +,{"type":{"type":"opt","childType":"bytes"},"id":3,"name":"next"} +]}},{"type":"comment","content":"Update"},{"type":"update","content":{ +"name":"GroupTitleChanged", +"header":2609, +"doc":[ +"Update about title changed",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"title","category":"full","description":" Group Title"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":"string","id":2,"name":"title"} +]}},{"type":"update","content":{ +"name":"GroupAvatarChanged", +"header":2610, +"doc":[ +"Update about avatar changed",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"avatar","category":"full","description":" Group Avatar"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"Avatar"}},"id":2,"name":"avatar"} +]}},{"type":"update","content":{ +"name":"GroupTopicChanged", +"header":2616, +"doc":[ +"Update about topic changed",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"topic","category":"full","description":" Updated topic"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":{"type":"opt","childType":"string"},"id":2,"name":"topic"} +]}},{"type":"update","content":{ +"name":"GroupAboutChanged", +"header":2617, +"doc":[ +"Update about about changed",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"about","category":"full","description":" Updated about"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":{"type":"opt","childType":"string"},"id":2,"name":"about"} +]}},{"type":"update","content":{ +"name":"GroupExtChanged", +"header":2613, +"doc":[ +"Update about ext changed",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"ext","category":"full","description":" Updated ext"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"MapValue"}},"id":2,"name":"ext"} +]}},{"type":"update","content":{ +"name":"GroupFullExtChanged", +"header":2618, +"doc":[ +"Update about full ext changed",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"ext","category":"full","description":" Updated ext"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"MapValue"}},"id":2,"name":"ext"} +]}},{"type":"update","content":{ +"name":"GroupShortNameChanged", +"header":2628, +"doc":[ +"Group's short name changed",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"shortName","category":"full","description":" Group short name"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":{"type":"opt","childType":"string"},"id":2,"name":"shortName"} +]}},{"type":"update","content":{ +"name":"GroupOwnerChanged", +"header":2619, +"doc":[ +"Update about owner changed",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"userId","category":"full","description":" New Owner"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":{"type":"alias","childType":"userId"},"id":2,"name":"userId"} +]}},{"type":"update","content":{ +"name":"GroupHistoryShared", +"header":2620, +"doc":[ +"Update about history shared",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +]}},{"type":"update","content":{ +"name":"GroupDeleted", +"header":2658, +"doc":[ +"Update about group deleted",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +]}},{"type":"update","content":{ +"name":"GroupPermissionsChanged", +"header":2663, +"doc":[ +"Update about group permissions changed",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"permissions","category":"full","description":" New Permissions"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":"int64","id":2,"name":"permissions"} +]}},{"type":"update","content":{ +"name":"GroupFullPermissionsChanged", +"header":2664, +"doc":[ +"Update about Full Group permissions changed",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"permissions","category":"full","description":" New Permissions"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":"int64","id":2,"name":"permissions"} +]}},{"type":"comment","content":" "},{"type":"update","content":{ +"name":"GroupMemberChanged", +"header":2612, +"doc":[ +"Update about membership changed",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"isMember","category":"full","description":" Is current user a member"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":"bool","id":2,"name":"isMember"} +]}},{"type":"update","content":{ +"name":"GroupMembersBecameAsync", +"header":2615, +"doc":[ +"Update about members became async",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +]}},{"type":"update","content":{ +"name":"GroupMembersUpdated", +"header":2614, +"doc":[ +"Update about members updated",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"members","category":"full","description":" Group Members"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"Member"}},"id":2,"name":"members"} +]}},{"type":"update","content":{ +"name":"GroupMemberDiff", +"header":2623, +"doc":[ +"Update about members changed",{"type":"reference","argument":"removedUsers","category":"full","description":" Removed Users"},{"type":"reference","argument":"addedMembers","category":"full","description":" Added members"},{"type":"reference","argument":"membersCount","category":"full","description":" Current Members count"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":{"type":"list","childType":{"type":"alias","childType":"userId"}},"id":2,"name":"removedUsers"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"Member"}},"id":3,"name":"addedMembers"} +,{"type":"int32","id":4,"name":"membersCount"} +]}},{"type":"update","content":{ +"name":"GroupMembersCountChanged", +"header":2622, +"doc":[ +"Update about members count changed",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"membersCount","category":"full","description":" Members count"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":"int32","id":2,"name":"membersCount"} +]}},{"type":"update","content":{ +"name":"GroupMemberAdminChanged", +"header":2627, +"doc":[ +"Update about member admin changed",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"userId","category":"full","description":" User Id"},{"type":"reference","argument":"isAdmin","category":"full","description":" Is Admin flag"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":{"type":"alias","childType":"userId"},"id":2,"name":"userId"} +,{"type":"bool","id":3,"name":"isAdmin"} +]}},{"type":"comment","content":"Actions"},{"type":"rpc","content":{ +"name":"CreateGroup", +"header":230, +"response":{"type":"anonymous","header":216, "doc":[ +"Created group",{"type":"reference","argument":"seq","category":"full","description":" Update Seq"},{"type":"reference","argument":"state","category":"compact","description":" Update state"},{"type":"reference","argument":"group","category":"full","description":" Created group"},{"type":"reference","argument":"users","category":"full","description":" Referenced users"},{"type":"reference","argument":"userPeers","category":"full","description":" Referenced users"},{"type":"reference","argument":"date","category":"full","description":" Group creation date"}] ,"attributes":[{"type":"int32","id":1,"name":"seq"} +,{"type":{"type":"alias","childType":"seq_state"},"id":2,"name":"state"} +,{"type":{"type":"alias","childType":"date"},"id":6,"name":"date"} +,{"type":{"type":"struct","childType":"Group"},"id":3,"name":"group"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":4,"name":"users"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":5,"name":"userPeers"} +]}, +"doc":[ +"Creating group chat",{"type":"reference","argument":"rid","category":"full","description":"Random Id for avoiding double create"},{"type":"reference","argument":"title","category":"full","description":"Group Title"},{"type":"reference","argument":"users","category":"hidden","description":"Members of group"},{"type":"reference","argument":"groupType","category":"full","description":"Group Type"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled Optimizations"}],"attributes":[ +{"type":{"type":"alias","childType":"randomId"},"id":1,"name":"rid"} +,{"type":"string","id":2,"name":"title"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":3,"name":"users"} +,{"type":{"type":"opt","childType":{"type":"enum","childType":"GroupType"}},"id":6,"name":"groupType"} +,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":7,"name":"optimizations"} +]}},{"type":"rpc","content":{ +"name":"EditGroupTitle", +"header":85, +"response":{"type":"reference","name":"SeqDate"}, +"doc":[ +"Changing group title",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"},{"type":"reference","argument":"title","category":"full","description":"new group title"},{"type":"reference","argument":"rid","category":"full","description":"Random Id of operation"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled Optimizations"}],"attributes":[ +{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"} +,{"type":{"type":"alias","childType":"randomId"},"id":4,"name":"rid"} +,{"type":"string","id":3,"name":"title"} +,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":5,"name":"optimizations"} +]}},{"type":"rpc","content":{ +"name":"EditGroupAvatar", +"header":86, +"response":{"type":"anonymous","header":115, "doc":[ +"Updated group avatar",{"type":"reference","argument":"avatar","category":"compact","description":" Changed avatar"},{"type":"reference","argument":"seq","category":"full","description":" Sequence number"},{"type":"reference","argument":"state","category":"compact","description":" Sequence state"},{"type":"reference","argument":"date","category":"full","description":" Avatar change date"}] ,"attributes":[{"type":{"type":"struct","childType":"Avatar"},"id":1,"name":"avatar"} +,{"type":"int32","id":2,"name":"seq"} +,{"type":{"type":"alias","childType":"seq_state"},"id":3,"name":"state"} +,{"type":{"type":"alias","childType":"date"},"id":4,"name":"date"} +]}, +"doc":[ +"Changing group avatar",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"},{"type":"reference","argument":"fileLocation","category":"compact","description":"uploaded file for avatar"},{"type":"reference","argument":"rid","category":"full","description":"Random Id of operation"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled Optimizations"}],"attributes":[ +{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"} +,{"type":{"type":"alias","childType":"randomId"},"id":4,"name":"rid"} +,{"type":{"type":"struct","childType":"FileLocation"},"id":3,"name":"fileLocation"} +,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":5,"name":"optimizations"} +]}},{"type":"rpc","content":{ +"name":"RemoveGroupAvatar", +"header":101, +"response":{"type":"reference","name":"SeqDate"}, +"doc":[ +"Removing group avatar",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"},{"type":"reference","argument":"rid","category":"full","description":"Random Id of operation"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled Optimizations"}],"attributes":[ +{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"} +,{"type":{"type":"alias","childType":"randomId"},"id":4,"name":"rid"} +,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":5,"name":"optimizations"} +]}},{"type":"rpc","content":{ +"name":"EditGroupShortName", +"header":2793, +"response":{"type":"reference","name":"Seq"}, +"doc":[ +"Edit Group Short Name",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"},{"type":"reference","argument":"shortName","category":"full","description":"New group's short name"}],"attributes":[ +{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"} +,{"type":{"type":"opt","childType":"string"},"id":2,"name":"shortName"} +]}},{"type":"rpc","content":{ +"name":"EditGroupTopic", +"header":211, +"response":{"type":"reference","name":"SeqDate"}, +"doc":[ +"Edit group topic",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"},{"type":"reference","argument":"rid","category":"full","description":"Random id of operation"},{"type":"reference","argument":"topic","category":"full","description":"New Topic"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled Optimizations"}],"attributes":[ +{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"} +,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"rid"} +,{"type":{"type":"opt","childType":"string"},"id":3,"name":"topic"} +,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":4,"name":"optimizations"} +]}},{"type":"rpc","content":{ +"name":"EditGroupAbout", +"header":213, +"response":{"type":"reference","name":"SeqDate"}, +"doc":[ +"Edit Group About",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"},{"type":"reference","argument":"rid","category":"full","description":"Random id of operation"},{"type":"reference","argument":"about","category":"full","description":"New About"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled Optimizations"}],"attributes":[ +{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"} +,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"rid"} +,{"type":{"type":"opt","childType":"string"},"id":3,"name":"about"} +,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":5,"name":"optimizations"} +]}},{"type":"rpc","content":{ +"name":"InviteUser", +"header":69, +"response":{"type":"reference","name":"SeqDate"}, +"doc":[ +"Inviting user to group",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"},{"type":"reference","argument":"user","category":"full","description":"Users for invitation"},{"type":"reference","argument":"rid","category":"full","description":"Random Id of operation"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled Optimizations"}],"attributes":[ +{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"} +,{"type":{"type":"alias","childType":"randomId"},"id":4,"name":"rid"} +,{"type":{"type":"struct","childType":"UserOutPeer"},"id":3,"name":"user"} +,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":5,"name":"optimizations"} +]}},{"type":"rpc","content":{ +"name":"LeaveGroup", +"header":70, +"response":{"type":"reference","name":"SeqDate"}, +"doc":[ +"Leaving group",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"},{"type":"reference","argument":"rid","category":"full","description":"Random Id of operation"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled Optimizations"}],"attributes":[ +{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"} +,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"rid"} +,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":3,"name":"optimizations"} +]}},{"type":"rpc","content":{ +"name":"LeaveAndDelete", +"header":2721, +"response":{"type":"reference","name":"Seq"}, +"doc":[ +"Leave group and Delete Chat",{"type":"reference","argument":"groupPeer","category":"full","description":"Group peer"}],"attributes":[ +{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"} +]}},{"type":"rpc","content":{ +"name":"KickUser", +"header":71, +"response":{"type":"reference","name":"SeqDate"}, +"doc":[ +"Kicking user from group",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"},{"type":"reference","argument":"user","category":"full","description":"users for removing"},{"type":"reference","argument":"rid","category":"full","description":"Random Id of operation"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled Optimizations"}],"attributes":[ +{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"} +,{"type":{"type":"alias","childType":"randomId"},"id":4,"name":"rid"} +,{"type":{"type":"struct","childType":"UserOutPeer"},"id":3,"name":"user"} +,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":5,"name":"optimizations"} +]}},{"type":"rpc","content":{ +"name":"JoinGroupByPeer", +"header":2722, +"response":{"type":"reference","name":"Seq"}, +"doc":[ +"Join group by peer",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"}],"attributes":[ +{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"} +]}},{"type":"rpc","content":{ +"name":"JoinGroupByGroupId", +"header":44561, +"response":{"type":"reference","name":"Seq"}, +"doc":[ +"Join group by peer without a necessity of invite",{"type":"reference","argument":"groupId","category":"hidden","description":"Groups peer"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +]}},{"type":"comment","content":"Administration"},{"type":"rpc","content":{ +"name":"MakeUserAdmin", +"header":2784, +"response":{"type":"reference","name":"SeqDate"}, +"doc":[ +"Make user admin",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"},{"type":"reference","argument":"userPeer","category":"full","description":"User's peer"}],"attributes":[ +{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"} +,{"type":{"type":"struct","childType":"UserOutPeer"},"id":2,"name":"userPeer"} +]}},{"type":"rpc","content":{ +"name":"DismissUserAdmin", +"header":2791, +"response":{"type":"reference","name":"Seq"}, +"doc":[ +"Dismissing user admin",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"},{"type":"reference","argument":"userPeer","category":"full","description":"User's peer"}],"attributes":[ +{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"} +,{"type":{"type":"struct","childType":"UserOutPeer"},"id":2,"name":"userPeer"} +]}},{"type":"rpc","content":{ +"name":"TransferOwnership", +"header":2789, +"response":{"type":"reference","name":"SeqDate"}, +"doc":[ +"Transfer ownership of group",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"},{"type":"reference","argument":"newOwner","category":"full","description":"New group's owner"}],"attributes":[ +{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"} +,{"type":{"type":"struct","childType":"UserOutPeer"},"id":2,"name":"newOwner"} +]}}, { + "type":"struct", + "content": { + "name":"AdminSettings", +"doc":[ +"Admin Settings",{"type":"reference","argument":"showAdminsToMembers","category":"full","description":" Show admins in member list"},{"type":"reference","argument":"canMembersInvite","category":"full","description":" Can members of a group invite people"},{"type":"reference","argument":"canMembersEditGroupInfo","category":"full","description":" Can members edit group info"},{"type":"reference","argument":"canAdminsEditGroupInfo","category":"full","description":" Can admins edit group info"},{"type":"reference","argument":"showJoinLeaveMessages","category":"full","description":" Should join and leave messages be visible to members"}],"expandable":"true","attributes":[ +{"type":"bool","id":1,"name":"showAdminsToMembers"} +,{"type":"bool","id":2,"name":"canMembersInvite"} +,{"type":"bool","id":3,"name":"canMembersEditGroupInfo"} +,{"type":"bool","id":4,"name":"canAdminsEditGroupInfo"} +,{"type":"bool","id":5,"name":"showJoinLeaveMessages"} +]}},{"type":"rpc","content":{ +"name":"LoadAdminSettings", +"header":2790, +"response":{"type":"anonymous","header":2794, "doc":[ +"Loaded settings",{"type":"reference","argument":"settings","category":"full","description":" Current group admin settings"}] ,"attributes":[{"type":{"type":"struct","childType":"AdminSettings"},"id":1,"name":"settings"} +]}, +"doc":[ +"Loading administration settings",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"}],"attributes":[ +{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"} +]}},{"type":"rpc","content":{ +"name":"SaveAdminSettings", +"header":2792, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Save administartion settings",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's Peer"},{"type":"reference","argument":"settings","category":"full","description":"Group's settings"}],"attributes":[ +{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"} +,{"type":{"type":"struct","childType":"AdminSettings"},"id":2,"name":"settings"} +]}},{"type":"rpc","content":{ +"name":"DeleteGroup", +"header":2795, +"response":{"type":"reference","name":"Seq"}, +"doc":[ +"Delete Group",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"}],"attributes":[ +{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"} +]}},{"type":"rpc","content":{ +"name":"ShareHistory", +"header":2796, +"response":{"type":"reference","name":"Seq"}, +"doc":[ +"Share History",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"}],"attributes":[ +{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"} +]}},{"type":"comment","content":"Invite"},{"type":"response","content":{ +"name":"InviteUrl", +"header":178, +"doc":[ +"Response for invite url methods"],"attributes":[ +{"type":"string","id":1,"name":"url"} +]}},{"type":"rpc","content":{ +"name":"GetGroupInviteUrl", +"header":177, +"response":{"type":"reference","name":"InviteUrl"}, +"doc":[ +"Building invite url",{"type":"reference","argument":"groupPeer","category":"full","description":"Destination group peer"}],"attributes":[ +{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"} +]}},{"type":"rpc","content":{ +"name":"RevokeInviteUrl", +"header":179, +"response":{"type":"reference","name":"InviteUrl"}, +"doc":[ +"Revoking invite urls",{"type":"reference","argument":"groupPeer","category":"full","description":"Destination group peer"}],"attributes":[ +{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"} +]}},{"type":"rpc","content":{ +"name":"JoinGroup", +"header":180, +"response":{"type":"anonymous","header":181, "doc":[ +{"type":"reference","argument":"group","category":"hidden","description":" Joined group"},{"type":"reference","argument":"users","category":"hidden","description":" Users from members"},{"type":"reference","argument":"userPeers","category":"hidden","description":" User Peers"},{"type":"reference","argument":"rid","category":"full","description":" Random id"},{"type":"reference","argument":"seq","category":"full","description":" Sequence number"},{"type":"reference","argument":"state","category":"hidden","description":" State"},{"type":"reference","argument":"date","category":"full","description":" Date of join"}] ,"attributes":[{"type":{"type":"struct","childType":"Group"},"id":1,"name":"group"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":5,"name":"users"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":7,"name":"userPeers"} +,{"type":{"type":"alias","childType":"randomId"},"id":6,"name":"rid"} +,{"type":"int32","id":2,"name":"seq"} +,{"type":{"type":"alias","childType":"seq_state"},"id":3,"name":"state"} +,{"type":{"type":"alias","childType":"date"},"id":4,"name":"date"} +]}, +"doc":[ +"Join group method",{"type":"reference","argument":"token","category":"full","description":"Url or Token for joining to group"},{"type":"reference","argument":"optimizations","category":"hidden","description":"Enabled Optimizations"}],"attributes":[ +{"type":"string","id":1,"name":"token"} +,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":2,"name":"optimizations"} +]}},{"type":"comment","content":"Obsolete Actions"},{"type":"rpc","content":{ +"name":"CreateGroupObsolete", +"header":65, +"response":{"type":"anonymous","header":66, "doc":[ +"Created group",{"type":"reference","argument":"groupPeer","category":"full","description":" Peer of created group"},{"type":"reference","argument":"seq","category":"full","description":" Sequence number"},{"type":"reference","argument":"state","category":"compact","description":" Sequence state"},{"type":"reference","argument":"users","category":"compact","description":" Members of created group"},{"type":"reference","argument":"date","category":"full","description":" Group creation date"}] ,"attributes":[{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"} +,{"type":"int32","id":3,"name":"seq"} +,{"type":{"type":"alias","childType":"seq_state"},"id":4,"name":"state"} +,{"type":{"type":"list","childType":"int32"},"id":5,"name":"users"} +,{"type":{"type":"alias","childType":"date"},"id":6,"name":"date"} +]}, +"doc":[ +"[OBSOLETE] Creating group chat",{"type":"reference","argument":"rid","category":"full","description":"Random Id for avoiding double create"},{"type":"reference","argument":"title","category":"full","description":"Title of new group"},{"type":"reference","argument":"users","category":"compact","description":"Members of new group"}],"attributes":[ +{"type":{"type":"alias","childType":"randomId"},"id":1,"name":"rid"} +,{"type":"string","id":2,"name":"title"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":3,"name":"users"} +]}},{"type":"rpc","content":{ +"name":"EnterGroupObsolete", +"header":199, +"response":{"type":"anonymous","header":200, "doc":[ +"Joined group",{"type":"reference","argument":"group","category":"full","description":" Joined group"},{"type":"reference","argument":"users","category":"full","description":" Referenced users"},{"type":"reference","argument":"rid","category":"full","description":" Rid of join message"},{"type":"reference","argument":"seq","category":"full","description":" Seq of Update"},{"type":"reference","argument":"state","category":"full","description":" State of Update"},{"type":"reference","argument":"date","category":"full","description":" Date of update"}] ,"attributes":[{"type":{"type":"struct","childType":"Group"},"id":1,"name":"group"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":2,"name":"users"} +,{"type":{"type":"alias","childType":"randomId"},"id":3,"name":"rid"} +,{"type":"int32","id":4,"name":"seq"} +,{"type":{"type":"alias","childType":"seq_state"},"id":5,"name":"state"} +,{"type":{"type":"alias","childType":"date"},"id":6,"name":"date"} +]}, +"doc":[ +"[OBSOLETE] Join random group by peer id",{"type":"reference","argument":"peer","category":"full","description":"Public group peer"}],"attributes":[ +{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"peer"} +]}},{"type":"rpc","content":{ +"name":"MakeUserAdminObsolete", +"header":214, +"response":{"type":"anonymous","header":215, "doc":[ +{"type":"reference","argument":"members","category":"full","description":" new members"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"Member"}},"id":1,"name":"members"} +,{"type":"int32","id":2,"name":"seq"} +,{"type":{"type":"alias","childType":"seq_state"},"id":3,"name":"state"} +]}, +"doc":[ +"[OBSOLETE] Make user admin",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"},{"type":"reference","argument":"userPeer","category":"full","description":"User's peer"}],"attributes":[ +{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"} +,{"type":{"type":"struct","childType":"UserOutPeer"},"id":2,"name":"userPeer"} +]}},{"type":"comment","content":"Obsolete Updates"},{"type":"update","content":{ +"name":"GroupInviteObsolete", +"header":36, +"doc":[ +"Update about inviting current user to group",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"inviteUid","category":"full","description":" Inviter UID. If equals to current uid than group created by user."},{"type":"reference","argument":"date","category":"full","description":" Date of creating"},{"type":"reference","argument":"rid","category":"full","description":" Random Id of operation"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":{"type":"alias","childType":"randomId"},"id":9,"name":"rid"} +,{"type":{"type":"alias","childType":"userId"},"id":5,"name":"inviteUid"} +,{"type":{"type":"alias","childType":"date"},"id":8,"name":"date"} +]}},{"type":"update","content":{ +"name":"GroupUserInvitedObsolete", +"header":21, +"doc":[ +"Update about inviting user to group",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"uid","category":"full","description":" Added user ID"},{"type":"reference","argument":"inviterUid","category":"full","description":" Inviter user ID"},{"type":"reference","argument":"date","category":"full","description":" Date of adding user to group"},{"type":"reference","argument":"rid","category":"full","description":" Random Id of operation"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":{"type":"alias","childType":"randomId"},"id":5,"name":"rid"} +,{"type":{"type":"alias","childType":"userId"},"id":2,"name":"uid"} +,{"type":{"type":"alias","childType":"userId"},"id":3,"name":"inviterUid"} +,{"type":{"type":"alias","childType":"date"},"id":4,"name":"date"} +]}},{"type":"update","content":{ +"name":"GroupUserLeaveObsolete", +"header":23, +"doc":[ +"Update about leaving user",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"uid","category":"full","description":" User's ID"},{"type":"reference","argument":"date","category":"full","description":" Date of user leave"},{"type":"reference","argument":"rid","category":"full","description":" Random Id of operation"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":{"type":"alias","childType":"randomId"},"id":4,"name":"rid"} +,{"type":{"type":"alias","childType":"userId"},"id":2,"name":"uid"} +,{"type":{"type":"alias","childType":"date"},"id":3,"name":"date"} +]}},{"type":"update","content":{ +"name":"GroupUserKickObsolete", +"header":24, +"doc":[ +"Update about kicking user",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"uid","category":"full","description":" Kicked user's ID"},{"type":"reference","argument":"kickerUid","category":"full","description":" Kicker user's ID"},{"type":"reference","argument":"date","category":"full","description":" Date of user kick"},{"type":"reference","argument":"rid","category":"full","description":" Random Id of operation"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":{"type":"alias","childType":"randomId"},"id":5,"name":"rid"} +,{"type":{"type":"alias","childType":"userId"},"id":2,"name":"uid"} +,{"type":{"type":"alias","childType":"userId"},"id":3,"name":"kickerUid"} +,{"type":{"type":"alias","childType":"date"},"id":4,"name":"date"} +]}},{"type":"update","content":{ +"name":"GroupMembersUpdateObsolete", +"header":44, +"doc":[ +"Silent group members update",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"members","category":"full","description":" New members list"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"Member"}},"id":2,"name":"members"} +]}},{"type":"update","content":{ +"name":"GroupTitleChangedObsolete", +"header":38, +"doc":[ +"Update about group title change",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"uid","category":"full","description":" Changer UID"},{"type":"reference","argument":"title","category":"full","description":" New Title of group"},{"type":"reference","argument":"date","category":"full","description":" Date of title change"},{"type":"reference","argument":"rid","category":"full","description":" Random Id of operation"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":{"type":"alias","childType":"randomId"},"id":5,"name":"rid"} +,{"type":{"type":"alias","childType":"userId"},"id":2,"name":"uid"} +,{"type":"string","id":3,"name":"title"} +,{"type":{"type":"alias","childType":"date"},"id":4,"name":"date"} +]}},{"type":"update","content":{ +"name":"GroupTopicChangedObsolete", +"header":213, +"doc":[ +"Update about group topic change",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"uid","category":"full","description":" Changer UID"},{"type":"reference","argument":"topic","category":"full","description":" New topic of group"},{"type":"reference","argument":"date","category":"full","description":" Date of theme change"},{"type":"reference","argument":"rid","category":"full","description":" Randomd Id of operation"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"rid"} +,{"type":{"type":"alias","childType":"userId"},"id":3,"name":"uid"} +,{"type":{"type":"opt","childType":"string"},"id":4,"name":"topic"} +,{"type":{"type":"alias","childType":"date"},"id":5,"name":"date"} +]}},{"type":"update","content":{ +"name":"GroupAboutChangedObsolete", +"header":214, +"doc":[ +"Update about group about change",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"about","category":"full","description":" Group about"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":{"type":"opt","childType":"string"},"id":2,"name":"about"} +]}},{"type":"update","content":{ +"name":"GroupAvatarChangedObsolete", +"header":39, +"doc":[ +"Update about group avatar change",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"uid","category":"full","description":" Avatar changer uid"},{"type":"reference","argument":"avatar","category":"compact","description":" New Avatar. If null then avatar is removed"},{"type":"reference","argument":"date","category":"full","description":" Date of avatar change"},{"type":"reference","argument":"rid","category":"full","description":" Random Id of operation"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":{"type":"alias","childType":"randomId"},"id":5,"name":"rid"} +,{"type":{"type":"alias","childType":"userId"},"id":2,"name":"uid"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"Avatar"}},"id":3,"name":"avatar"} +,{"type":{"type":"alias","childType":"date"},"id":4,"name":"date"} +]}}]}, { + "title": "Stickers", + "package": "stickers", + "doc": [ + "Stickers support in Actor" + ], + "items": [ + { + "type":"struct", + "content": { + "name":"StickerDescriptor", +"doc":[ +"Descriptor of a Sticker",{"type":"reference","argument":"id","category":"full","description":" Sticker unique id"},{"type":"reference","argument":"emoji","category":"full","description":" Emoji code for sticker"},{"type":"reference","argument":"image128","category":"full","description":" Image of sticker 128x128 in WebP format"},{"type":"reference","argument":"image512","category":"full","description":" Image of sticker 512x512 in WebP format"},{"type":"reference","argument":"image256","category":"full","description":" Image of sticker 256x256 in WebP format"}],"expandable":"true","attributes":[ +{"type":"int32","id":1,"name":"id"} +,{"type":{"type":"opt","childType":"string"},"id":2,"name":"emoji"} +,{"type":{"type":"struct","childType":"ImageLocation"},"id":3,"name":"image128"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"ImageLocation"}},"id":4,"name":"image512"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"ImageLocation"}},"id":5,"name":"image256"} +]}}, { + "type":"struct", + "content": { + "name":"StickerCollection", +"doc":[ +"Sticker collection",{"type":"reference","argument":"id","category":"full","description":" Unique id of a collection"},{"type":"reference","argument":"accessHash","category":"full","description":" Access Hash of a collection"},{"type":"reference","argument":"stickers","category":"compact","description":" Sticker list"}],"expandable":"true","attributes":[ +{"type":"int32","id":1,"name":"id"} +,{"type":"int64","id":2,"name":"accessHash"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"StickerDescriptor"}},"id":3,"name":"stickers"} +]}},{"type":"response","content":{ +"name":"StickersReponse", +"header":240, +"doc":[ +"Stickers response",{"type":"reference","argument":"collections","category":"full","description":" Sticker collections"},{"type":"reference","argument":"seq","category":"full","description":" Seq of update"},{"type":"reference","argument":"state","category":"full","description":" State of update"}],"attributes":[ +{"type":{"type":"list","childType":{"type":"struct","childType":"StickerCollection"}},"id":1,"name":"collections"} +,{"type":"int32","id":2,"name":"seq"} +,{"type":{"type":"alias","childType":"seq_state"},"id":3,"name":"state"} +]}},{"type":"rpc","content":{ +"name":"LoadOwnStickers", +"header":238, +"response":{"type":"anonymous","header":239, "doc":[ +"Own Stickers collections",{"type":"reference","argument":"ownStickers","category":"hidden","description":" Own sticker collections"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"StickerCollection"}},"id":1,"name":"ownStickers"} +]}, +"doc":[ +"Loading own stickers"],"attributes":[ +]}},{"type":"update","content":{ +"name":"OwnStickersChanged", +"header":161, +"doc":[ +"Own Stickers changed",{"type":"reference","argument":"collections","category":"compact","description":" New own sticker collections"}],"attributes":[ +{"type":{"type":"list","childType":{"type":"struct","childType":"StickerCollection"}},"id":1,"name":"collections"} +]}},{"type":"update","content":{ +"name":"StickerCollectionsChanged", +"header":164, +"doc":[ +"Sticker collection changed",{"type":"reference","argument":"collections","category":"full","description":" Updated sticker collections"}],"attributes":[ +{"type":{"type":"list","childType":{"type":"struct","childType":"StickerCollection"}},"id":1,"name":"collections"} +]}},{"type":"rpc","content":{ +"name":"AddStickerCollection", +"header":244, +"response":{"type":"reference","name":"StickersReponse"}, +"doc":[ +"Adding sticker collection",{"type":"reference","argument":"id","category":"full","description":"Collection id"},{"type":"reference","argument":"accessHash","category":"full","description":"Collection access hash"}],"attributes":[ +{"type":"int32","id":1,"name":"id"} +,{"type":"int64","id":2,"name":"accessHash"} +]}},{"type":"rpc","content":{ +"name":"RemoveStickerCollection", +"header":245, +"response":{"type":"reference","name":"StickersReponse"}, +"doc":[ +"Removing sticker collection",{"type":"reference","argument":"id","category":"full","description":"Collection id"},{"type":"reference","argument":"accessHash","category":"full","description":"Collection access hash"}],"attributes":[ +{"type":"int32","id":1,"name":"id"} +,{"type":"int64","id":2,"name":"accessHash"} +]}},{"type":"rpc","content":{ +"name":"LoadStickerCollection", +"header":246, +"response":{"type":"anonymous","header":247, "doc":[ +"Loaded collection",{"type":"reference","argument":"collection","category":"full","description":" Collection of stickers"}] ,"attributes":[{"type":{"type":"struct","childType":"StickerCollection"},"id":1,"name":"collection"} +]}, +"doc":[ +"Loading stickers",{"type":"reference","argument":"id","category":"full","description":"Collection id"},{"type":"reference","argument":"accessHash","category":"full","description":"Collection access hash"}],"attributes":[ +{"type":"int32","id":1,"name":"id"} +,{"type":"int64","id":2,"name":"accessHash"} +]}}]}, { + "title": "Search", + "package": "search", + "doc": [ + "Searching API" + ], + "items": [ { - "type": "rpc", + "type": "enum", "content": { - "name": "StartTokenAuth", - "header": 203, - "response": { - "type": "reference", - "name": "Auth" - }, - "doc": [ - "Starting token-based login", + "name": "SearchPeerType", + "values": [ { - "type": "reference", - "argument": "token", - "category": "full", - "description": "Token for authentication" + "name": "Groups", + "id": 1 }, { - "type": "reference", - "argument": "appId", - "category": "hidden", - "description": "Application Id" + "name": "Contacts", + "id": 2 }, { - "type": "reference", - "argument": "apiKey", - "category": "hidden", - "description": "Application API key" - }, + "name": "Public", + "id": 3 + } + ] + } + }, { + "type": "enum", + "content": { + "name": "SearchContentType", + "values": [ { - "type": "reference", - "argument": "deviceHash", - "category": "full", - "description": "Hash of device unique id and app bundle id. Used for autologout users when app is reinstalled" + "name": "Any", + "id": 1 }, { - "type": "reference", - "argument": "deviceTitle", - "category": "full", - "description": "Device Title" - }, - { - "type": "reference", - "argument": "timeZone", - "category": "full", - "description": "TimeZone of device" - }, - { - "type": "reference", - "argument": "preferredLanguages", - "category": "full", - "description": "Preferred languages" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "token" - }, - { - "type": "int32", - "id": 2, - "name": "appId" - }, - { - "type": "string", - "id": 3, - "name": "apiKey" - }, - { - "type": "bytes", - "id": 4, - "name": "deviceHash" - }, - { - "type": "string", - "id": 5, - "name": "deviceTitle" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 6, - "name": "timeZone" - }, - { - "type": { - "type": "list", - "childType": "string" - }, - "id": 7, - "name": "preferredLanguages" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "StartUsernameAuth", - "header": 2571, - "response": { - "type": "anonymous", - "header": 2572, - "doc": [ - "Result of login auth start. If is not registered move to signup.", - { - "type": "reference", - "argument": "transactionHash", - "category": "danger", - "description": " Authentication transaction hash" - }, - { - "type": "reference", - "argument": "isRegistered", - "category": "full", - "description": " If user is registered with this username" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "transactionHash" - }, - { - "type": "bool", - "id": 2, - "name": "isRegistered" - } - ] - }, - "doc": [ - "Starting Login Authentication", - { - "type": "reference", - "argument": "username", - "category": "full", - "description": "Username for signing in" - }, - { - "type": "reference", - "argument": "appId", - "category": "hidden", - "description": "Application id" - }, - { - "type": "reference", - "argument": "apiKey", - "category": "hidden", - "description": "Application API key" - }, - { - "type": "reference", - "argument": "deviceHash", - "category": "full", - "description": "Hash of device unique id and app bundle id. Used for autologout users when app is reinstalled" - }, - { - "type": "reference", - "argument": "deviceTitle", - "category": "full", - "description": "Device Title" - }, - { - "type": "reference", - "argument": "timeZone", - "category": "full", - "description": "Time Zone of device" - }, - { - "type": "reference", - "argument": "preferredLanguages", - "category": "full", - "description": "Preferred languages of device" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "username" - }, - { - "type": "int32", - "id": 2, - "name": "appId" - }, - { - "type": "string", - "id": 3, - "name": "apiKey" - }, - { - "type": "bytes", - "id": 4, - "name": "deviceHash" - }, - { - "type": "string", - "id": 5, - "name": "deviceTitle" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 6, - "name": "timeZone" - }, - { - "type": { - "type": "list", - "childType": "string" - }, - "id": 7, - "name": "preferredLanguages" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "ValidateCode", - "header": 189, - "response": { - "type": "reference", - "name": "Auth" - }, - "doc": [ - "Performing user sign in.", - { - "type": "reference", - "argument": "transactionHash", - "category": "danger", - "description": "Hash of transaction" - }, - { - "type": "reference", - "argument": "code", - "category": "hidden", - "description": "Activation code" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "transactionHash" - }, - { - "type": "string", - "id": 2, - "name": "code" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "ValidatePassword", - "header": 207, - "response": { - "type": "reference", - "name": "Auth" - }, - "doc": [ - "Validation of account password", - { - "type": "reference", - "argument": "transactionHash", - "category": "full", - "description": "Hash of transaction" - }, - { - "type": "reference", - "argument": "password", - "category": "full", - "description": "Password for account" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "transactionHash" - }, - { - "type": "string", - "id": 2, - "name": "password" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "GetOAuth2Params", - "header": 194, - "response": { - "type": "anonymous", - "header": 195, - "doc": [ - { - "type": "reference", - "argument": "authUrl", - "category": "hidden", - "description": " Authentication url" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "authUrl" - } - ] - }, - "doc": [ - "Loading OAuth2 Parameters", - { - "type": "reference", - "argument": "transactionHash", - "category": "danger", - "description": "Hash of transaction" - }, - { - "type": "reference", - "argument": "redirectUrl", - "category": "full", - "description": "Redirect URL for Application" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "transactionHash" - }, - { - "type": "string", - "id": 2, - "name": "redirectUrl" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "CompleteOAuth2", - "header": 196, - "response": { - "type": "reference", - "name": "Auth" - }, - "doc": [ - "Complete OAuth2 Authentication", - { - "type": "reference", - "argument": "transactionHash", - "category": "danger", - "description": "Hash of transaction" - }, - { - "type": "reference", - "argument": "code", - "category": "danger", - "description": "Authentication Code" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "transactionHash" - }, - { - "type": "string", - "id": 2, - "name": "code" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "SignUp", - "header": 190, - "response": { - "type": "reference", - "name": "Auth" - }, - "doc": [ - "Perform user SignUp", - { - "type": "reference", - "argument": "transactionHash", - "category": "danger", - "description": "Hash of transaction" - }, - { - "type": "reference", - "argument": "name", - "category": "full", - "description": "User name" - }, - { - "type": "reference", - "argument": "sex", - "category": "full", - "description": "Optional user sex" - }, - { - "type": "reference", - "argument": "password", - "category": "full", - "description": "Password for password-based accounts" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "transactionHash" - }, - { - "type": "string", - "id": 2, - "name": "name" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "enum", - "childType": "Sex" - } - }, - "id": 3, - "name": "sex" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 4, - "name": "password" - } - ] - } - }, - { - "type": "response", - "content": { - "name": "Auth", - "header": 5, - "doc": [ - "Authentication result", - { - "type": "reference", - "argument": "user", - "category": "compact", - "description": " The authenticated User" - }, - { - "type": "reference", - "argument": "config", - "category": "full", - "description": " Current config of server" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "User" - }, - "id": 2, - "name": "user" - }, - { - "type": { - "type": "struct", - "childType": "Config" - }, - "id": 3, - "name": "config" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "AuthSession", - "doc": [ - "Authentication session", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": " Unuque ID of session" - }, - { - "type": "reference", - "argument": "authHolder", - "category": "full", - "description": " holder of session. 0 - this device, 1 - other." - }, - { - "type": "reference", - "argument": "appId", - "category": "full", - "description": " Application Id (user in SignIn/SignUp)" - }, - { - "type": "reference", - "argument": "appTitle", - "category": "full", - "description": " Title of application" - }, - { - "type": "reference", - "argument": "deviceTitle", - "category": "full", - "description": " Title of device" - }, - { - "type": "reference", - "argument": "authTime", - "category": "full", - "description": " Time of session creating" - }, - { - "type": "reference", - "argument": "authLocation", - "category": "hidden", - "description": " two-letter country code of session create" - }, - { - "type": "reference", - "argument": "latitude", - "category": "hidden", - "description": " optional latitude of auth if available" - }, - { - "type": "reference", - "argument": "longitude", - "category": "hidden", - "description": " optional longitude of auth if available" - } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "id" - }, - { - "type": { - "type": "enum", - "childType": "AuthHolder" - }, - "id": 2, - "name": "authHolder" - }, - { - "type": "int32", - "id": 3, - "name": "appId" - }, - { - "type": "string", - "id": 4, - "name": "appTitle" - }, - { - "type": "string", - "id": 5, - "name": "deviceTitle" - }, - { - "type": "int32", - "id": 6, - "name": "authTime" - }, - { - "type": "string", - "id": 7, - "name": "authLocation" - }, - { - "type": { - "type": "opt", - "childType": "double" - }, - "id": 8, - "name": "latitude" - }, - { - "type": { - "type": "opt", - "childType": "double" - }, - "id": 9, - "name": "longitude" - } - ] - } - }, - { - "type": "enum", - "content": { - "name": "AuthHolder", - "values": [ - { - "name": "ThisDevice", - "id": 1 - }, - { - "name": "OtherDevice", - "id": 2 - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "GetAuthSessions", - "header": 80, - "response": { - "type": "anonymous", - "header": 81, - "doc": [ - "Current Auth sessions", - { - "type": "reference", - "argument": "userAuths", - "category": "compact", - "description": " User authentications" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "AuthSession" - } - }, - "id": 1, - "name": "userAuths" - } - ] - }, - "doc": [ - "Getting of all active user's authentication sessions" - ], - "attributes": [] - } - }, - { - "type": "rpc", - "content": { - "name": "TerminateSession", - "header": 82, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "SignOut on specified user's session", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": "id from AuthItem" - } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "id" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "TerminateAllSessions", - "header": 83, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "SignOut on all exept current sessions" - ], - "attributes": [] - } - }, - { - "type": "rpc", - "content": { - "name": "SignOut", - "header": 84, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "SignOut current session" - ], - "attributes": [] - } - }, - { - "type": "comment", - "content": "OBSOLETE METHODS" - }, - { - "type": "rpc", - "content": { - "name": "SignInObsolete", - "header": 3, - "response": { - "type": "reference", - "name": "Auth" - }, - "doc": [ - "Performing user signin", - { - "type": "reference", - "argument": "phoneNumber", - "category": "danger", - "description": "Phone number in international format" - }, - { - "type": "reference", - "argument": "smsHash", - "category": "danger", - "description": "Code request hash from RequestAuthCode" - }, - { - "type": "reference", - "argument": "smsCode", - "category": "danger", - "description": "Confirmation code from SMS" - }, - { - "type": "reference", - "argument": "deviceHash", - "category": "full", - "description": "Hash of device unique id and app bundle id. Used for autologout users when app is reinstalled" - }, - { - "type": "reference", - "argument": "deviceTitle", - "category": "full", - "description": "Device title like 'Steven's iPhone'" - }, - { - "type": "reference", - "argument": "appId", - "category": "hidden", - "description": "Application ID" - }, - { - "type": "reference", - "argument": "appKey", - "category": "hidden", - "description": "Application API key" - } - ], - "attributes": [ - { - "type": "int64", - "id": 1, - "name": "phoneNumber" - }, - { - "type": "string", - "id": 2, - "name": "smsHash" - }, - { - "type": "string", - "id": 3, - "name": "smsCode" - }, - { - "type": "bytes", - "id": 5, - "name": "deviceHash" - }, - { - "type": "string", - "id": 6, - "name": "deviceTitle" - }, - { - "type": "int32", - "id": 7, - "name": "appId" - }, - { - "type": "string", - "id": 8, - "name": "appKey" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "SignUpObsolete", - "header": 4, - "response": { - "type": "reference", - "name": "Auth" - }, - "doc": [ - "Performing user signup. If user perform signup on already registered user it just override previous", - "profile information", - { - "type": "reference", - "argument": "phoneNumber", - "category": "danger", - "description": "Phone number in international format" - }, - { - "type": "reference", - "argument": "smsHash", - "category": "danger", - "description": "Code request hash from RequestAuthCode" - }, - { - "type": "reference", - "argument": "smsCode", - "category": "danger", - "description": "Confirmation code from SMS" - }, - { - "type": "reference", - "argument": "name", - "category": "full", - "description": "User name" - }, - { - "type": "reference", - "argument": "deviceHash", - "category": "full", - "description": "Hash of device unique id and app bundle id. Used for autologout users when app is reinstalled" - }, - { - "type": "reference", - "argument": "deviceTitle", - "category": "full", - "description": "Device title like 'Steven's iPhone'" - }, - { - "type": "reference", - "argument": "appId", - "category": "hidden", - "description": "Application ID" - }, - { - "type": "reference", - "argument": "appKey", - "category": "hidden", - "description": "pplication API key" - } - ], - "attributes": [ - { - "type": "int64", - "id": 1, - "name": "phoneNumber" - }, - { - "type": "string", - "id": 2, - "name": "smsHash" - }, - { - "type": "string", - "id": 3, - "name": "smsCode" - }, - { - "type": "string", - "id": 4, - "name": "name" - }, - { - "type": "bytes", - "id": 7, - "name": "deviceHash" - }, - { - "type": "string", - "id": 8, - "name": "deviceTitle" - }, - { - "type": "int32", - "id": 9, - "name": "appId" - }, - { - "type": "string", - "id": 10, - "name": "appKey" - }, - { - "type": "bool", - "id": 11, - "name": "isSilent" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "SendAuthCodeObsolete", - "header": 1, - "response": { - "type": "anonymous", - "header": 2, - "doc": [ - "Sms Request response", - { - "type": "reference", - "argument": "smsHash", - "category": "danger", - "description": " Hash of SMS request" - }, - { - "type": "reference", - "argument": "isRegistered", - "category": "full", - "description": " true if user is registered" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "smsHash" - }, - { - "type": "bool", - "id": 2, - "name": "isRegistered" - } - ] - }, - "doc": [ - "Sending SMS with activation code", - { - "type": "reference", - "argument": "phoneNumber", - "category": "full", - "description": "Phone number in international format" - }, - { - "type": "reference", - "argument": "appId", - "category": "hidden", - "description": "Application ID" - }, - { - "type": "reference", - "argument": "apiKey", - "category": "hidden", - "description": "Application API key" - } - ], - "attributes": [ - { - "type": "int64", - "id": 1, - "name": "phoneNumber" - }, - { - "type": "int32", - "id": 2, - "name": "appId" - }, - { - "type": "string", - "id": 3, - "name": "apiKey" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "SendAuthCallObsolete", - "header": 90, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Requesting Phone activation", - { - "type": "reference", - "argument": "phoneNumber", - "category": "full", - "description": "Phone number in international format" - }, - { - "type": "reference", - "argument": "smsHash", - "category": "danger", - "description": "Code request hash from RequestAuthCode" - }, - { - "type": "reference", - "argument": "appId", - "category": "hidden", - "description": "Application ID" - }, - { - "type": "reference", - "argument": "apiKey", - "category": "hidden", - "description": "Application API key" - } - ], - "attributes": [ - { - "type": "int64", - "id": 1, - "name": "phoneNumber" - }, - { - "type": "string", - "id": 2, - "name": "smsHash" - }, - { - "type": "int32", - "id": 3, - "name": "appId" - }, - { - "type": "string", - "id": 4, - "name": "apiKey" - } - ] - } - } - ] - }, - { - "title": "Users", - "package": "users", - "doc": [ - "Users are objects that secured by accessHash. You can't load user profile by it's id.", - "You can't send message to user without finding it's object in Updates or by calling", - "method for user search, contacts import or some other methods.", - "", - "Applications need to keep all Users information forever.", - "", - "Each User have optional localName - name of user that was set by current user and can be changed", - "any time by calling EditUserLocalName method." - ], - "items": [ - { - "type": "enum", - "content": { - "name": "Sex", - "values": [ - { - "name": "Unknown", - "id": 1 - }, - { - "name": "Male", - "id": 2 - }, - { - "name": "Female", - "id": 3 - } - ] - } - }, - { - "type": "enum", - "content": { - "name": "ContactType", - "values": [ - { - "name": "Phone", - "id": 1 - }, - { - "name": "Email", - "id": 2 - }, - { - "name": "Web", - "id": 3 - }, - { - "name": "Social", - "id": 4 - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "ContactRecord", - "doc": [ - "Contact information record", - { - "type": "reference", - "argument": "type", - "category": "full", - "description": " Record type" - }, - { - "type": "reference", - "argument": "typeSpec", - "category": "hidden", - "description": " Value for specification type of contact, for example 'mobile/standalone/office' for phones or 'vk/fb/telegram' for extenrnal networks." - }, - { - "type": "reference", - "argument": "stringValue", - "category": "full", - "description": " String value of record" - }, - { - "type": "reference", - "argument": "longValue", - "category": "full", - "description": " Long value of record" - }, - { - "type": "reference", - "argument": "title", - "category": "full", - "description": " Title of record" - }, - { - "type": "reference", - "argument": "subtitle", - "category": "hidden", - "description": " Subtitle of record" - } - ], - "expandable": "true", - "attributes": [ - { - "type": { - "type": "enum", - "childType": "ContactType" - }, - "id": 1, - "name": "type" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 6, - "name": "typeSpec" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 2, - "name": "stringValue" - }, - { - "type": { - "type": "opt", - "childType": "int64" - }, - "id": 3, - "name": "longValue" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 4, - "name": "title" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 5, - "name": "subtitle" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "User", - "doc": [ - "Main user object", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": " uid" - }, - { - "type": "reference", - "argument": "accessHash", - "category": "danger", - "description": " user's access hash" - }, - { - "type": "reference", - "argument": "name", - "category": "full", - "description": " user's name" - }, - { - "type": "reference", - "argument": "localName", - "category": "full", - "description": " user's local name" - }, - { - "type": "reference", - "argument": "nick", - "category": "full", - "description": " User's nickname" - }, - { - "type": "reference", - "argument": "sex", - "category": "full", - "description": " optional sex of user" - }, - { - "type": "reference", - "argument": "avatar", - "category": "compact", - "description": " avatar of user" - }, - { - "type": "reference", - "argument": "isBot", - "category": "full", - "description": " Is user actually bot. By default is false." - }, - { - "type": "reference", - "argument": "ext", - "category": "full", - "description": " Extension values" - }, - { - "type": "reference", - "argument": "about", - "category": "full", - "description": " [DEPRECATED] User's about information" - }, - { - "type": "reference", - "argument": "contactInfo", - "category": "compact", - "description": " [DEPRECATED] Contact information of user" - }, - { - "type": "reference", - "argument": "preferredLanguages", - "category": "full", - "description": " [DEPRECATED] Preferred user languages" - }, - { - "type": "reference", - "argument": "timeZone", - "category": "full", - "description": " [DEPRECATED] Time Zone of user in TZ format" - }, - { - "type": "reference", - "argument": "botCommands", - "category": "full", - "description": " [DEPRECATED] Available Bot Commands" - } - ], - "expandable": "true", - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "id" - }, - { - "type": "int64", - "id": 2, - "name": "accessHash" - }, - { - "type": "string", - "id": 3, - "name": "name" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 4, - "name": "localName" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 13, - "name": "nick" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "enum", - "childType": "Sex" - } - }, - "id": 5, - "name": "sex" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "Avatar" - } - }, - "id": 8, - "name": "avatar" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 11, - "name": "isBot" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "MapValue" - } - }, - "id": 20, - "name": "ext" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "ContactRecord" - } - }, - "id": 12, - "name": "contactInfo", - "deprecated": "true" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 14, - "name": "about", - "deprecated": "true" - }, - { - "type": { - "type": "list", - "childType": "string" - }, - "id": 16, - "name": "preferredLanguages", - "deprecated": "true" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 17, - "name": "timeZone", - "deprecated": "true" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "BotCommand" - } - }, - "id": 19, - "name": "botCommands", - "deprecated": "true" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "FullUser", - "doc": [ - "Full User representation", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": " User's Id" - }, - { - "type": "reference", - "argument": "contactInfo", - "category": "compact", - "description": " User's contact information" - }, - { - "type": "reference", - "argument": "about", - "category": "full", - "description": " User's about information" - }, - { - "type": "reference", - "argument": "preferredLanguages", - "category": "full", - "description": " Preferred user languages" - }, - { - "type": "reference", - "argument": "timeZone", - "category": "full", - "description": " Time Zone of user in TZ format" - }, - { - "type": "reference", - "argument": "botCommands", - "category": "full", - "description": " Available Commands for Bot" - }, - { - "type": "reference", - "argument": "ext", - "category": "full", - "description": " Extension values. NOTE: This values are not related to ext field in User object." - }, - { - "type": "reference", - "argument": "isBlocked", - "category": "full", - "description": " Is user blocked. Default is false." - } - ], - "expandable": "true", - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "id" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "ContactRecord" - } - }, - "id": 2, - "name": "contactInfo" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 3, - "name": "about" - }, - { - "type": { - "type": "list", - "childType": "string" - }, - "id": 4, - "name": "preferredLanguages" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 5, - "name": "timeZone" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "BotCommand" - } - }, - "id": 6, - "name": "botCommands" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "MapValue" - } - }, - "id": 7, - "name": "ext" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 8, - "name": "isBlocked" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "BotCommand", - "doc": [ - "Available bot commands", - { - "type": "reference", - "argument": "slashCommand", - "category": "full", - "description": " Slash command name (wihtout slash)" - }, - { - "type": "reference", - "argument": "description", - "category": "full", - "description": " Slash command description" - }, - { - "type": "reference", - "argument": "locKey", - "category": "full", - "description": " Optional Localization Key for i18n" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "slashCommand" - }, - { - "type": "string", - "id": 2, - "name": "description" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 3, - "name": "locKey" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "EditUserLocalName", - "header": 96, - "response": { - "type": "reference", - "name": "Seq" - }, - "doc": [ - "Renaming of user's visible name", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": "target User's uid" - }, - { - "type": "reference", - "argument": "accessHash", - "category": "danger", - "description": "User's accessHash" - }, - { - "type": "reference", - "argument": "name", - "category": "full", - "description": "New user name" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": "int64", - "id": 2, - "name": "accessHash" - }, - { - "type": "string", - "id": 3, - "name": "name" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "UserAvatarChanged", - "header": 16, - "doc": [ - "Update about avatar changed", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " user's uid" - }, - { - "type": "reference", - "argument": "avatar", - "category": "compact", - "description": " user's new avatar" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "Avatar" - } - }, - "id": 2, - "name": "avatar" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "UserNameChanged", - "header": 32, - "doc": [ - "Update about name changed", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " user's uid" - }, - { - "type": "reference", - "argument": "name", - "category": "full", - "description": " user's name" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": "string", - "id": 2, - "name": "name" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "UserLocalNameChanged", - "header": 51, - "doc": [ - "Update about local name changed", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " user's uid" - }, - { - "type": "reference", - "argument": "localName", - "category": "full", - "description": " new user's local name" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 2, - "name": "localName" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "UserContactsChanged", - "header": 134, - "doc": [ - "Update about contact information change", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " user's uid" - }, - { - "type": "reference", - "argument": "contactRecords", - "category": "compact", - "description": " new phones list" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "ContactRecord" - } - }, - "id": 4, - "name": "contactRecords" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "UserNickChanged", - "header": 209, - "doc": [ - "Update about nick changed", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " user's uid" - }, - { - "type": "reference", - "argument": "nickname", - "category": "full", - "description": " user's new nickname" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 2, - "name": "nickname" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "UserAboutChanged", - "header": 210, - "doc": [ - "Update about user's about changed", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " User's uid" - }, - { - "type": "reference", - "argument": "about", - "category": "full", - "description": " User's about" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 2, - "name": "about" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "UserPreferredLanguagesChanged", - "header": 212, - "doc": [ - "Update about user's preferred languages", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " User's uid" - }, - { - "type": "reference", - "argument": "preferredLanguages", - "category": "full", - "description": " User's preferred languages. Can be empty." - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": { - "type": "list", - "childType": "string" - }, - "id": 2, - "name": "preferredLanguages" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "UserTimeZoneChanged", - "header": 216, - "doc": [ - "User TimeZone changed", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " User's uid" - }, - { - "type": "reference", - "argument": "timeZone", - "category": "full", - "description": " User's new time zone in TZ format" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 2, - "name": "timeZone" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "UserBotCommandsChanged", - "header": 217, - "doc": [ - "Update about bot commands changed", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " User's Id" - }, - { - "type": "reference", - "argument": "commands", - "category": "full", - "description": " New List of commands" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "BotCommand" - } - }, - "id": 2, - "name": "commands" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "UserExtChanged", - "header": 218, - "doc": [ - "Update about user ext changed", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " User's id" - }, - { - "type": "reference", - "argument": "ext", - "category": "full", - "description": " New Ext Value in User (NOT FullUser) object." - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "MapValue" - } - }, - "id": 2, - "name": "ext" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "UserFullExtChanged", - "header": 219, - "doc": [ - "Update about user ext changed", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " User's Id" - }, - { - "type": "reference", - "argument": "ext", - "category": "full", - "description": " New Ext Value in FullUser (NOT User) object." - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "MapValue" - } - }, - "id": 3, - "name": "ext" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "LoadFullUsers", - "header": 2649, - "response": { - "type": "anonymous", - "header": 2650, - "doc": [ - { - "type": "reference", - "argument": "fullUsers", - "category": "compact", - "description": " Loaded users" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "FullUser" - } - }, - "id": 1, - "name": "fullUsers" - } - ] - }, - "doc": [ - "Loading Full User information", - { - "type": "reference", - "argument": "userPeers", - "category": "compact", - "description": "User's peers to load. Should be non-empy" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "UserOutPeer" - } - }, - "id": 1, - "name": "userPeers" - } - ] - } - } - ] - }, - { - "title": "Profile", - "package": "profile", - "items": [ - { - "type": "rpc", - "content": { - "name": "EditName", - "header": 53, - "response": { - "type": "reference", - "name": "Seq" - }, - "doc": [ - "Changing account's name", - { - "type": "reference", - "argument": "name", - "category": "full", - "description": "New name" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "name" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "EditNickName", - "header": 205, - "response": { - "type": "reference", - "name": "Seq" - }, - "doc": [ - "Changing account's nickname", - { - "type": "reference", - "argument": "nickname", - "category": "full", - "description": "New Nickname" - } - ], - "attributes": [ - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 1, - "name": "nickname" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "CheckNickName", - "header": 206, - "response": { - "type": "reference", - "name": "Bool" - }, - "doc": [ - "Checking availability of nickname", - { - "type": "reference", - "argument": "nickname", - "category": "full", - "description": "Nickname for checking" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "nickname" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "EditAbout", - "header": 212, - "response": { - "type": "reference", - "name": "Seq" - }, - "doc": [ - "Changing about information", - { - "type": "reference", - "argument": "about", - "category": "full", - "description": "new about information" - } - ], - "attributes": [ - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 1, - "name": "about" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "EditAvatar", - "header": 31, - "response": { - "type": "anonymous", - "header": 103, - "doc": [ - "Response for change account avatar", - { - "type": "reference", - "argument": "avatar", - "category": "full", - "description": " New avatar" - }, - { - "type": "reference", - "argument": "seq", - "category": "full", - "description": " Sequence number" - }, - { - "type": "reference", - "argument": "state", - "category": "compact", - "description": " Sequence state" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Avatar" - }, - "id": 1, - "name": "avatar" - }, - { - "type": "int32", - "id": 2, - "name": "seq" - }, - { - "type": { - "type": "alias", - "childType": "seq_state" - }, - "id": 3, - "name": "state" - } - ] - }, - "doc": [ - "Changing account's avatar", - { - "type": "reference", - "argument": "fileLocation", - "category": "compact", - "description": "File Location of uploaded unencrypted avatar" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "FileLocation" - }, - "id": 1, - "name": "fileLocation" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "RemoveAvatar", - "header": 91, - "response": { - "type": "reference", - "name": "Seq" - }, - "doc": [ - "Removing account's avatar" - ], - "attributes": [] - } - }, - { - "type": "rpc", - "content": { - "name": "EditMyTimeZone", - "header": 144, - "response": { - "type": "reference", - "name": "Seq" - }, - "doc": [ - "Updating user's time zone", - { - "type": "reference", - "argument": "tz", - "category": "full", - "description": "New Time Zone" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "tz" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "EditMyPreferredLanguages", - "header": 145, - "response": { - "type": "reference", - "name": "Seq" - }, - "doc": [ - "Changing preffered languages", - { - "type": "reference", - "argument": "preferredLanguages", - "category": "full", - "description": "Preffered Languages" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": "string" - }, - "id": 1, - "name": "preferredLanguages" - } - ] - } - } - ] - }, - { - "title": "Contacts", - "package": "contacts", - "doc": [ - "Before working with contact list is is useful to import contacts from phone first by calling", - "method ImportContacts#0x07.", - "", - "All phone numbers MUST be preprocessed before import by some library (like libphonenumber)", - "and build international phone number depending on current users phone and/or locale.", - "", - "For loading contact list from server use GetContacts#0x57.", - "If during this call there are some updates about contact list change", - "it is recommended to call it again. Also applications need to sync contacts on application start.", - "", - "For searching for users without adding to contacts list use method FindContacts#0x70.", - "", - "For adding/deleting contacts AddContact#0x72 and DeleteContact#0x59." - ], - "items": [ - { - "type": "struct", - "content": { - "name": "PhoneToImport", - "doc": [ - "Phone for import", - { - "type": "reference", - "argument": "phoneNumber", - "category": "full", - "description": " phone number for import in international format" - }, - { - "type": "reference", - "argument": "name", - "category": "full", - "description": " optional name for contact" - } - ], - "attributes": [ - { - "type": "int64", - "id": 1, - "name": "phoneNumber" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 2, - "name": "name" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "EmailToImport", - "doc": [ - "Email for import", - { - "type": "reference", - "argument": "email", - "category": "full", - "description": " email for importing" - }, - { - "type": "reference", - "argument": "name", - "category": "full", - "description": " optional name for contact" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "email" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 2, - "name": "name" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "ImportContacts", - "header": 7, - "response": { - "type": "anonymous", - "header": 8, - "doc": [ - "Imported contacts", - { - "type": "reference", - "argument": "users", - "category": "compact", - "description": " Imported users" - }, - { - "type": "reference", - "argument": "seq", - "category": "full", - "description": " Sequence number if users are imported" - }, - { - "type": "reference", - "argument": "state", - "category": "compact", - "description": " Sequence state if users are imported" - }, - { - "type": "reference", - "argument": "userPeers", - "category": "full", - "description": " Imported user peers" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "User" - } - }, - "id": 1, - "name": "users" - }, - { - "type": "int32", - "id": 2, - "name": "seq" - }, - { - "type": { - "type": "alias", - "childType": "seq_state" - }, - "id": 3, - "name": "state" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "UserOutPeer" - } - }, - "id": 4, - "name": "userPeers" - } - ] - }, - "doc": [ - "Importing phones and emails for building contact list", - "Maximum amount of items for import per method call equals to 100.", - { - "type": "reference", - "argument": "phones", - "category": "compact", - "description": "Phones for import" - }, - { - "type": "reference", - "argument": "emails", - "category": "compact", - "description": "Emails for import" - }, - { - "type": "reference", - "argument": "optimizations", - "category": "full", - "description": "Enabled optimizations" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "PhoneToImport" - } - }, - "id": 1, - "name": "phones" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "EmailToImport" - } - }, - "id": 2, - "name": "emails" - }, - { - "type": { - "type": "list", - "childType": { - "type": "enum", - "childType": "UpdateOptimization" - } - }, - "id": 3, - "name": "optimizations" - } - ] - } - }, - { - "type": "empty" - }, - { - "type": "rpc", - "content": { - "name": "GetContacts", - "header": 87, - "response": { - "type": "anonymous", - "header": 88, - "doc": [ - "Current contact list", - { - "type": "reference", - "argument": "users", - "category": "hidden", - "description": " User list if list is changed" - }, - { - "type": "reference", - "argument": "isNotChanged", - "category": "full", - "description": " is list changed" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "User" - } - }, - "id": 1, - "name": "users" - }, - { - "type": "bool", - "id": 2, - "name": "isNotChanged" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "UserOutPeer" - } - }, - "id": 3, - "name": "userPeers" - } - ] - }, - "doc": [ - "Getting current contact list", - "SHA256 hash of list of a comma-separated list of contact UIDs in ascending", - "order may be passed in contactsHash parameter.", - "If the contact list was not changed, isNotChanged will be true.", - { - "type": "reference", - "argument": "contactsHash", - "category": "full", - "description": "Hash of saved list in application" - }, - { - "type": "reference", - "argument": "optimizations", - "category": "full", - "description": "Enabled optimizations" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "contactsHash" - }, - { - "type": { - "type": "list", - "childType": { - "type": "enum", - "childType": "UpdateOptimization" - } - }, - "id": 2, - "name": "optimizations" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "RemoveContact", - "header": 89, - "response": { - "type": "reference", - "name": "Seq" - }, - "doc": [ - "Removing contact from contact list", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": "Contact's UID" - }, - { - "type": "reference", - "argument": "accessHash", - "category": "danger", - "description": "Contact's AccessHash" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": "int64", - "id": 2, - "name": "accessHash" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "AddContact", - "header": 114, - "response": { - "type": "reference", - "name": "Seq" - }, - "doc": [ - "Adding contact to contact list", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": "Contact's UID" - }, - { - "type": "reference", - "argument": "accessHash", - "category": "danger", - "description": "Contact's AccessHash" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": "int64", - "id": 2, - "name": "accessHash" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "SearchContacts", - "header": 112, - "response": { - "type": "anonymous", - "header": 113, - "doc": [ - "Founded users", - { - "type": "reference", - "argument": "users", - "category": "compact", - "description": " Founded users" - }, - { - "type": "reference", - "argument": "userPeers", - "category": "compact", - "description": " Founded users peers" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "User" - } - }, - "id": 1, - "name": "users" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "UserOutPeer" - } - }, - "id": 2, - "name": "userPeers" - } - ] - }, - "doc": [ - "Searching contacts by user's query", - { - "type": "reference", - "argument": "request", - "category": "full", - "description": "Search query" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "request" - }, - { - "type": { - "type": "list", - "childType": { - "type": "enum", - "childType": "UpdateOptimization" - } - }, - "id": 2, - "name": "optimizations" - } - ] - } - }, - { - "type": "empty" - }, - { - "type": "update", - "content": { - "name": "ContactRegistered", - "header": 5, - "doc": [ - "Update about contact registration", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " contact's uid" - }, - { - "type": "reference", - "argument": "isSilent", - "category": "full", - "description": " is registration silent. If this value is true then don't show notification about registration" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " date of registration" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": "bool", - "id": 2, - "name": "isSilent" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 3, - "name": "date" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 4, - "name": "rid" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "ContactsAdded", - "header": 40, - "doc": [ - "Update about contacts added", - { - "type": "reference", - "argument": "uids", - "category": "compact", - "description": " added contacts" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "alias", - "childType": "userId" - } - }, - "id": 1, - "name": "uids" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "ContactsRemoved", - "header": 41, - "doc": [ - "Update about contacts removed", - { - "type": "reference", - "argument": "uids", - "category": "compact", - "description": " removed contacts" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "alias", - "childType": "userId" - } - }, - "id": 1, - "name": "uids" - } - ] - } - } - ] - }, - { - "title": "Privacy", - "package": "privacy", - "items": [ - { - "type": "rpc", - "content": { - "name": "BlockUser", - "header": 2636, - "response": { - "type": "reference", - "name": "Seq" - }, - "doc": [ - "Block User", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": "Peer for blocking" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "UserOutPeer" - }, - "id": 1, - "name": "peer" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "UnblockUser", - "header": 2637, - "response": { - "type": "reference", - "name": "Seq" - }, - "doc": [ - "Unblock User", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": "Peer for unblocking" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "UserOutPeer" - }, - "id": 1, - "name": "peer" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "LoadBlockedUsers", - "header": 2638, - "response": { - "type": "anonymous", - "header": 2639, - "doc": [ - { - "type": "reference", - "argument": "userPeers", - "category": "full", - "description": " Blocked user peers" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "UserOutPeer" - } - }, - "id": 1, - "name": "userPeers" - } - ] - }, - "doc": [ - "Load Blocked Users" - ], - "attributes": [] - } - }, - { - "type": "update", - "content": { - "name": "UserBlocked", - "header": 2629, - "doc": [ - "Update about User Blocked", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " User Id" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "UserUnblocked", - "header": 2630, - "doc": [ - "Update about User Unblocked", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " User Id" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - } - ] - } - } - ] - }, - { - "title": "Messaging", - "package": "messaging", - "doc": [ - "Actor can work with encrypted and plain messages in one conversation. For both types of messages API", - "contains a bit different methods. Also encrypted and plain messages have different schemes.", - "

Messages

", - "Message entity contains:", - "", - "

Message content

", - "Message can be one of three basic types of messages: Text Message, File Message and Service message.", - "All messages can contain extensions. For example we can send text message and add markdown extension with", - "formatted text in markdown and clients that support this extension will show markdown, and that clients that", - "not supported extension then show simple text. File messages can have photo, video or voice extensions.", - "Service message can have extensions extensions such as \"user added\", \"group created\", \"avatar changed\", etc.", - "

Send messages

", - "Sending messages looks same for encrypted and plain messages. Client MUST prepare all required data", - "before sending message (for example FastThumb for photo/video/documents) and call required methods.", - "Encrypted messages differs here only by a little different scheme and encryption.", - "

WRONG_KEYS and incorrect keys

", - "For sending encrypted messages client MUST send messages encrypted for all own and receivers keys.", - "If client send encryption with missing, old or incorrect keys it will receive WRONG_KEYS.", - "In WRONG_KEYS you need to deserialize relatedData from RpcError to WrongKeysErrorData", - "and get detailed information about keys. Sometimes there are some broken keys on server and client can't", - "encrypt messages with it than client MUST send empty encrypted key in request elsewhere API return WRONG_KEYS.", - "

Encrypted messages and New Devices

", - "When you send message to someone and when he registered with new device there are no way to receive old encrypted", - "messages on new device and because of this there are a problem about read/delivery statuses.", - "Alice send messages to Bob, but Bob lose his device and buy new iPhone and installed Actor.", - "Alice receive notification about new device and send another message. Bob open chat with Alice and", - "send read status with maximum message read date. Alice will mark all sent messages as read and one that", - "was not delivered. We can use status notifications per message, but in VERY heavy conversations it will be", - "a lot of unnecessary traffic. For resolving this small issue we have different ways of message statuses", - "for encrypted and plain messages. Also it is recomended to mark all undelivered messages on new device update as", - "not devered with warring sign.", - "

Message Read and Delivery

", - "There are two different ways for read and delivery statuses for encrypted and plain messages.", - "For encrypted messages used status change by RandomId and for plain messages used by maximum", - "date of read/delivered message." - ], - "items": [ - { - "type": "struct", - "content": { - "name": "MessageAttributes", - "doc": [ - "Message Attributes", - { - "type": "reference", - "argument": "isMentioned", - "category": "full", - "description": " Is mentioned. If set overrides built-in value." - }, - { - "type": "reference", - "argument": "isHighlighted", - "category": "full", - "description": " Is message highlighted. Default is false." - }, - { - "type": "reference", - "argument": "isNotified", - "category": "full", - "description": " Is notified. If set overrides built-in settings." - }, - { - "type": "reference", - "argument": "isOnlyForYou", - "category": "full", - "description": " If this message is only for you. Default is false" - } - ], - "attributes": [ - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 1, - "name": "isMentioned" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 2, - "name": "isHighlighted" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 3, - "name": "isNotified" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 4, - "name": "isOnlyForYou" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "QuotedMessage", - "doc": [ - "Quoted Message", - { - "type": "reference", - "argument": "messageId", - "category": "full", - "description": " Message Id if present" - }, - { - "type": "reference", - "argument": "publicGroupId", - "category": "full", - "description": " Public Group id if present" - }, - { - "type": "reference", - "argument": "senderUserId", - "category": "full", - "description": " Sender of message" - }, - { - "type": "reference", - "argument": "messageDate", - "category": "full", - "description": " Date of message" - }, - { - "type": "reference", - "argument": "quotedMessageContent", - "category": "full", - "description": " Optional Quoted Message Content. Can be empty if messageId is present and message is in current peer." - } - ], - "attributes": [ - { - "type": { - "type": "opt", - "childType": { - "type": "alias", - "childType": "randomId" - } - }, - "id": 1, - "name": "messageId" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "alias", - "childType": "groupId" - } - }, - "id": 2, - "name": "publicGroupId" - }, - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 3, - "name": "senderUserId" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 4, - "name": "messageDate" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "trait", - "childType": "Message" - } - }, - "id": 5, - "name": "quotedMessageContent" - } - ] - } - }, - { - "type": "trait", - "content": { - "isContainer": "true", - "name": "Message", - "attributes": [] - } - }, - { - "type": "struct", - "content": { - "name": "TextMessage", - "doc": [ - "Text message", - { - "type": "reference", - "argument": "text", - "category": "danger", - "description": " the text" - }, - { - "type": "reference", - "argument": "mentions", - "category": "full", - "description": " User mentions in message" - }, - { - "type": "reference", - "argument": "ext", - "category": "full", - "description": " Optional bytes of extension" - } - ], - "trait": { - "name": "Message", - "key": 1 - }, - "expandable": "true", - "attributes": [ - { - "type": "string", - "id": 1, - "name": "text" - }, - { - "type": { - "type": "list", - "childType": { - "type": "alias", - "childType": "userId" - } - }, - "id": 2, - "name": "mentions" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "trait", - "childType": "TextMessageEx" - } - }, - "id": 3, - "name": "ext" - } - ] - } - }, - { - "type": "trait", - "content": { - "isContainer": "true", - "name": "TextMessageEx", - "attributes": [] - } - }, - { - "type": "struct", - "content": { - "name": "TextExMarkdown", - "doc": [ - "Markdown extension", - { - "type": "reference", - "argument": "markdown", - "category": "full", - "description": " Markdown text" - } - ], - "trait": { - "name": "TextMessageEx", - "key": 1 - }, - "expandable": "true", - "attributes": [ - { - "type": "string", - "id": 2, - "name": "markdown" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "TextModernMessage", - "doc": [ - "Modern text message", - { - "type": "reference", - "argument": "text", - "category": "full", - "description": " optional text of message" - }, - { - "type": "reference", - "argument": "senderNameOverride", - "category": "full", - "description": " optional overriding of sender" - }, - { - "type": "reference", - "argument": "senderPhotoOverride", - "category": "full", - "description": " optional overriding sender's photo" - }, - { - "type": "reference", - "argument": "style", - "category": "full", - "description": " optional paragraph style" - }, - { - "type": "reference", - "argument": "attaches", - "category": "full", - "description": " optional Attaches of message" - } - ], - "trait": { - "name": "TextMessageEx", - "key": 2 - }, - "expandable": "true", - "attributes": [ - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 1, - "name": "text" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 2, - "name": "senderNameOverride" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "Avatar" - } - }, - "id": 3, - "name": "senderPhotoOverride" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "ParagraphStyle" - } - }, - "id": 4, - "name": "style" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "TextModernAttach" - } - }, - "id": 5, - "name": "attaches" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "ParagraphStyle", - "doc": [ - "Paragraph style", - { - "type": "reference", - "argument": "showParagraph", - "category": "full", - "description": " Show quote-like paragraph?" - }, - { - "type": "reference", - "argument": "paragraphColor", - "category": "full", - "description": " Override paragraph color" - }, - { - "type": "reference", - "argument": "bgColor", - "category": "full", - "description": " Override background color" - } - ], - "attributes": [ - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 1, - "name": "showParagraph" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "trait", - "childType": "Color" - } - }, - "id": 2, - "name": "paragraphColor" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "trait", - "childType": "Color" - } - }, - "id": 3, - "name": "bgColor" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "TextModernAttach", - "doc": [ - "Attaches to message", - { - "type": "reference", - "argument": "title", - "category": "full", - "description": " Attach of message" - }, - { - "type": "reference", - "argument": "titleUrl", - "category": "full", - "description": " Attach title url" - }, - { - "type": "reference", - "argument": "titleIcon", - "category": "full", - "description": " Attach title icon" - }, - { - "type": "reference", - "argument": "text", - "category": "full", - "description": " Attach text" - }, - { - "type": "reference", - "argument": "style", - "category": "full", - "description": " Attach style" - } - ], - "expandable": "true", - "attributes": [ - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 1, - "name": "title" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 2, - "name": "titleUrl" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "ImageLocation" - } - }, - "id": 3, - "name": "titleIcon" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 4, - "name": "text" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "ParagraphStyle" - } - }, - "id": 5, - "name": "style" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "TextModernField" - } - }, - "id": 6, - "name": "fields" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "TextModernField", - "doc": [ - "Modern message fields", - { - "type": "reference", - "argument": "title", - "category": "full", - "description": " Field title" - }, - { - "type": "reference", - "argument": "value", - "category": "full", - "description": " Field value" - }, - { - "type": "reference", - "argument": "isShort", - "category": "full", - "description": " Is field can be shown in compact way (default is TRUE)" - } - ], - "expandable": "true", - "attributes": [ - { - "type": "string", - "id": 1, - "name": "title" - }, - { - "type": "string", - "id": 2, - "name": "value" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 3, - "name": "isShort" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "TextCommand", - "doc": [ - "Text Command Message for bots", - { - "type": "reference", - "argument": "command", - "category": "full", - "description": " Slash-Command For execution" - }, - { - "type": "reference", - "argument": "args", - "category": "full", - "description": " Arguments of slash command" - } - ], - "trait": { - "name": "TextMessageEx", - "key": 3 - }, - "expandable": "true", - "attributes": [ - { - "type": "string", - "id": 1, - "name": "command" - }, - { - "type": "string", - "id": 2, - "name": "args" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "ServiceMessage", - "doc": [ - "Service message", - { - "type": "reference", - "argument": "text", - "category": "full", - "description": " service message text" - }, - { - "type": "reference", - "argument": "ext", - "category": "compact", - "description": " Extension" - } - ], - "trait": { - "name": "Message", - "key": 2 - }, - "expandable": "true", - "attributes": [ - { - "type": "string", - "id": 1, - "name": "text" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "trait", - "childType": "ServiceEx" - } - }, - "id": 3, - "name": "ext" - } - ] - } - }, - { - "type": "trait", - "content": { - "isContainer": "true", - "name": "ServiceEx", - "attributes": [] - } - }, - { - "type": "struct", - "content": { - "name": "ServiceExUserInvited", - "doc": [ - "Service message about adding user to group", - { - "type": "reference", - "argument": "invitedUid", - "category": "full", - "description": " added user id" - } - ], - "trait": { - "name": "ServiceEx", - "key": 1 - }, - "expandable": "true", - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "invitedUid" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "ServiceExUserJoined", - "doc": [ - "Service message about user join to group" - ], - "trait": { - "name": "ServiceEx", - "key": 17 - }, - "expandable": "true", - "attributes": [] - } - }, - { - "type": "struct", - "content": { - "name": "ServiceExUserKicked", - "doc": [ - "Service message about kicking user from group", - { - "type": "reference", - "argument": "kickedUid", - "category": "full", - "description": " kicked user id" - } - ], - "trait": { - "name": "ServiceEx", - "key": 2 - }, - "expandable": "true", - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "kickedUid" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "ServiceExUserLeft", - "doc": [ - "Service message about user left group" - ], - "trait": { - "name": "ServiceEx", - "key": 3 - }, - "expandable": "true", - "attributes": [] - } - }, - { - "type": "struct", - "content": { - "name": "ServiceExGroupCreated", - "doc": [ - "Service message about group creating" - ], - "trait": { - "name": "ServiceEx", - "key": 4 - }, - "expandable": "true", - "attributes": [] - } - }, - { - "type": "struct", - "content": { - "name": "ServiceExChangedTitle", - "doc": [ - "Service message about group title change", - { - "type": "reference", - "argument": "title", - "category": "full", - "description": " New group title" - } - ], - "trait": { - "name": "ServiceEx", - "key": 5 - }, - "expandable": "true", - "attributes": [ - { - "type": "string", - "id": 1, - "name": "title" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "ServiceExChangedTopic", - "doc": [ - "Service message on group topic change", - { - "type": "reference", - "argument": "topic", - "category": "full", - "description": " New group topic" - } - ], - "trait": { - "name": "ServiceEx", - "key": 18 - }, - "expandable": "true", - "attributes": [ - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 1, - "name": "topic" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "ServiceExChangedAbout", - "doc": [ - "Service message on group about change", - { - "type": "reference", - "argument": "about", - "category": "full", - "description": " New group about" - } - ], - "trait": { - "name": "ServiceEx", - "key": 19 - }, - "expandable": "true", - "attributes": [ - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 1, - "name": "about" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "ServiceExChangedAvatar", - "doc": [ - "Service message about avatar change", - { - "type": "reference", - "argument": "avatar", - "category": "compact", - "description": " Updated avatar" - } - ], - "trait": { - "name": "ServiceEx", - "key": 6 - }, - "expandable": "true", - "attributes": [ - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "Avatar" - } - }, - "id": 1, - "name": "avatar" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "ServiceExContactRegistered", - "doc": [ - "Service message about user registration", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " User Id" - } - ], - "trait": { - "name": "ServiceEx", - "key": 8 - }, - "expandable": "true", - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "ServiceExPhoneMissed", - "doc": [ - "Update about missing phone call" - ], - "trait": { - "name": "ServiceEx", - "key": 9 - }, - "expandable": "true", - "attributes": [] - } - }, - { - "type": "struct", - "content": { - "name": "ServiceExPhoneCall", - "doc": [ - "Update about phone call", - { - "type": "reference", - "argument": "duration", - "category": "full", - "description": " Duration of a phone call" - } - ], - "trait": { - "name": "ServiceEx", - "key": 16 - }, - "expandable": "true", - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "duration" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "ServiceExChatArchived", - "doc": [ - "Message about chat archived" - ], - "trait": { - "name": "ServiceEx", - "key": 20 - }, - "expandable": "true", - "attributes": [] - } - }, - { - "type": "struct", - "content": { - "name": "ServiceExChatRestored", - "doc": [ - "Message about chat restored" - ], - "trait": { - "name": "ServiceEx", - "key": 21 - }, - "expandable": "true", - "attributes": [] - } - }, - { - "type": "struct", - "content": { - "name": "DocumentMessage", - "doc": [ - "File message", - { - "type": "reference", - "argument": "fileId", - "category": "full", - "description": " file id" - }, - { - "type": "reference", - "argument": "accessHash", - "category": "danger", - "description": " file access hash" - }, - { - "type": "reference", - "argument": "fileSize", - "category": "full", - "description": " file size" - }, - { - "type": "reference", - "argument": "name", - "category": "full", - "description": " name of file" - }, - { - "type": "reference", - "argument": "mimeType", - "category": "full", - "description": " mimetype of file" - }, - { - "type": "reference", - "argument": "thumb", - "category": "compact", - "description": " optional thumb of file. JPEG less that 90x90 with 60-70 quality." - }, - { - "type": "reference", - "argument": "ext", - "category": "compact", - "description": " Extension" - } - ], - "trait": { - "name": "Message", - "key": 3 - }, - "expandable": "true", - "attributes": [ - { - "type": "int64", - "id": 1, - "name": "fileId" - }, - { - "type": "int64", - "id": 2, - "name": "accessHash" - }, - { - "type": "int32", - "id": 3, - "name": "fileSize" - }, - { - "type": "string", - "id": 4, - "name": "name" - }, - { - "type": "string", - "id": 5, - "name": "mimeType" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "FastThumb" - } - }, - "id": 6, - "name": "thumb" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "trait", - "childType": "DocumentEx" - } - }, - "id": 8, - "name": "ext" - } - ] - } - }, - { - "type": "trait", - "content": { - "isContainer": "true", - "name": "DocumentEx", - "attributes": [] - } - }, - { - "type": "struct", - "content": { - "name": "DocumentExPhoto", - "doc": [ - "File photo extension. Can be set ONLY for JPEG.", - { - "type": "reference", - "argument": "w", - "category": "full", - "description": " image width" - }, - { - "type": "reference", - "argument": "h", - "category": "full", - "description": " image height" - } - ], - "trait": { - "name": "DocumentEx", - "key": 1 - }, - "expandable": "true", - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "w" - }, - { - "type": "int32", - "id": 2, - "name": "h" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "DocumentExVideo", - "doc": [ - "File video extension", - { - "type": "reference", - "argument": "w", - "category": "full", - "description": " video width" - }, - { - "type": "reference", - "argument": "h", - "category": "full", - "description": " video height" - }, - { - "type": "reference", - "argument": "duration", - "category": "full", - "description": " video duration" - } - ], - "trait": { - "name": "DocumentEx", - "key": 2 - }, - "expandable": "true", - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "w" - }, - { - "type": "int32", - "id": 2, - "name": "h" - }, - { - "type": "int32", - "id": 3, - "name": "duration" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "DocumentExVoice", - "doc": [ - "File voice extension", - { - "type": "reference", - "argument": "duration", - "category": "full", - "description": " voice duration" - } - ], - "trait": { - "name": "DocumentEx", - "key": 3 - }, - "expandable": "true", - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "duration" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "DocumentExAnimation", - "doc": [ - "Animation extension. Can be set ONLY for GIF.", - { - "type": "reference", - "argument": "w", - "category": "full", - "description": " Animation width" - }, - { - "type": "reference", - "argument": "h", - "category": "full", - "description": " Animation height" - } - ], - "trait": { - "name": "DocumentEx", - "key": 6 - }, - "expandable": "true", - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "w" - }, - { - "type": "int32", - "id": 2, - "name": "h" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "DocumentExAnimationVid", - "doc": [ - "Animation video extension. More compact version of Animation with video codec instead of GIF.", - "Can be set ONLY for MP4.", - { - "type": "reference", - "argument": "w", - "category": "full", - "description": " Animation width" - }, - { - "type": "reference", - "argument": "h", - "category": "full", - "description": " Animation height" - }, - { - "type": "reference", - "argument": "duration", - "category": "full", - "description": " Animation duration" - } - ], - "trait": { - "name": "DocumentEx", - "key": 7 - }, - "expandable": "true", - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "w" - }, - { - "type": "int32", - "id": 2, - "name": "h" - }, - { - "type": "int32", - "id": 3, - "name": "duration" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "JsonMessage", - "doc": [ - "Custom-data JsonMessage", - { - "type": "reference", - "argument": "rawJson", - "category": "danger", - "description": " JSON object" - } - ], - "trait": { - "name": "Message", - "key": 4 - }, - "expandable": "true", - "attributes": [ - { - "type": "string", - "id": 1, - "name": "rawJson" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "UnsupportedMessage", - "doc": [ - "Explicit type for unsupported message" - ], - "trait": { - "name": "Message", - "key": 5 - }, - "expandable": "true", - "attributes": [] - } - }, - { - "type": "struct", - "content": { - "name": "StickerMessage", - "doc": [ - "Sticker message", - { - "type": "reference", - "argument": "stickerId", - "category": "full", - "description": " Optional Unique ID of sticker" - }, - { - "type": "reference", - "argument": "fastPreview", - "category": "full", - "description": " Optional Fast preview of sticker in webp format" - }, - { - "type": "reference", - "argument": "image512", - "category": "full", - "description": " Optional 512x512 sticker image in webp format" - }, - { - "type": "reference", - "argument": "image256", - "category": "full", - "description": " Optional 256x256 sticker image in webp format" - }, - { - "type": "reference", - "argument": "stickerCollectionId", - "category": "full", - "description": " Optional Collection ID" - }, - { - "type": "reference", - "argument": "stickerCollectionAccessHash", - "category": "full", - "description": " Optional Collection Access Hash" - } - ], - "trait": { - "name": "Message", - "key": 6 - }, - "expandable": "true", - "attributes": [ - { - "type": { - "type": "opt", - "childType": "int32" - }, - "id": 1, - "name": "stickerId" - }, - { - "type": { - "type": "opt", - "childType": "bytes" - }, - "id": 2, - "name": "fastPreview" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "ImageLocation" - } - }, - "id": 3, - "name": "image512" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "ImageLocation" - } - }, - "id": 4, - "name": "image256" - }, - { - "type": { - "type": "opt", - "childType": "int32" - }, - "id": 5, - "name": "stickerCollectionId" - }, - { - "type": { - "type": "opt", - "childType": "int64" - }, - "id": 6, - "name": "stickerCollectionAccessHash" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "BinaryMessage", - "doc": [ - "Binary Message. Useful for implementing your own content types", - { - "type": "reference", - "argument": "contentTag", - "category": "full", - "description": " Content Tag" - }, - { - "type": "reference", - "argument": "msg", - "category": "compact", - "description": " Message contents" - } - ], - "trait": { - "name": "Message", - "key": 7 - }, - "expandable": "true", - "attributes": [ - { - "type": "string", - "id": 1, - "name": "contentTag" - }, - { - "type": "bytes", - "id": 2, - "name": "msg" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "EncryptedMessage", - "doc": [ - "Encrypted Message", - { - "type": "reference", - "argument": "box", - "category": "full", - "description": " Encrypted box" - } - ], - "trait": { - "name": "Message", - "key": 8 - }, - "expandable": "true", - "attributes": [ - { - "type": { - "type": "struct", - "childType": "EncryptedBox" - }, - "id": 1, - "name": "box" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "EmptyMessage", - "doc": [ - "Empty Message" - ], - "trait": { - "name": "Message", - "key": 9 - }, - "expandable": "true", - "attributes": [] - } - }, - { - "type": "struct", - "content": { - "name": "DialogShort", - "doc": [ - "Short Dialog from grouped conversation list", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": " Peer of conversation" - }, - { - "type": "reference", - "argument": "counter", - "category": "full", - "description": " Conversation unread count" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " Conversation top message date" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Peer" - }, - "id": 1, - "name": "peer" - }, - { - "type": "int32", - "id": 2, - "name": "counter" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 4, - "name": "date" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "DialogGroup", - "doc": [ - "Grouped dialog list", - { - "type": "reference", - "argument": "title", - "category": "full", - "description": " Title of group" - }, - { - "type": "reference", - "argument": "key", - "category": "full", - "description": " Key of group" - }, - { - "type": "reference", - "argument": "dialogs", - "category": "full", - "description": " Conversations in group" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "title" - }, - { - "type": "string", - "id": 2, - "name": "key" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "DialogShort" - } - }, - "id": 3, - "name": "dialogs" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "MessageReaction", - "doc": [ - "Reaction to message", - { - "type": "reference", - "argument": "users", - "category": "full", - "description": " User's reaction" - }, - { - "type": "reference", - "argument": "code", - "category": "full", - "description": " Reaction EMOJI code" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "alias", - "childType": "userId" - } - }, - "id": 1, - "name": "users" - }, - { - "type": "string", - "id": 2, - "name": "code" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "MessageOutReference", - "doc": [ - "Message Out Reference", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": " Out Peer of message" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": " Message random id" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "OutPeer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 2, - "name": "rid" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "SendMessage", - "header": 92, - "response": { - "type": "reference", - "name": "SeqDate" - }, - "doc": [ - "Sending plain message", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": "Destination peer for message" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": "Message random id (generated on client side)" - }, - { - "type": "reference", - "argument": "message", - "category": "full", - "description": "The message" - }, - { - "type": "reference", - "argument": "isOnlyForUser", - "category": "full", - "description": "If message is shown only for specific user" - }, - { - "type": "reference", - "argument": "quotedMessageReference", - "category": "full", - "description": "Quoted message if present" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "OutPeer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 3, - "name": "rid" - }, - { - "type": { - "type": "trait", - "childType": "Message" - }, - "id": 4, - "name": "message" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "alias", - "childType": "userId" - } - }, - "id": 5, - "name": "isOnlyForUser" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "MessageOutReference" - } - }, - "id": 6, - "name": "quotedMessageReference" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "UpdateMessage", - "header": 2658, - "response": { - "type": "reference", - "name": "SeqDate" - }, - "doc": [ - "Changing Message content", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": "Destination Peer" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": "Message random id" - }, - { - "type": "reference", - "argument": "updatedMessage", - "category": "full", - "description": "Updated Message content" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "OutPeer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 2, - "name": "rid" - }, - { - "type": { - "type": "trait", - "childType": "Message" - }, - "id": 3, - "name": "updatedMessage" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "MessageReceived", - "header": 55, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Confirmation of plain message receive by device", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": "Destination peer" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": "Maximum date of received messages" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "OutPeer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 3, - "name": "date" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "MessageRead", - "header": 57, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Marking plain messages as read", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": "Destination peer" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": "Maximum date of read messages" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "OutPeer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 3, - "name": "date" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "DeleteMessage", - "header": 98, - "response": { - "type": "reference", - "name": "Seq" - }, - "doc": [ - "Deleting messages", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": "Destination peer" - }, - { - "type": "reference", - "argument": "rids", - "category": "full", - "description": "Message random id" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "OutPeer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "list", - "childType": { - "type": "alias", - "childType": "randomId" - } - }, - "id": 3, - "name": "rids" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "ClearChat", - "header": 99, - "response": { - "type": "reference", - "name": "Seq" - }, - "doc": [ - "Clearing of conversation (without removing dialog from dialogs list)", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": "Conversation peer" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "OutPeer" - }, - "id": 1, - "name": "peer" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "DeleteChat", - "header": 100, - "response": { - "type": "reference", - "name": "Seq" - }, - "doc": [ - "Deleting of conversation (also leave group for group conversations)", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": "Conversation peer" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "OutPeer" - }, - "id": 1, - "name": "peer" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "ArchiveChat", - "header": 2654, - "response": { - "type": "reference", - "name": "Seq" - }, - "doc": [ - "Archiving chat", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": "Conversation peer" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "OutPeer" - }, - "id": 1, - "name": "peer" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "MessageSetReaction", - "header": 210, - "response": { - "type": "reference", - "name": "ReactionsResponse" - }, - "doc": [ - "Setting Message reaction", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": "Destination peer" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": "Message random id" - }, - { - "type": "reference", - "argument": "code", - "category": "full", - "description": "Reaction code" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "OutPeer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 2, - "name": "rid" - }, - { - "type": "string", - "id": 3, - "name": "code" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "MessageRemoveReaction", - "header": 220, - "response": { - "type": "reference", - "name": "ReactionsResponse" - }, - "doc": [ - "Removing Message reaction", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": "Destination peer" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": "Message random id" - }, - { - "type": "reference", - "argument": "code", - "category": "full", - "description": "Reaction code" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "OutPeer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 2, - "name": "rid" - }, - { - "type": "string", - "id": 3, - "name": "code" - } - ] - } - }, - { - "type": "response", - "content": { - "name": "ReactionsResponse", - "header": 219, - "doc": [ - "Response for reactions change" - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "seq" - }, - { - "type": { - "type": "alias", - "childType": "seq_state" - }, - "id": 2, - "name": "state" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "MessageReaction" - } - }, - "id": 3, - "name": "reactions" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "Message", - "header": 55, - "doc": [ - "Update about plain message", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": " Destination peer" - }, - { - "type": "reference", - "argument": "senderUid", - "category": "full", - "description": " Sender of message" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " date of message" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": " Rid of message" - }, - { - "type": "reference", - "argument": "message", - "category": "full", - "description": " message content" - }, - { - "type": "reference", - "argument": "attributes", - "category": "full", - "description": " optional message attributes" - }, - { - "type": "reference", - "argument": "quotedMessage", - "category": "full", - "description": " optional quoted message" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Peer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 2, - "name": "senderUid" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 3, - "name": "date" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 4, - "name": "rid" - }, - { - "type": { - "type": "trait", - "childType": "Message" - }, - "id": 5, - "name": "message" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "MessageAttributes" - } - }, - "id": 6, - "name": "attributes" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "QuotedMessage" - } - }, - "id": 7, - "name": "quotedMessage" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "MessageContentChanged", - "header": 162, - "doc": [ - "Update about message change", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": " Destination peer" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": " Rid of message" - }, - { - "type": "reference", - "argument": "message", - "category": "full", - "description": " Message content" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Peer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 2, - "name": "rid" - }, - { - "type": { - "type": "trait", - "childType": "Message" - }, - "id": 3, - "name": "message" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "MessageQuotedChanged", - "header": 169, - "doc": [ - "Update about quoted message changed", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": " Destination peer" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": " Rid of message" - }, - { - "type": "reference", - "argument": "quotedMessage", - "category": "full", - "description": " Quoted Message" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Peer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 2, - "name": "rid" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "QuotedMessage" - } - }, - "id": 3, - "name": "quotedMessage" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "MessageDateChanged", - "header": 163, - "doc": [ - "Update about message date changed", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": " Destination peer" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": " Rid of message" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " Date of message" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Peer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 2, - "name": "rid" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 3, - "name": "date" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "MessageSent", - "header": 4, - "doc": [ - "Update about message sent", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": " Destination peer" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": " Rid of message" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " Date of message" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Peer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 2, - "name": "rid" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 3, - "name": "date" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "MessageReceived", - "header": 54, - "doc": [ - "Update about message received", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": " Destination peer" - }, - { - "type": "reference", - "argument": "startDate", - "category": "full", - "description": " Start date of received message" - }, - { - "type": "reference", - "argument": "receivedDate", - "category": "full", - "description": " Date of receive" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Peer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 2, - "name": "startDate" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 3, - "name": "receivedDate" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "MessageRead", - "header": 19, - "doc": [ - "Update about message read", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": " Destination peer" - }, - { - "type": "reference", - "argument": "startDate", - "category": "full", - "description": " Start date of read message" - }, - { - "type": "reference", - "argument": "readDate", - "category": "full", - "description": " Date of read" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Peer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 2, - "name": "startDate" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 3, - "name": "readDate" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "MessageReadByMe", - "header": 50, - "doc": [ - "Update about message read by me", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": " Destination peer" - }, - { - "type": "reference", - "argument": "startDate", - "category": "full", - "description": " Start date of read message" - }, - { - "type": "reference", - "argument": "unreadCounter", - "category": "full", - "description": " Optional unread counter in conversation" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Peer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 2, - "name": "startDate" - }, - { - "type": { - "type": "opt", - "childType": "int32" - }, - "id": 3, - "name": "unreadCounter" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "MessageDelete", - "header": 46, - "doc": [ - "Update about message delete", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": " Destination peer" - }, - { - "type": "reference", - "argument": "rids", - "category": "full", - "description": " Deleted messages" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Peer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "list", - "childType": { - "type": "alias", - "childType": "randomId" - } - }, - "id": 2, - "name": "rids" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "ChatClear", - "header": 47, - "doc": [ - "Update about chat clear", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": " Destination peer" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Peer" - }, - "id": 1, - "name": "peer" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "ChatDelete", - "header": 48, - "doc": [ - "Update about chat delete", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": " Destination peer" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Peer" - }, - "id": 1, - "name": "peer" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "ChatArchive", - "header": 94, - "doc": [ - "Update about chat archive", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": " Destination peer" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Peer" - }, - "id": 1, - "name": "peer" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "ChatDropCache", - "header": 2690, - "doc": [ - "Update about cache drop", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": " Destination peer" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Peer" - }, - "id": 1, - "name": "peer" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "ChatGroupsChanged", - "header": 1, - "doc": [ - "Update about chat groups changed. Called only when adding, removing and reordering of grouped dialog.", - { - "type": "reference", - "argument": "dialogs", - "category": "compact", - "description": " New dialgos list" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "DialogGroup" - } - }, - "id": 1, - "name": "dialogs" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "ReactionsUpdate", - "header": 222, - "doc": [ - "Update about reactions change", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": " Destination peer" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": " Message random id" - }, - { - "type": "reference", - "argument": "reactions", - "category": "full", - "description": " New Reactions" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Peer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 2, - "name": "rid" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "MessageReaction" - } - }, - "id": 3, - "name": "reactions" - } - ] - } - }, - { - "type": "enum", - "content": { - "name": "MessageState", - "values": [ - { - "name": "Sent", - "id": 1 - }, - { - "name": "Received", - "id": 2 - }, - { - "name": "Read", - "id": 3 - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "MessageContainer", - "doc": [ - "Message from history", - { - "type": "reference", - "argument": "senderUid", - "category": "full", - "description": " Sender of mesasge" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": " Random Id of message" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " Date of message" - }, - { - "type": "reference", - "argument": "message", - "category": "full", - "description": " Content of message" - }, - { - "type": "reference", - "argument": "reactions", - "category": "full", - "description": " Message reactions" - }, - { - "type": "reference", - "argument": "attribute", - "category": "full", - "description": " Optional message attributes" - }, - { - "type": "reference", - "argument": "quotedMessage", - "category": "full", - "description": " Optional quoted Message" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "senderUid" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 2, - "name": "rid" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 3, - "name": "date" - }, - { - "type": { - "type": "trait", - "childType": "Message" - }, - "id": 5, - "name": "message" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "enum", - "childType": "MessageState" - } - }, - "id": 6, - "name": "state" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "MessageReaction" - } - }, - "id": 7, - "name": "reactions" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "MessageAttributes" - } - }, - "id": 8, - "name": "attribute" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "QuotedMessage" - } - }, - "id": 9, - "name": "quotedMessage" - } - ] - } - }, - { - "type": "enum", - "content": { - "name": "ListLoadMode", - "values": [ - { - "name": "Forward", - "id": 1 - }, - { - "name": "Backward", - "id": 2 - }, - { - "name": "Both", - "id": 3 - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "LoadHistory", - "header": 118, - "response": { - "type": "anonymous", - "header": 119, - "doc": [ - "Loaded history", - { - "type": "reference", - "argument": "history", - "category": "compact", - "description": " Messages" - }, - { - "type": "reference", - "argument": "users", - "category": "compact", - "description": " Loaded users" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "MessageContainer" - } - }, - "id": 1, - "name": "history" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "User" - } - }, - "id": 2, - "name": "users" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "UserOutPeer" - } - }, - "id": 4, - "name": "userPeers" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Group" - } - }, - "id": 5, - "name": "groups" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "GroupOutPeer" - } - }, - "id": 6, - "name": "groupPeers" - } - ] - }, - "doc": [ - "Loading history of chat", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": "Peer of conversation" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": "start date of messages for loading or 0 for loading from start" - }, - { - "type": "reference", - "argument": "loadMode", - "category": "full", - "description": "Loading mode: Forward loading, backward or both ways" - }, - { - "type": "reference", - "argument": "limit", - "category": "full", - "description": "maximum amount of messages (max is 100)" - }, - { - "type": "reference", - "argument": "optimizations", - "category": "full", - "description": "Enabled optimizations" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "OutPeer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 3, - "name": "date" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "enum", - "childType": "ListLoadMode" - } - }, - "id": 5, - "name": "loadMode" - }, - { - "type": "int32", - "id": 4, - "name": "limit" - }, - { - "type": { - "type": "list", - "childType": { - "type": "enum", - "childType": "UpdateOptimization" - } - }, - "id": 6, - "name": "optimizations" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "Dialog", - "doc": [ - "Conversation from history", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": " Peer of conversation" - }, - { - "type": "reference", - "argument": "unreadCount", - "category": "full", - "description": " plain messages unread messages count" - }, - { - "type": "reference", - "argument": "sortDate", - "category": "full", - "description": " date of conversation for sorting" - }, - { - "type": "reference", - "argument": "senderUid", - "category": "full", - "description": " Sender of top message (may be zero)" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": " Random ID of top message (may be zero)" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " Date of top message (can't be zero)" - }, - { - "type": "reference", - "argument": "message", - "category": "full", - "description": " Content of message" - }, - { - "type": "reference", - "argument": "firstUnreadDate", - "category": "full", - "description": " Date of first unread message" - }, - { - "type": "reference", - "argument": "attributes", - "category": "full", - "description": " Optional top message attributes" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Peer" - }, - "id": 1, - "name": "peer" - }, - { - "type": "int32", - "id": 3, - "name": "unreadCount" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 4, - "name": "sortDate" - }, - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 5, - "name": "senderUid" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 6, - "name": "rid" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 7, - "name": "date" - }, - { - "type": { - "type": "trait", - "childType": "Message" - }, - "id": 8, - "name": "message" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "enum", - "childType": "MessageState" - } - }, - "id": 9, - "name": "state" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "alias", - "childType": "date" - } - }, - "id": 10, - "name": "firstUnreadDate" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "MessageAttributes" - } - }, - "id": 11, - "name": "attributes" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "LoadDialogs", - "header": 104, - "response": { - "type": "anonymous", - "header": 105, - "doc": [ - "Loaded dialogs", - { - "type": "reference", - "argument": "groups", - "category": "compact", - "description": " Loaded groups" - }, - { - "type": "reference", - "argument": "users", - "category": "compact", - "description": " Loaded users" - }, - { - "type": "reference", - "argument": "dialogs", - "category": "compact", - "description": " Loaded dialogs" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Group" - } - }, - "id": 1, - "name": "groups" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "User" - } - }, - "id": 2, - "name": "users" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Dialog" - } - }, - "id": 3, - "name": "dialogs" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "UserOutPeer" - } - }, - "id": 4, - "name": "userPeers" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "GroupOutPeer" - } - }, - "id": 5, - "name": "groupPeers" - } - ] - }, - "doc": [ - "Loading conversation history", - { - "type": "reference", - "argument": "minDate", - "category": "full", - "description": "start date of conversation loading. Use 0 to load latest messages" - }, - { - "type": "reference", - "argument": "limit", - "category": "full", - "description": "limit maximum amount of messages (max is 100)" - }, - { - "type": "reference", - "argument": "optimizations", - "category": "full", - "description": "Enabled optimizations" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 1, - "name": "minDate" - }, - { - "type": "int32", - "id": 2, - "name": "limit" - }, - { - "type": { - "type": "list", - "childType": { - "type": "enum", - "childType": "UpdateOptimization" - } - }, - "id": 3, - "name": "optimizations" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "LoadArchived", - "header": 2651, - "response": { - "type": "anonymous", - "header": 2652, - "doc": [ - "Archived dialogs", - { - "type": "reference", - "argument": "groups", - "category": "full", - "description": " Referenced groups" - }, - { - "type": "reference", - "argument": "users", - "category": "full", - "description": " Referenced users" - }, - { - "type": "reference", - "argument": "dialogs", - "category": "full", - "description": " Archived dialogs" - }, - { - "type": "reference", - "argument": "nextOffset", - "category": "compact", - "description": " Offset for next bunch" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Group" - } - }, - "id": 1, - "name": "groups" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "User" - } - }, - "id": 2, - "name": "users" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Dialog" - } - }, - "id": 3, - "name": "dialogs" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "UserOutPeer" - } - }, - "id": 5, - "name": "userPeers" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "GroupOutPeer" - } - }, - "id": 6, - "name": "groupPeers" - }, - { - "type": { - "type": "opt", - "childType": "bytes" - }, - "id": 4, - "name": "nextOffset" - } - ] - }, - "doc": [ - "Loading archived messages", - { - "type": "reference", - "argument": "nextOffset", - "category": "compact", - "description": "Optional next offset" - }, - { - "type": "reference", - "argument": "limit", - "category": "full", - "description": "Maximum number of elements" - }, - { - "type": "reference", - "argument": "optimizations", - "category": "full", - "description": "Enabled optimizations" - } - ], - "attributes": [ - { - "type": { - "type": "opt", - "childType": "bytes" - }, - "id": 1, - "name": "nextOffset" - }, - { - "type": "int32", - "id": 2, - "name": "limit" - }, - { - "type": { - "type": "list", - "childType": { - "type": "enum", - "childType": "UpdateOptimization" - } - }, - "id": 3, - "name": "optimizations" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "LoadGroupedDialogs", - "header": 225, - "response": { - "type": "anonymous", - "header": 226, - "doc": [ - "Loaded grouped dialogs", - { - "type": "reference", - "argument": "dialogs", - "category": "compact", - "description": " Loaded groups of dialogs" - }, - { - "type": "reference", - "argument": "users", - "category": "compact", - "description": " Loaded users" - }, - { - "type": "reference", - "argument": "groups", - "category": "full", - "description": " Loaded groups" - }, - { - "type": "reference", - "argument": "showArchived", - "category": "full", - "description": " Show archived section" - }, - { - "type": "reference", - "argument": "showInvite", - "category": "full", - "description": " Show invite message" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "DialogGroup" - } - }, - "id": 1, - "name": "dialogs" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "User" - } - }, - "id": 2, - "name": "users" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Group" - } - }, - "id": 3, - "name": "groups" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 4, - "name": "showArchived" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 5, - "name": "showInvite" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "UserOutPeer" - } - }, - "id": 6, - "name": "userPeers" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "GroupOutPeer" - } - }, - "id": 7, - "name": "groupPeers" - } - ] - }, - "doc": [ - "Load all dialogs from grouped list" - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "enum", - "childType": "UpdateOptimization" - } - }, - "id": 1, - "name": "optimizations" - } - ] - } - }, - { - "type": "response", - "content": { - "name": "DialogsOrder", - "header": 235, - "doc": [ - "Dialogs order response", - { - "type": "reference", - "argument": "seq", - "category": "full", - "description": " update seq" - }, - { - "type": "reference", - "argument": "state", - "category": "full", - "description": " update state" - }, - { - "type": "reference", - "argument": "groups", - "category": "full", - "description": " Update groups" - } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "seq" - }, - { - "type": { - "type": "alias", - "childType": "seq_state" - }, - "id": 2, - "name": "state" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "DialogGroup" - } - }, - "id": 3, - "name": "groups" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "HideDialog", - "header": 231, - "response": { - "type": "reference", - "name": "DialogsOrder" - }, - "doc": [ - "Hide Dialog from grouped list", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": "Dialog peer" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "OutPeer" - }, - "id": 1, - "name": "peer" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "ShowDialog", - "header": 232, - "response": { - "type": "reference", - "name": "DialogsOrder" - }, - "doc": [ - "Show Dialog in grouped list" - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "OutPeer" - }, - "id": 1, - "name": "peer" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "FavouriteDialog", - "header": 224, - "response": { - "type": "reference", - "name": "DialogsOrder" - }, - "doc": [ - "Marking dialog as favourite", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": "Peer for favouriting" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "OutPeer" - }, - "id": 1, - "name": "peer" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "UnfavouriteDialog", - "header": 227, - "response": { - "type": "reference", - "name": "DialogsOrder" - }, - "doc": [ - "Making dialog as unfavourite", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": "Peer for favouriting" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "OutPeer" - }, - "id": 1, - "name": "peer" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "NotifyDialogOpened", - "header": 2785, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Notifying about dialog open", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": "Peer that was opened" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "OutPeer" - }, - "id": 1, - "name": "peer" - } - ] - } - } - ] - }, - { - "title": "Groups", - "package": "groups", - "items": [ - { - "type": "comment", - "content": "Entities" - }, - { - "type": "struct", - "content": { - "name": "Member", - "doc": [ - "Member information", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " User id" - }, - { - "type": "reference", - "argument": "inviterUid", - "category": "full", - "description": " User inviter id" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " Adding date" - }, - { - "type": "reference", - "argument": "isAdmin", - "category": "full", - "description": " is member admin of group" - } - ], - "expandable": "true", - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 2, - "name": "inviterUid" - }, - { - "type": "int64", - "id": 3, - "name": "date" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 4, - "name": "isAdmin" - } - ] - } - }, - { - "type": "enum", - "content": { - "name": "GroupType", - "values": [ - { - "name": "GROUP", - "id": 1 - }, - { - "name": "CHANNEL", - "id": 2 - } - ] - } - }, - { - "type": "enum", - "content": { - "name": "GroupPermissions", - "values": [ - { - "name": "SEND_MESSAGE", - "id": 1 - }, - { - "name": "CLEAR", - "id": 2 - }, - { - "name": "LEAVE", - "id": 3 - }, - { - "name": "DELETE", - "id": 4 - }, - { - "name": "JOIN", - "id": 5 - }, - { - "name": "VIEW_INFO", - "id": 6 - } - ] - } - }, - { - "type": "enum", - "content": { - "name": "GroupFullPermissions", - "values": [ - { - "name": "EDIT_INFO", - "id": 1 - }, - { - "name": "VIEW_MEMBERS", - "id": 2 - }, - { - "name": "INVITE_MEMBERS", - "id": 3 - }, - { - "name": "INVITE_VIA_LINK", - "id": 4 - }, - { - "name": "CALL", - "id": 5 - }, - { - "name": "EDIT_ADMIN_SETTINGS", - "id": 6 - }, - { - "name": "VIEW_ADMINS", - "id": 7 - }, - { - "name": "EDIT_ADMINS", - "id": 8 - }, - { - "name": "KICK_INVITED", - "id": 9 - }, - { - "name": "KICK_ANYONE", - "id": 10 - }, - { - "name": "EDIT_FOREIGN", - "id": 11 - }, - { - "name": "DELETE_FOREIGN", - "id": 12 - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "Group", - "doc": [ - "Group information", - "", - "Permissions.", - "Permissions of this structure is about group messages operation, such as", - "ability to send messages, clear chat, leave group and so on. This operations", - "Can be held outside of the Group Info page.", - "", - "Default value is ZERO, Opposide iz ONE. If Default is FALSE then ONE == TRUE.", - "If default is TRUE then ONE == FALSE.", - "Bits:", - "0 - canSendMessage. Default is FALSE.", - "1 - canClear. Default is FALSE.", - "2 - canLeave. Default is FALSE.", - "3 - canDelete. Default is FALSE.", - "4 - canJoin. Default is FALSE.", - "5 - canViewInfo. Default is FALSE.", - "", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": " group id" - }, - { - "type": "reference", - "argument": "accessHash", - "category": "danger", - "description": " Access hash of group" - }, - { - "type": "reference", - "argument": "title", - "category": "full", - "description": " Title of group" - }, - { - "type": "reference", - "argument": "avatar", - "category": "compact", - "description": " Avatar of group" - }, - { - "type": "reference", - "argument": "membersCount", - "category": "full", - "description": " Number of members" - }, - { - "type": "reference", - "argument": "isHidden", - "category": "full", - "description": " Is group hidden (not showing it in recent list). Default is false." - }, - { - "type": "reference", - "argument": "isMember", - "category": "full", - "description": " Is current user a member of a group. Default is true." - }, - { - "type": "reference", - "argument": "groupType", - "category": "full", - "description": " Group Type. Used only for displaying information. Default is GROUP." - }, - { - "type": "reference", - "argument": "permissions", - "category": "full", - "description": " Permissions of group object" - }, - { - "type": "reference", - "argument": "isDeleted", - "category": "full", - "description": " Is this group deleted" - }, - { - "type": "reference", - "argument": "ext", - "category": "full", - "description": " Group extension Data" - }, - { - "type": "reference", - "argument": "isAdmin", - "category": "full", - "description": " [DEPRECATED] Is current user an admin of a group" - }, - { - "type": "reference", - "argument": "theme", - "category": "hidden", - "description": " [DEPRECATED] Theme of group" - }, - { - "type": "reference", - "argument": "about", - "category": "hidden", - "description": " [DEPRECATED] About of group" - }, - { - "type": "reference", - "argument": "creatorUid", - "category": "hidden", - "description": " [DEPRECATED] Group creator" - }, - { - "type": "reference", - "argument": "members", - "category": "compact", - "description": " [DEPRECATED] Members of group" - }, - { - "type": "reference", - "argument": "createDate", - "category": "full", - "description": " [DEPRECATED] Date of creation" - } - ], - "expandable": "true", - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "id" - }, - { - "type": "int64", - "id": 2, - "name": "accessHash" - }, - { - "type": "string", - "id": 3, - "name": "title" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "Avatar" - } - }, - "id": 4, - "name": "avatar" - }, - { - "type": { - "type": "opt", - "childType": "int32" - }, - "id": 24, - "name": "membersCount" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 6, - "name": "isMember" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 20, - "name": "isHidden" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "enum", - "childType": "GroupType" - } - }, - "id": 25, - "name": "groupType" - }, - { - "type": { - "type": "opt", - "childType": "int64" - }, - "id": 26, - "name": "permissions" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 27, - "name": "isDeleted" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "MapValue" - } - }, - "id": 22, - "name": "ext" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 16, - "name": "isAdmin", - "deprecated": "true" - }, - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 8, - "name": "creatorUid", - "deprecated": "true" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Member" - } - }, - "id": 9, - "name": "members", - "deprecated": "true" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 10, - "name": "createDate", - "deprecated": "true" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 17, - "name": "theme", - "deprecated": "true" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 18, - "name": "about", - "deprecated": "true" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "GroupFull", - "doc": [ - "Goup Full information", - "Permissions.", - "Idea of Group Full mermissions is about Group Info pages. This permissions", - "are usefull only when trying to view and update group settings and not related", - "to chat messages itself.", - "Default value is ZERO, Opposide iz ONE. If Default is FALSE then ONE == TRUE.", - "If default is TRUE then ONE == FALSE.", - "Bits:", - "0 - canEditInfo. Default is FALSE.", - "1 - canViewMembers. Default is FALSE.", - "2 - canInviteMembers. Default is FALSE.", - "3 - canInviteViaLink. Default is FALSE.", - "4 - canCall. Default is FALSE.", - "5 - canEditAdminSettings. Default is FALSE.", - "6 - canViewAdmins. Default is FALSE.", - "7 - canEditAdmins. Default is FALSE.", - "8 - canKickInvited. Default is FALSE.", - "9 - canKickAnyone. Default is FALSE.", - "10 - canEditForeign. Default is FALSE.", - "11 - canDeleteForeign. Default is FALSE.", - "", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": " Group Id" - }, - { - "type": "reference", - "argument": "createDate", - "category": "full", - "description": " Date created" - }, - { - "type": "reference", - "argument": "ownerUid", - "category": "full", - "description": " Optional group owner" - }, - { - "type": "reference", - "argument": "members", - "category": "full", - "description": " Group members. Can be empty when isAsyncMembers enabled." - }, - { - "type": "reference", - "argument": "theme", - "category": "full", - "description": " Group Theme" - }, - { - "type": "reference", - "argument": "about", - "category": "full", - "description": " Group about" - }, - { - "type": "reference", - "argument": "isAsyncMembers", - "category": "full", - "description": " Is Members need to be loaded asynchronous. Default is false." - }, - { - "type": "reference", - "argument": "isSharedHistory", - "category": "full", - "description": " Is history shared among all users. Default is false." - }, - { - "type": "reference", - "argument": "shortName", - "category": "full", - "description": " Group's short name" - }, - { - "type": "reference", - "argument": "permissions", - "category": "full", - "description": " Group Permissions" - } - ], - "expandable": "true", - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "id" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 6, - "name": "createDate" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "alias", - "childType": "userId" - } - }, - "id": 5, - "name": "ownerUid" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Member" - } - }, - "id": 12, - "name": "members" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 2, - "name": "theme" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 3, - "name": "about" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "MapValue" - } - }, - "id": 7, - "name": "ext" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 11, - "name": "isAsyncMembers" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 10, - "name": "isSharedHistory" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 14, - "name": "shortName" - }, - { - "type": { - "type": "opt", - "childType": "int64" - }, - "id": 27, - "name": "permissions" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "LoadFullGroups", - "header": 2782, - "response": { - "type": "anonymous", - "header": 2783, - "doc": [ - { - "type": "reference", - "argument": "groups", - "category": "compact", - "description": " Groups to load" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "GroupFull" - } - }, - "id": 1, - "name": "groups" - } - ] - }, - "doc": [ - "Loading Full Groups", - { - "type": "reference", - "argument": "groups", - "category": "compact", - "description": "Groups to load" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "GroupOutPeer" - } - }, - "id": 1, - "name": "groups" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "LoadMembers", - "header": 2786, - "response": { - "type": "anonymous", - "header": 2787, - "doc": [ - { - "type": "reference", - "argument": "users", - "category": "full", - "description": " Group members" - }, - { - "type": "reference", - "argument": "next", - "category": "full", - "description": " Load more reference" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Member" - } - }, - "id": 3, - "name": "members" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "UserOutPeer" - } - }, - "id": 1, - "name": "users" - }, - { - "type": { - "type": "opt", - "childType": "bytes" - }, - "id": 2, - "name": "next" - } - ] - }, - "doc": [ - "Loading group members", - { - "type": "reference", - "argument": "group", - "category": "full", - "description": "Group peer" - }, - { - "type": "reference", - "argument": "limit", - "category": "full", - "description": "Limit members" - }, - { - "type": "reference", - "argument": "next", - "category": "full", - "description": "Load more reference" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "GroupOutPeer" - }, - "id": 1, - "name": "group" - }, - { - "type": "int32", - "id": 2, - "name": "limit" - }, - { - "type": { - "type": "opt", - "childType": "bytes" - }, - "id": 3, - "name": "next" - } - ] - } - }, - { - "type": "comment", - "content": "Update" - }, - { - "type": "update", - "content": { - "name": "GroupTitleChanged", - "header": 2609, - "doc": [ - "Update about title changed", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - }, - { - "type": "reference", - "argument": "title", - "category": "full", - "description": " Group Title" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - }, - { - "type": "string", - "id": 2, - "name": "title" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "GroupAvatarChanged", - "header": 2610, - "doc": [ - "Update about avatar changed", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - }, - { - "type": "reference", - "argument": "avatar", - "category": "full", - "description": " Group Avatar" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "Avatar" - } - }, - "id": 2, - "name": "avatar" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "GroupTopicChanged", - "header": 2616, - "doc": [ - "Update about topic changed", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - }, - { - "type": "reference", - "argument": "topic", - "category": "full", - "description": " Updated topic" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 2, - "name": "topic" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "GroupAboutChanged", - "header": 2617, - "doc": [ - "Update about about changed", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - }, - { - "type": "reference", - "argument": "about", - "category": "full", - "description": " Updated about" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 2, - "name": "about" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "GroupExtChanged", - "header": 2613, - "doc": [ - "Update about ext changed", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - }, - { - "type": "reference", - "argument": "ext", - "category": "full", - "description": " Updated ext" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "MapValue" - } - }, - "id": 2, - "name": "ext" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "GroupFullExtChanged", - "header": 2618, - "doc": [ - "Update about full ext changed", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - }, - { - "type": "reference", - "argument": "ext", - "category": "full", - "description": " Updated ext" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "MapValue" - } - }, - "id": 2, - "name": "ext" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "GroupShortNameChanged", - "header": 2628, - "doc": [ - "Group's short name changed", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - }, - { - "type": "reference", - "argument": "shortName", - "category": "full", - "description": " Group short name" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 2, - "name": "shortName" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "GroupOwnerChanged", - "header": 2619, - "doc": [ - "Update about owner changed", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - }, - { - "type": "reference", - "argument": "userId", - "category": "full", - "description": " New Owner" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - }, - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 2, - "name": "userId" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "GroupHistoryShared", - "header": 2620, - "doc": [ - "Update about history shared", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "GroupDeleted", - "header": 2658, - "doc": [ - "Update about group deleted", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "GroupPermissionsChanged", - "header": 2663, - "doc": [ - "Update about group permissions changed", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - }, - { - "type": "reference", - "argument": "permissions", - "category": "full", - "description": " New Permissions" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - }, - { - "type": "int64", - "id": 2, - "name": "permissions" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "GroupFullPermissionsChanged", - "header": 2664, - "doc": [ - "Update about Full Group permissions changed", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - }, - { - "type": "reference", - "argument": "permissions", - "category": "full", - "description": " New Permissions" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - }, - { - "type": "int64", - "id": 2, - "name": "permissions" - } - ] - } - }, - { - "type": "comment", - "content": " " - }, - { - "type": "update", - "content": { - "name": "GroupMemberChanged", - "header": 2612, - "doc": [ - "Update about membership changed", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - }, - { - "type": "reference", - "argument": "isMember", - "category": "full", - "description": " Is current user a member" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - }, - { - "type": "bool", - "id": 2, - "name": "isMember" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "GroupMembersBecameAsync", - "header": 2615, - "doc": [ - "Update about members became async", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "GroupMembersUpdated", - "header": 2614, - "doc": [ - "Update about members updated", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - }, - { - "type": "reference", - "argument": "members", - "category": "full", - "description": " Group Members" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Member" - } - }, - "id": 2, - "name": "members" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "GroupMemberDiff", - "header": 2623, - "doc": [ - "Update about members changed", - { - "type": "reference", - "argument": "removedUsers", - "category": "full", - "description": " Removed Users" - }, - { - "type": "reference", - "argument": "addedMembers", - "category": "full", - "description": " Added members" - }, - { - "type": "reference", - "argument": "membersCount", - "category": "full", - "description": " Current Members count" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - }, - { - "type": { - "type": "list", - "childType": { - "type": "alias", - "childType": "userId" - } - }, - "id": 2, - "name": "removedUsers" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Member" - } - }, - "id": 3, - "name": "addedMembers" - }, - { - "type": "int32", - "id": 4, - "name": "membersCount" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "GroupMembersCountChanged", - "header": 2622, - "doc": [ - "Update about members count changed", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - }, - { - "type": "reference", - "argument": "membersCount", - "category": "full", - "description": " Members count" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - }, - { - "type": "int32", - "id": 2, - "name": "membersCount" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "GroupMemberAdminChanged", - "header": 2627, - "doc": [ - "Update about member admin changed", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - }, - { - "type": "reference", - "argument": "userId", - "category": "full", - "description": " User Id" - }, - { - "type": "reference", - "argument": "isAdmin", - "category": "full", - "description": " Is Admin flag" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - }, - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 2, - "name": "userId" - }, - { - "type": "bool", - "id": 3, - "name": "isAdmin" - } - ] - } - }, - { - "type": "comment", - "content": "Actions" - }, - { - "type": "rpc", - "content": { - "name": "CreateGroup", - "header": 230, - "response": { - "type": "anonymous", - "header": 216, - "doc": [ - "Created group", - { - "type": "reference", - "argument": "seq", - "category": "full", - "description": " Update Seq" - }, - { - "type": "reference", - "argument": "state", - "category": "compact", - "description": " Update state" - }, - { - "type": "reference", - "argument": "group", - "category": "full", - "description": " Created group" - }, - { - "type": "reference", - "argument": "users", - "category": "full", - "description": " Referenced users" - }, - { - "type": "reference", - "argument": "userPeers", - "category": "full", - "description": " Referenced users" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " Group creation date" - } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "seq" - }, - { - "type": { - "type": "alias", - "childType": "seq_state" - }, - "id": 2, - "name": "state" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 6, - "name": "date" - }, - { - "type": { - "type": "struct", - "childType": "Group" - }, - "id": 3, - "name": "group" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "User" - } - }, - "id": 4, - "name": "users" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "UserOutPeer" - } - }, - "id": 5, - "name": "userPeers" - } - ] - }, - "doc": [ - "Creating group chat", - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": "Random Id for avoiding double create" - }, - { - "type": "reference", - "argument": "title", - "category": "full", - "description": "Group Title" - }, - { - "type": "reference", - "argument": "users", - "category": "hidden", - "description": "Members of group" - }, - { - "type": "reference", - "argument": "groupType", - "category": "full", - "description": "Group Type" - }, - { - "type": "reference", - "argument": "optimizations", - "category": "full", - "description": "Enabled Optimizations" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 1, - "name": "rid" - }, - { - "type": "string", - "id": 2, - "name": "title" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "UserOutPeer" - } - }, - "id": 3, - "name": "users" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "enum", - "childType": "GroupType" - } - }, - "id": 6, - "name": "groupType" - }, - { - "type": { - "type": "list", - "childType": { - "type": "enum", - "childType": "UpdateOptimization" - } - }, - "id": 7, - "name": "optimizations" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "EditGroupTitle", - "header": 85, - "response": { - "type": "reference", - "name": "SeqDate" - }, - "doc": [ - "Changing group title", - { - "type": "reference", - "argument": "groupPeer", - "category": "full", - "description": "Group's peer" - }, - { - "type": "reference", - "argument": "title", - "category": "full", - "description": "new group title" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": "Random Id of operation" - }, - { - "type": "reference", - "argument": "optimizations", - "category": "full", - "description": "Enabled Optimizations" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "GroupOutPeer" - }, - "id": 1, - "name": "groupPeer" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 4, - "name": "rid" - }, - { - "type": "string", - "id": 3, - "name": "title" - }, - { - "type": { - "type": "list", - "childType": { - "type": "enum", - "childType": "UpdateOptimization" - } - }, - "id": 5, - "name": "optimizations" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "EditGroupAvatar", - "header": 86, - "response": { - "type": "anonymous", - "header": 115, - "doc": [ - "Updated group avatar", - { - "type": "reference", - "argument": "avatar", - "category": "compact", - "description": " Changed avatar" - }, - { - "type": "reference", - "argument": "seq", - "category": "full", - "description": " Sequence number" - }, - { - "type": "reference", - "argument": "state", - "category": "compact", - "description": " Sequence state" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " Avatar change date" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Avatar" - }, - "id": 1, - "name": "avatar" - }, - { - "type": "int32", - "id": 2, - "name": "seq" - }, - { - "type": { - "type": "alias", - "childType": "seq_state" - }, - "id": 3, - "name": "state" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 4, - "name": "date" - } - ] - }, - "doc": [ - "Changing group avatar", - { - "type": "reference", - "argument": "groupPeer", - "category": "full", - "description": "Group's peer" - }, - { - "type": "reference", - "argument": "fileLocation", - "category": "compact", - "description": "uploaded file for avatar" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": "Random Id of operation" - }, - { - "type": "reference", - "argument": "optimizations", - "category": "full", - "description": "Enabled Optimizations" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "GroupOutPeer" - }, - "id": 1, - "name": "groupPeer" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 4, - "name": "rid" - }, - { - "type": { - "type": "struct", - "childType": "FileLocation" - }, - "id": 3, - "name": "fileLocation" - }, - { - "type": { - "type": "list", - "childType": { - "type": "enum", - "childType": "UpdateOptimization" - } - }, - "id": 5, - "name": "optimizations" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "RemoveGroupAvatar", - "header": 101, - "response": { - "type": "reference", - "name": "SeqDate" - }, - "doc": [ - "Removing group avatar", - { - "type": "reference", - "argument": "groupPeer", - "category": "full", - "description": "Group's peer" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": "Random Id of operation" - }, - { - "type": "reference", - "argument": "optimizations", - "category": "full", - "description": "Enabled Optimizations" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "GroupOutPeer" - }, - "id": 1, - "name": "groupPeer" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 4, - "name": "rid" - }, - { - "type": { - "type": "list", - "childType": { - "type": "enum", - "childType": "UpdateOptimization" - } - }, - "id": 5, - "name": "optimizations" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "EditGroupShortName", - "header": 2793, - "response": { - "type": "reference", - "name": "Seq" - }, - "doc": [ - "Edit Group Short Name", - { - "type": "reference", - "argument": "groupPeer", - "category": "full", - "description": "Group's peer" - }, - { - "type": "reference", - "argument": "shortName", - "category": "full", - "description": "New group's short name" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "GroupOutPeer" - }, - "id": 1, - "name": "groupPeer" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 2, - "name": "shortName" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "EditGroupTopic", - "header": 211, - "response": { - "type": "reference", - "name": "SeqDate" - }, - "doc": [ - "Edit group topic", - { - "type": "reference", - "argument": "groupPeer", - "category": "full", - "description": "Group's peer" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": "Random id of operation" - }, - { - "type": "reference", - "argument": "topic", - "category": "full", - "description": "New Topic" - }, - { - "type": "reference", - "argument": "optimizations", - "category": "full", - "description": "Enabled Optimizations" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "GroupOutPeer" - }, - "id": 1, - "name": "groupPeer" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 2, - "name": "rid" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 3, - "name": "topic" - }, - { - "type": { - "type": "list", - "childType": { - "type": "enum", - "childType": "UpdateOptimization" - } - }, - "id": 4, - "name": "optimizations" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "EditGroupAbout", - "header": 213, - "response": { - "type": "reference", - "name": "SeqDate" - }, - "doc": [ - "Edit Group About", - { - "type": "reference", - "argument": "groupPeer", - "category": "full", - "description": "Group's peer" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": "Random id of operation" - }, - { - "type": "reference", - "argument": "about", - "category": "full", - "description": "New About" - }, - { - "type": "reference", - "argument": "optimizations", - "category": "full", - "description": "Enabled Optimizations" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "GroupOutPeer" - }, - "id": 1, - "name": "groupPeer" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 2, - "name": "rid" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 3, - "name": "about" - }, - { - "type": { - "type": "list", - "childType": { - "type": "enum", - "childType": "UpdateOptimization" - } - }, - "id": 5, - "name": "optimizations" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "InviteUser", - "header": 69, - "response": { - "type": "reference", - "name": "SeqDate" - }, - "doc": [ - "Inviting user to group", - { - "type": "reference", - "argument": "groupPeer", - "category": "full", - "description": "Group's peer" - }, - { - "type": "reference", - "argument": "user", - "category": "full", - "description": "Users for invitation" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": "Random Id of operation" - }, - { - "type": "reference", - "argument": "optimizations", - "category": "full", - "description": "Enabled Optimizations" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "GroupOutPeer" - }, - "id": 1, - "name": "groupPeer" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 4, - "name": "rid" - }, - { - "type": { - "type": "struct", - "childType": "UserOutPeer" - }, - "id": 3, - "name": "user" - }, - { - "type": { - "type": "list", - "childType": { - "type": "enum", - "childType": "UpdateOptimization" - } - }, - "id": 5, - "name": "optimizations" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "LeaveGroup", - "header": 70, - "response": { - "type": "reference", - "name": "SeqDate" - }, - "doc": [ - "Leaving group", - { - "type": "reference", - "argument": "groupPeer", - "category": "full", - "description": "Group's peer" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": "Random Id of operation" - }, - { - "type": "reference", - "argument": "optimizations", - "category": "full", - "description": "Enabled Optimizations" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "GroupOutPeer" - }, - "id": 1, - "name": "groupPeer" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 2, - "name": "rid" - }, - { - "type": { - "type": "list", - "childType": { - "type": "enum", - "childType": "UpdateOptimization" - } - }, - "id": 3, - "name": "optimizations" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "LeaveAndDelete", - "header": 2721, - "response": { - "type": "reference", - "name": "Seq" - }, - "doc": [ - "Leave group and Delete Chat", - { - "type": "reference", - "argument": "groupPeer", - "category": "full", - "description": "Group peer" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "GroupOutPeer" - }, - "id": 1, - "name": "groupPeer" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "KickUser", - "header": 71, - "response": { - "type": "reference", - "name": "SeqDate" - }, - "doc": [ - "Kicking user from group", - { - "type": "reference", - "argument": "groupPeer", - "category": "full", - "description": "Group's peer" - }, - { - "type": "reference", - "argument": "user", - "category": "full", - "description": "users for removing" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": "Random Id of operation" - }, - { - "type": "reference", - "argument": "optimizations", - "category": "full", - "description": "Enabled Optimizations" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "GroupOutPeer" - }, - "id": 1, - "name": "groupPeer" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 4, - "name": "rid" - }, - { - "type": { - "type": "struct", - "childType": "UserOutPeer" - }, - "id": 3, - "name": "user" - }, - { - "type": { - "type": "list", - "childType": { - "type": "enum", - "childType": "UpdateOptimization" - } - }, - "id": 5, - "name": "optimizations" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "JoinGroupByPeer", - "header": 2722, - "response": { - "type": "reference", - "name": "Seq" - }, - "doc": [ - "Join group by peer", - { - "type": "reference", - "argument": "groupPeer", - "category": "full", - "description": "Group's peer" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "GroupOutPeer" - }, - "id": 1, - "name": "groupPeer" - } - ] - } - }, - { - "type": "comment", - "content": "Administration" - }, - { - "type": "rpc", - "content": { - "name": "MakeUserAdmin", - "header": 2784, - "response": { - "type": "reference", - "name": "SeqDate" - }, - "doc": [ - "Make user admin", - { - "type": "reference", - "argument": "groupPeer", - "category": "full", - "description": "Group's peer" - }, - { - "type": "reference", - "argument": "userPeer", - "category": "full", - "description": "User's peer" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "GroupOutPeer" - }, - "id": 1, - "name": "groupPeer" - }, - { - "type": { - "type": "struct", - "childType": "UserOutPeer" - }, - "id": 2, - "name": "userPeer" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "DismissUserAdmin", - "header": 2791, - "response": { - "type": "reference", - "name": "Seq" - }, - "doc": [ - "Dismissing user admin", - { - "type": "reference", - "argument": "groupPeer", - "category": "full", - "description": "Group's peer" - }, - { - "type": "reference", - "argument": "userPeer", - "category": "full", - "description": "User's peer" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "GroupOutPeer" - }, - "id": 1, - "name": "groupPeer" - }, - { - "type": { - "type": "struct", - "childType": "UserOutPeer" - }, - "id": 2, - "name": "userPeer" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "TransferOwnership", - "header": 2789, - "response": { - "type": "reference", - "name": "SeqDate" - }, - "doc": [ - "Transfer ownership of group", - { - "type": "reference", - "argument": "groupPeer", - "category": "full", - "description": "Group's peer" - }, - { - "type": "reference", - "argument": "newOwner", - "category": "full", - "description": "New group's owner" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "GroupOutPeer" - }, - "id": 1, - "name": "groupPeer" - }, - { - "type": { - "type": "struct", - "childType": "UserOutPeer" - }, - "id": 2, - "name": "newOwner" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "AdminSettings", - "doc": [ - "Admin Settings", - { - "type": "reference", - "argument": "showAdminsToMembers", - "category": "full", - "description": " Show admins in member list" - }, - { - "type": "reference", - "argument": "canMembersInvite", - "category": "full", - "description": " Can members of a group invite people" - }, - { - "type": "reference", - "argument": "canMembersEditGroupInfo", - "category": "full", - "description": " Can members edit group info" - }, - { - "type": "reference", - "argument": "canAdminsEditGroupInfo", - "category": "full", - "description": " Can admins edit group info" - }, - { - "type": "reference", - "argument": "showJoinLeaveMessages", - "category": "full", - "description": " Should join and leave messages be visible to members" - } - ], - "expandable": "true", - "attributes": [ - { - "type": "bool", - "id": 1, - "name": "showAdminsToMembers" - }, - { - "type": "bool", - "id": 2, - "name": "canMembersInvite" - }, - { - "type": "bool", - "id": 3, - "name": "canMembersEditGroupInfo" - }, - { - "type": "bool", - "id": 4, - "name": "canAdminsEditGroupInfo" - }, - { - "type": "bool", - "id": 5, - "name": "showJoinLeaveMessages" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "LoadAdminSettings", - "header": 2790, - "response": { - "type": "anonymous", - "header": 2794, - "doc": [ - "Loaded settings", - { - "type": "reference", - "argument": "settings", - "category": "full", - "description": " Current group admin settings" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "AdminSettings" - }, - "id": 1, - "name": "settings" - } - ] - }, - "doc": [ - "Loading administration settings", - { - "type": "reference", - "argument": "groupPeer", - "category": "full", - "description": "Group's peer" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "GroupOutPeer" - }, - "id": 1, - "name": "groupPeer" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "SaveAdminSettings", - "header": 2792, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Save administartion settings", - { - "type": "reference", - "argument": "groupPeer", - "category": "full", - "description": "Group's Peer" - }, - { - "type": "reference", - "argument": "settings", - "category": "full", - "description": "Group's settings" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "GroupOutPeer" - }, - "id": 1, - "name": "groupPeer" - }, - { - "type": { - "type": "struct", - "childType": "AdminSettings" - }, - "id": 2, - "name": "settings" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "DeleteGroup", - "header": 2795, - "response": { - "type": "reference", - "name": "Seq" - }, - "doc": [ - "Delete Group", - { - "type": "reference", - "argument": "groupPeer", - "category": "full", - "description": "Group's peer" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "GroupOutPeer" - }, - "id": 1, - "name": "groupPeer" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "ShareHistory", - "header": 2796, - "response": { - "type": "reference", - "name": "Seq" - }, - "doc": [ - "Share History", - { - "type": "reference", - "argument": "groupPeer", - "category": "full", - "description": "Group's peer" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "GroupOutPeer" - }, - "id": 1, - "name": "groupPeer" - } - ] - } - }, - { - "type": "comment", - "content": "Invite" - }, - { - "type": "response", - "content": { - "name": "InviteUrl", - "header": 178, - "doc": [ - "Response for invite url methods" - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "url" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "GetGroupInviteUrl", - "header": 177, - "response": { - "type": "reference", - "name": "InviteUrl" - }, - "doc": [ - "Building invite url", - { - "type": "reference", - "argument": "groupPeer", - "category": "full", - "description": "Destination group peer" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "GroupOutPeer" - }, - "id": 1, - "name": "groupPeer" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "RevokeInviteUrl", - "header": 179, - "response": { - "type": "reference", - "name": "InviteUrl" - }, - "doc": [ - "Revoking invite urls", - { - "type": "reference", - "argument": "groupPeer", - "category": "full", - "description": "Destination group peer" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "GroupOutPeer" - }, - "id": 1, - "name": "groupPeer" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "JoinGroup", - "header": 180, - "response": { - "type": "anonymous", - "header": 181, - "doc": [ - { - "type": "reference", - "argument": "group", - "category": "hidden", - "description": " Joined group" - }, - { - "type": "reference", - "argument": "users", - "category": "hidden", - "description": " Users from members" - }, - { - "type": "reference", - "argument": "userPeers", - "category": "hidden", - "description": " User Peers" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": " Random id" - }, - { - "type": "reference", - "argument": "seq", - "category": "full", - "description": " Sequence number" - }, - { - "type": "reference", - "argument": "state", - "category": "hidden", - "description": " State" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " Date of join" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Group" - }, - "id": 1, - "name": "group" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "User" - } - }, - "id": 5, - "name": "users" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "UserOutPeer" - } - }, - "id": 7, - "name": "userPeers" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 6, - "name": "rid" - }, - { - "type": "int32", - "id": 2, - "name": "seq" - }, - { - "type": { - "type": "alias", - "childType": "seq_state" - }, - "id": 3, - "name": "state" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 4, - "name": "date" - } - ] - }, - "doc": [ - "Join group method", - { - "type": "reference", - "argument": "token", - "category": "full", - "description": "Url or Token for joining to group" - }, - { - "type": "reference", - "argument": "optimizations", - "category": "hidden", - "description": "Enabled Optimizations" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "token" - }, - { - "type": { - "type": "list", - "childType": { - "type": "enum", - "childType": "UpdateOptimization" - } - }, - "id": 2, - "name": "optimizations" - } - ] - } - }, - { - "type": "comment", - "content": "Obsolete Actions" - }, - { - "type": "rpc", - "content": { - "name": "CreateGroupObsolete", - "header": 65, - "response": { - "type": "anonymous", - "header": 66, - "doc": [ - "Created group", - { - "type": "reference", - "argument": "groupPeer", - "category": "full", - "description": " Peer of created group" - }, - { - "type": "reference", - "argument": "seq", - "category": "full", - "description": " Sequence number" - }, - { - "type": "reference", - "argument": "state", - "category": "compact", - "description": " Sequence state" - }, - { - "type": "reference", - "argument": "users", - "category": "compact", - "description": " Members of created group" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " Group creation date" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "GroupOutPeer" - }, - "id": 1, - "name": "groupPeer" - }, - { - "type": "int32", - "id": 3, - "name": "seq" - }, - { - "type": { - "type": "alias", - "childType": "seq_state" - }, - "id": 4, - "name": "state" - }, - { - "type": { - "type": "list", - "childType": "int32" - }, - "id": 5, - "name": "users" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 6, - "name": "date" - } - ] - }, - "doc": [ - "[OBSOLETE] Creating group chat", - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": "Random Id for avoiding double create" - }, - { - "type": "reference", - "argument": "title", - "category": "full", - "description": "Title of new group" - }, - { - "type": "reference", - "argument": "users", - "category": "compact", - "description": "Members of new group" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 1, - "name": "rid" - }, - { - "type": "string", - "id": 2, - "name": "title" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "UserOutPeer" - } - }, - "id": 3, - "name": "users" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "EnterGroupObsolete", - "header": 199, - "response": { - "type": "anonymous", - "header": 200, - "doc": [ - "Joined group", - { - "type": "reference", - "argument": "group", - "category": "full", - "description": " Joined group" - }, - { - "type": "reference", - "argument": "users", - "category": "full", - "description": " Referenced users" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": " Rid of join message" - }, - { - "type": "reference", - "argument": "seq", - "category": "full", - "description": " Seq of Update" - }, - { - "type": "reference", - "argument": "state", - "category": "full", - "description": " State of Update" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " Date of update" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Group" - }, - "id": 1, - "name": "group" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "User" - } - }, - "id": 2, - "name": "users" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 3, - "name": "rid" - }, - { - "type": "int32", - "id": 4, - "name": "seq" - }, - { - "type": { - "type": "alias", - "childType": "seq_state" - }, - "id": 5, - "name": "state" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 6, - "name": "date" - } - ] - }, - "doc": [ - "[OBSOLETE] Join random group by peer id", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": "Public group peer" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "GroupOutPeer" - }, - "id": 1, - "name": "peer" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "MakeUserAdminObsolete", - "header": 214, - "response": { - "type": "anonymous", - "header": 215, - "doc": [ - { - "type": "reference", - "argument": "members", - "category": "full", - "description": " new members" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Member" - } - }, - "id": 1, - "name": "members" - }, - { - "type": "int32", - "id": 2, - "name": "seq" - }, - { - "type": { - "type": "alias", - "childType": "seq_state" - }, - "id": 3, - "name": "state" - } - ] - }, - "doc": [ - "[OBSOLETE] Make user admin", - { - "type": "reference", - "argument": "groupPeer", - "category": "full", - "description": "Group's peer" - }, - { - "type": "reference", - "argument": "userPeer", - "category": "full", - "description": "User's peer" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "GroupOutPeer" - }, - "id": 1, - "name": "groupPeer" - }, - { - "type": { - "type": "struct", - "childType": "UserOutPeer" - }, - "id": 2, - "name": "userPeer" - } - ] - } - }, - { - "type": "comment", - "content": "Obsolete Updates" - }, - { - "type": "update", - "content": { - "name": "GroupInviteObsolete", - "header": 36, - "doc": [ - "Update about inviting current user to group", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - }, - { - "type": "reference", - "argument": "inviteUid", - "category": "full", - "description": " Inviter UID. If equals to current uid than group created by user." - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " Date of creating" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": " Random Id of operation" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 9, - "name": "rid" - }, - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 5, - "name": "inviteUid" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 8, - "name": "date" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "GroupUserInvitedObsolete", - "header": 21, - "doc": [ - "Update about inviting user to group", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - }, - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " Added user ID" - }, - { - "type": "reference", - "argument": "inviterUid", - "category": "full", - "description": " Inviter user ID" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " Date of adding user to group" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": " Random Id of operation" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 5, - "name": "rid" - }, - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 2, - "name": "uid" - }, - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 3, - "name": "inviterUid" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 4, - "name": "date" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "GroupUserLeaveObsolete", - "header": 23, - "doc": [ - "Update about leaving user", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - }, - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " User's ID" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " Date of user leave" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": " Random Id of operation" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 4, - "name": "rid" - }, - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 2, - "name": "uid" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 3, - "name": "date" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "GroupUserKickObsolete", - "header": 24, - "doc": [ - "Update about kicking user", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - }, - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " Kicked user's ID" - }, - { - "type": "reference", - "argument": "kickerUid", - "category": "full", - "description": " Kicker user's ID" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " Date of user kick" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": " Random Id of operation" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 5, - "name": "rid" - }, - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 2, - "name": "uid" - }, - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 3, - "name": "kickerUid" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 4, - "name": "date" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "GroupMembersUpdateObsolete", - "header": 44, - "doc": [ - "Silent group members update", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - }, - { - "type": "reference", - "argument": "members", - "category": "full", - "description": " New members list" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Member" - } - }, - "id": 2, - "name": "members" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "GroupTitleChangedObsolete", - "header": 38, - "doc": [ - "Update about group title change", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - }, - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " Changer UID" - }, - { - "type": "reference", - "argument": "title", - "category": "full", - "description": " New Title of group" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " Date of title change" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": " Random Id of operation" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 5, - "name": "rid" - }, - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 2, - "name": "uid" - }, - { - "type": "string", - "id": 3, - "name": "title" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 4, - "name": "date" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "GroupTopicChangedObsolete", - "header": 213, - "doc": [ - "Update about group topic change", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - }, - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " Changer UID" - }, - { - "type": "reference", - "argument": "topic", - "category": "full", - "description": " New topic of group" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " Date of theme change" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": " Randomd Id of operation" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 2, - "name": "rid" - }, - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 3, - "name": "uid" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 4, - "name": "topic" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 5, - "name": "date" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "GroupAboutChangedObsolete", - "header": 214, - "doc": [ - "Update about group about change", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - }, - { - "type": "reference", - "argument": "about", - "category": "full", - "description": " Group about" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 2, - "name": "about" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "GroupAvatarChangedObsolete", - "header": 39, - "doc": [ - "Update about group avatar change", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - }, - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " Avatar changer uid" - }, - { - "type": "reference", - "argument": "avatar", - "category": "compact", - "description": " New Avatar. If null then avatar is removed" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " Date of avatar change" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": " Random Id of operation" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 5, - "name": "rid" - }, - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 2, - "name": "uid" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "Avatar" - } - }, - "id": 3, - "name": "avatar" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 4, - "name": "date" - } - ] - } - } - ] - }, - { - "title": "Stickers", - "package": "stickers", - "doc": [ - "Stickers support in Actor" - ], - "items": [ - { - "type": "struct", - "content": { - "name": "StickerDescriptor", - "doc": [ - "Descriptor of a Sticker", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": " Sticker unique id" - }, - { - "type": "reference", - "argument": "emoji", - "category": "full", - "description": " Emoji code for sticker" - }, - { - "type": "reference", - "argument": "image128", - "category": "full", - "description": " Image of sticker 128x128 in WebP format" - }, - { - "type": "reference", - "argument": "image512", - "category": "full", - "description": " Image of sticker 512x512 in WebP format" - }, - { - "type": "reference", - "argument": "image256", - "category": "full", - "description": " Image of sticker 256x256 in WebP format" - } - ], - "expandable": "true", - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "id" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 2, - "name": "emoji" - }, - { - "type": { - "type": "struct", - "childType": "ImageLocation" - }, - "id": 3, - "name": "image128" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "ImageLocation" - } - }, - "id": 4, - "name": "image512" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "ImageLocation" - } - }, - "id": 5, - "name": "image256" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "StickerCollection", - "doc": [ - "Sticker collection", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": " Unique id of a collection" - }, - { - "type": "reference", - "argument": "accessHash", - "category": "full", - "description": " Access Hash of a collection" - }, - { - "type": "reference", - "argument": "stickers", - "category": "compact", - "description": " Sticker list" - } - ], - "expandable": "true", - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "id" - }, - { - "type": "int64", - "id": 2, - "name": "accessHash" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "StickerDescriptor" - } - }, - "id": 3, - "name": "stickers" - } - ] - } - }, - { - "type": "response", - "content": { - "name": "StickersReponse", - "header": 240, - "doc": [ - "Stickers response", - { - "type": "reference", - "argument": "collections", - "category": "full", - "description": " Sticker collections" - }, - { - "type": "reference", - "argument": "seq", - "category": "full", - "description": " Seq of update" - }, - { - "type": "reference", - "argument": "state", - "category": "full", - "description": " State of update" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "StickerCollection" - } - }, - "id": 1, - "name": "collections" - }, - { - "type": "int32", - "id": 2, - "name": "seq" - }, - { - "type": { - "type": "alias", - "childType": "seq_state" - }, - "id": 3, - "name": "state" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "LoadOwnStickers", - "header": 238, - "response": { - "type": "anonymous", - "header": 239, - "doc": [ - "Own Stickers collections", - { - "type": "reference", - "argument": "ownStickers", - "category": "hidden", - "description": " Own sticker collections" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "StickerCollection" - } - }, - "id": 1, - "name": "ownStickers" - } - ] - }, - "doc": [ - "Loading own stickers" - ], - "attributes": [] - } - }, - { - "type": "update", - "content": { - "name": "OwnStickersChanged", - "header": 161, - "doc": [ - "Own Stickers changed", - { - "type": "reference", - "argument": "collections", - "category": "compact", - "description": " New own sticker collections" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "StickerCollection" - } - }, - "id": 1, - "name": "collections" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "StickerCollectionsChanged", - "header": 164, - "doc": [ - "Sticker collection changed", - { - "type": "reference", - "argument": "collections", - "category": "full", - "description": " Updated sticker collections" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "StickerCollection" - } - }, - "id": 1, - "name": "collections" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "AddStickerCollection", - "header": 244, - "response": { - "type": "reference", - "name": "StickersReponse" - }, - "doc": [ - "Adding sticker collection", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": "Collection id" - }, - { - "type": "reference", - "argument": "accessHash", - "category": "full", - "description": "Collection access hash" - } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "id" - }, - { - "type": "int64", - "id": 2, - "name": "accessHash" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "RemoveStickerCollection", - "header": 245, - "response": { - "type": "reference", - "name": "StickersReponse" - }, - "doc": [ - "Removing sticker collection", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": "Collection id" - }, - { - "type": "reference", - "argument": "accessHash", - "category": "full", - "description": "Collection access hash" - } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "id" - }, - { - "type": "int64", - "id": 2, - "name": "accessHash" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "LoadStickerCollection", - "header": 246, - "response": { - "type": "anonymous", - "header": 247, - "doc": [ - "Loaded collection", - { - "type": "reference", - "argument": "collection", - "category": "full", - "description": " Collection of stickers" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "StickerCollection" - }, - "id": 1, - "name": "collection" - } - ] - }, - "doc": [ - "Loading stickers", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": "Collection id" - }, - { - "type": "reference", - "argument": "accessHash", - "category": "full", - "description": "Collection access hash" - } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "id" - }, - { - "type": "int64", - "id": 2, - "name": "accessHash" - } - ] - } - } - ] - }, - { - "title": "Search", - "package": "search", - "doc": [ - "Searching API" - ], - "items": [ - { - "type": "enum", - "content": { - "name": "SearchPeerType", - "values": [ - { - "name": "Groups", - "id": 1 - }, - { - "name": "Contacts", - "id": 2 - }, - { - "name": "Public", - "id": 3 - } - ] - } - }, - { - "type": "enum", - "content": { - "name": "SearchContentType", - "values": [ - { - "name": "Any", - "id": 1 - }, - { - "name": "Text", - "id": 2 - }, - { - "name": "Links", - "id": 3 - }, - { - "name": "Documents", - "id": 4 - }, - { - "name": "Photos", - "id": 5 - } - ] - } - }, - { - "type": "trait", - "content": { - "isContainer": "true", - "name": "SearchCondition", - "attributes": [] - } - }, - { - "type": "struct", - "content": { - "name": "SearchPeerTypeCondition", - "doc": [ - "Search peer type condition", - { - "type": "reference", - "argument": "peerType", - "category": "full", - "description": " Peer type for searching" - } - ], - "trait": { - "name": "SearchCondition", - "key": 1 - }, - "attributes": [ - { - "type": { - "type": "enum", - "childType": "SearchPeerType" - }, - "id": 1, - "name": "peerType" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "SearchPieceText", - "doc": [ - "Search peer name condition", - { - "type": "reference", - "argument": "query", - "category": "full", - "description": " Search query" - } - ], - "trait": { - "name": "SearchCondition", - "key": 2 - }, - "attributes": [ - { - "type": "string", - "id": 1, - "name": "query" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "SearchAndCondition", - "doc": [ - "Search AND condion", - { - "type": "reference", - "argument": "andQuery", - "category": "full", - "description": " And Query" - } - ], - "trait": { - "name": "SearchCondition", - "key": 3 - }, - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "trait", - "childType": "SearchCondition" - } - }, - "id": 1, - "name": "andQuery" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "SearchOrCondition", - "doc": [ - "Search OR condition", - { - "type": "reference", - "argument": "orQuery", - "category": "full", - "description": " Or Query" - } - ], - "trait": { - "name": "SearchCondition", - "key": 4 - }, - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "trait", - "childType": "SearchCondition" - } - }, - "id": 2, - "name": "orQuery" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "SearchPeerCondition", - "doc": [ - "Serch Peer condition", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": " Peer condition" - } - ], - "trait": { - "name": "SearchCondition", - "key": 5 - }, - "attributes": [ - { - "type": { - "type": "struct", - "childType": "OutPeer" - }, - "id": 1, - "name": "peer" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "SearchPeerContentType", - "doc": [ - "Search content type condition", - { - "type": "reference", - "argument": "contentType", - "category": "full", - "description": " Content Type" - } - ], - "trait": { - "name": "SearchCondition", - "key": 6 - }, - "attributes": [ - { - "type": { - "type": "enum", - "childType": "SearchContentType" - }, - "id": 1, - "name": "contentType" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "SearchSenderIdConfition", - "doc": [ - "Searching sender uid condition", - { - "type": "reference", - "argument": "senderId", - "category": "full", - "description": " sender UID" - } - ], - "trait": { - "name": "SearchCondition", - "key": 7 - }, - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "senderId" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "PeerSearchResult", - "doc": [ - "Peer search result", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": " Peer information" - }, - { - "type": "reference", - "argument": "optMatchString", - "category": "full", - "description": " Description" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Peer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 3, - "name": "optMatchString" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "PeerSearch", - "header": 233, - "response": { - "type": "anonymous", - "header": 234, - "doc": [ - "Found peers", - { - "type": "reference", - "argument": "searchResults", - "category": "full", - "description": " Search Results" - }, - { - "type": "reference", - "argument": "users", - "category": "full", - "description": " Related users" - }, - { - "type": "reference", - "argument": "groups", - "category": "full", - "description": " Related groups" - }, - { - "type": "reference", - "argument": "userPeers", - "category": "full", - "description": " Related user peers" - }, - { - "type": "reference", - "argument": "groupPeers", - "category": "full", - "description": " Related group peers" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "PeerSearchResult" - } - }, - "id": 1, - "name": "searchResults" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "User" - } - }, - "id": 2, - "name": "users" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Group" - } - }, - "id": 3, - "name": "groups" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "UserOutPeer" - } - }, - "id": 4, - "name": "userPeers" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "GroupOutPeer" - } - }, - "id": 5, - "name": "groupPeers" - } - ] - }, - "doc": [ - "Performing peer search", - { - "type": "reference", - "argument": "query", - "category": "full", - "description": "Search query. Warring not all combinations can be processed by server. (acts as OR)" - }, - { - "type": "reference", - "argument": "optimizations", - "category": "full", - "description": "Enabled Optimizations" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "trait", - "childType": "SearchCondition" - } - }, - "id": 1, - "name": "query" - }, - { - "type": { - "type": "list", - "childType": { - "type": "enum", - "childType": "UpdateOptimization" - } - }, - "id": 2, - "name": "optimizations" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "MessageSearchResult", - "doc": [ - "Message container", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": " Message Peer" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": " Message Random Id" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " Message Date" - }, - { - "type": "reference", - "argument": "senderId", - "category": "full", - "description": " Message sender UID" - }, - { - "type": "reference", - "argument": "content", - "category": "full", - "description": " Message content" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Peer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 2, - "name": "rid" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 3, - "name": "date" - }, - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 4, - "name": "senderId" - }, - { - "type": { - "type": "trait", - "childType": "Message" - }, - "id": 5, - "name": "content" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "MessageSearchItem", - "doc": [ - "Message Search result container" - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "MessageSearchResult" - }, - "id": 1, - "name": "result" - } - ] - } - }, - { - "type": "response", - "content": { - "name": "MessageSearchResponse", - "header": 218, - "doc": [ - "Search Result", - { - "type": "reference", - "argument": "searchResults", - "category": "full", - "description": " Search results" - }, - { - "type": "reference", - "argument": "users", - "category": "full", - "description": " Search users" - }, - { - "type": "reference", - "argument": "groups", - "category": "full", - "description": " Search groups" - }, - { - "type": "reference", - "argument": "loadMoreState", - "category": "hidden", - "description": " State for loading more results" - }, - { - "type": "reference", - "argument": "userOutPeers", - "category": "full", - "description": " Search user peers" - }, - { - "type": "reference", - "argument": "groupOutPeers", - "category": "full", - "description": " Search group peers" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "MessageSearchItem" - } - }, - "id": 1, - "name": "searchResults" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "User" - } - }, - "id": 2, - "name": "users" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Group" - } - }, - "id": 3, - "name": "groups" - }, - { - "type": { - "type": "opt", - "childType": "bytes" - }, - "id": 4, - "name": "loadMoreState" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "UserOutPeer" - } - }, - "id": 5, - "name": "userOutPeers" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "GroupOutPeer" - } - }, - "id": 6, - "name": "groupOutPeers" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "MessageSearch", - "header": 217, - "response": { - "type": "reference", - "name": "MessageSearchResponse" - }, - "doc": [ - "Performing message search", - { - "type": "reference", - "argument": "query", - "category": "full", - "description": "Search query" - }, - { - "type": "reference", - "argument": "optimizations", - "category": "full", - "description": "Enabled Optimizations" - } - ], - "attributes": [ - { - "type": { - "type": "trait", - "childType": "SearchCondition" - }, - "id": 1, - "name": "query" - }, - { - "type": { - "type": "list", - "childType": { - "type": "enum", - "childType": "UpdateOptimization" - } - }, - "id": 2, - "name": "optimizations" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "MessageSearchMore", - "header": 222, - "response": { - "type": "reference", - "name": "MessageSearchResponse" - }, - "doc": [ - "Performing message search paging", - { - "type": "reference", - "argument": "loadMoreState", - "category": "hidden", - "description": "State for loading more results" - }, - { - "type": "reference", - "argument": "optimizations", - "category": "full", - "description": "Enabled Optimizations" - } - ], - "attributes": [ - { - "type": "bytes", - "id": 1, - "name": "loadMoreState" - }, - { - "type": { - "type": "list", - "childType": { - "type": "enum", - "childType": "UpdateOptimization" - } - }, - "id": 2, - "name": "optimizations" - } - ] - } - } - ] - }, - { - "title": "Public Groups", - "package": "pubgroups", - "doc": [ - "Public group is easy way to find communities" - ], - "items": [ - { - "type": "struct", - "content": { - "name": "PublicGroup", - "doc": [ - "Public Group description", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": " Group id" - }, - { - "type": "reference", - "argument": "accessHash", - "category": "danger", - "description": " Group Access hash" - }, - { - "type": "reference", - "argument": "title", - "category": "full", - "description": " Group title" - }, - { - "type": "reference", - "argument": "avatar", - "category": "full", - "description": " Group avatar" - }, - { - "type": "reference", - "argument": "membersCount", - "category": "full", - "description": " Members count in group" - }, - { - "type": "reference", - "argument": "friendsCount", - "category": "full", - "description": " Friends count int group" - }, - { - "type": "reference", - "argument": "description", - "category": "full", - "description": " Description of group" - } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "id" - }, - { - "type": "int64", - "id": 2, - "name": "accessHash" - }, - { - "type": "string", - "id": 3, - "name": "title" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "Avatar" - } - }, - "id": 7, - "name": "avatar" - }, - { - "type": "int32", - "id": 4, - "name": "membersCount" - }, - { - "type": "int32", - "id": 5, - "name": "friendsCount" - }, - { - "type": "string", - "id": 6, - "name": "description" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "GetPublicGroups", - "header": 201, - "response": { - "type": "anonymous", - "header": 202, - "doc": [ - "Loaded public groups", - { - "type": "reference", - "argument": "groups", - "category": "full", - "description": " All available groups" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "PublicGroup" - } - }, - "id": 1, - "name": "groups" - } - ] - }, - "doc": [ - "Getting public groups" - ], - "attributes": [] - } - } - ] - }, - { - "title": "Invites", - "package": "invites", - "doc": [ - "Invite mechanizm" - ], - "items": [ - { - "type": "struct", - "content": { - "name": "InviteState", - "doc": [ - "Invite state", - { - "type": "reference", - "argument": "email", - "category": "full", - "description": " Email of invite" - }, - { - "type": "reference", - "argument": "name", - "category": "full", - "description": " Name of invited user" - }, - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " Uid of registered user" - }, - { - "type": "reference", - "argument": "tid", - "category": "full", - "description": " Team id of invite" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "email" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 2, - "name": "name" - }, - { - "type": { - "type": "opt", - "childType": "int32" - }, - "id": 3, - "name": "uid" - }, - { - "type": { - "type": "opt", - "childType": "int32" - }, - "id": 4, - "name": "tid" - } - ] - } - }, - { - "type": "response", - "content": { - "name": "InviteList", - "header": 2564, - "doc": [ - "Intites list", - { - "type": "reference", - "argument": "invites", - "category": "full", - "description": " Intvites" - }, - { - "type": "reference", - "argument": "relatedUsers", - "category": "full", - "description": " Related users in invites" - }, - { - "type": "reference", - "argument": "relatedGroups", - "category": "full", - "description": " Related groups in invites" - }, - { - "type": "reference", - "argument": "relatedTeams", - "category": "full", - "description": " Related teams in invites" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "InviteState" - } - }, - "id": 1, - "name": "invites" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "User" - } - }, - "id": 2, - "name": "relatedUsers" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Group" - } - }, - "id": 3, - "name": "relatedGroups" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Team" - } - }, - "id": 4, - "name": "relatedTeams" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "LoadOwnSentInvites", - "header": 2563, - "response": { - "type": "reference", - "name": "InviteList" - }, - "doc": [ - "Loading current invite states" - ], - "attributes": [] - } - }, - { - "type": "rpc", - "content": { - "name": "SendInvite", - "header": 2565, - "response": { - "type": "reference", - "name": "InviteList" - }, - "doc": [ - "Sending an email invite", - { - "type": "reference", - "argument": "email", - "category": "full", - "description": "Email for invite" - }, - { - "type": "reference", - "argument": "name", - "category": "full", - "description": "Optional name for invite" - }, - { - "type": "reference", - "argument": "destTeam", - "category": "full", - "description": "Optional team for invite" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "email" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 2, - "name": "name" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "OutTeam" - } - }, - "id": 3, - "name": "destTeam" - } - ] - } - } - ] - }, - { - "title": "Teams", - "package": "teams", - "doc": [ - "Teams support for Actor" - ], - "items": [ - { - "type": "struct", - "content": { - "name": "Team", - "doc": [ - "Team entity", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": " Team Id" - }, - { - "type": "reference", - "argument": "accessHash", - "category": "danger", - "description": " Team Access Hash" - }, - { - "type": "reference", - "argument": "name", - "category": "full", - "description": " Team name" - } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "id" - }, - { - "type": "int64", - "id": 2, - "name": "accessHash" - }, - { - "type": "string", - "id": 3, - "name": "name" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "OutTeam", - "doc": [ - "Reference to a team", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": " Team Id" - }, - { - "type": "reference", - "argument": "accessHash", - "category": "full", - "description": " Team access hash" - } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "id" - }, - { - "type": "int64", - "id": 2, - "name": "accessHash" - } - ] - } - }, - { - "type": "response", - "content": { - "name": "TeamsList", - "header": 2562, - "doc": [ - "Teams response", - { - "type": "reference", - "argument": "teams", - "category": "hidden", - "description": " Teams list" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Team" - } - }, - "id": 1, - "name": "teams" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "LoadOwnTeams", - "header": 2561, - "response": { - "type": "reference", - "name": "TeamsList" - }, - "doc": [ - "Loading own teams" - ], - "attributes": [] - } - }, - { - "type": "update", - "content": { - "name": "OwnTeamsChanged", - "header": 165, - "doc": [ - "Update about own teams changed", - { - "type": "reference", - "argument": "ownTeams", - "category": "full", - "description": " Updated own teams list" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Team" - } - }, - "id": 1, - "name": "ownTeams" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "CreateTeam", - "header": 2566, - "response": { - "type": "anonymous", - "header": 2567, - "doc": [ - "Created team response", - { - "type": "reference", - "argument": "createdTeam", - "category": "full", - "description": " Created Team" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Team" - }, - "id": 1, - "name": "createdTeam" - } - ] - }, - "doc": [ - "Creation of a Team", - { - "type": "reference", - "argument": "title", - "category": "full", - "description": "Title of a team" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "title" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "InviteToTeam", - "header": 2568, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Inviting people to team", - { - "type": "reference", - "argument": "user", - "category": "full", - "description": "Dest user" - }, - { - "type": "reference", - "argument": "destTeam", - "category": "full", - "description": "Dest team" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "UserOutPeer" - }, - "id": 1, - "name": "user" - }, - { - "type": { - "type": "struct", - "childType": "OutTeam" - }, - "id": 3, - "name": "destTeam" - } - ] - } - } - ] - }, - { - "title": "Integrations", - "package": "integrations", - "doc": [ - "Package contains methods for providing integration" - ], - "items": [ - { - "type": "response", - "content": { - "name": "IntegrationToken", - "header": 183, - "doc": [ - "Group token response", - { - "type": "reference", - "argument": "token", - "category": "danger", - "description": " current group token" - }, - { - "type": "reference", - "argument": "url", - "category": "danger", - "description": " current group url" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "token" - }, - { - "type": "string", - "id": 2, - "name": "url" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "GetIntegrationToken", - "header": 182, - "response": { - "type": "reference", - "name": "IntegrationToken" - }, - "doc": [ - "Getting current group token", - { - "type": "reference", - "argument": "groupPeer", - "category": "full", - "description": "Peer" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "OutPeer" - }, - "id": 1, - "name": "groupPeer" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "RevokeIntegrationToken", - "header": 184, - "response": { - "type": "reference", - "name": "IntegrationToken" - }, - "doc": [ - "Revoke group token", - { - "type": "reference", - "argument": "groupPeer", - "category": "full", - "description": "Peer" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "OutPeer" - }, - "id": 1, - "name": "groupPeer" - } - ] - } - } - ] - }, - { - "title": "Typing and Online", - "package": "weak", - "items": [ - { - "type": "enum", - "content": { - "name": "TypingType", - "values": [ - { - "name": "Text", - "id": 0 - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "Typing", - "header": 27, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Sending typing notification", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": "Destination peer" - }, - { - "type": "reference", - "argument": "typingType", - "category": "full", - "description": "typing type." - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "OutPeer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "enum", - "childType": "TypingType" - }, - "id": 3, - "name": "typingType" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "StopTyping", - "header": 30, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Stop typing", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": "Destination peer" - }, - { - "type": "reference", - "argument": "typingType", - "category": "full", - "description": "typing type" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "OutPeer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "enum", - "childType": "TypingType" - }, - "id": 2, - "name": "typingType" - } - ] - } - }, - { - "type": "enum", - "content": { - "name": "DeviceType", - "values": [ - { - "name": "GENERIC", - "id": 1 - }, - { - "name": "PC", - "id": 2 - }, - { - "name": "MOBILE", - "id": 3 - }, - { - "name": "TABLET", - "id": 4 - }, - { - "name": "WATCH", - "id": 5 - }, - { - "name": "MIRROR", - "id": 6 - }, - { - "name": "CAR", - "id": 7 - }, - { - "name": "TABLE", - "id": 8 - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "SetOnline", - "header": 29, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Sending online state", - { - "type": "reference", - "argument": "isOnline", - "category": "full", - "description": "is user online" - }, - { - "type": "reference", - "argument": "timeout", - "category": "full", - "description": "timeout of online state in milliseconds" - }, - { - "type": "reference", - "argument": "deviceType", - "category": "full", - "description": "Optional device type" - }, - { - "type": "reference", - "argument": "deviceCategory", - "category": "full", - "description": "Optional device category, for example android or ios" - } - ], - "attributes": [ - { - "type": "bool", - "id": 1, - "name": "isOnline" - }, - { - "type": { - "type": "alias", - "childType": "msec" - }, - "id": 2, - "name": "timeout" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "enum", - "childType": "DeviceType" - } - }, - "id": 3, - "name": "deviceType" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 4, - "name": "deviceCategory" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "PauseNotifications", - "header": 166, - "doc": [ - "Update about pausing notifications", - { - "type": "reference", - "argument": "timeout", - "category": "full", - "description": " Timeout for notifications resume" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "sec" - }, - "id": 1, - "name": "timeout" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "RestoreNotifications", - "header": 167, - "doc": [ - "Update about restoring notifications" - ], - "attributes": [] - } - }, - { - "type": "rpc", - "content": { - "name": "PauseNotifications", - "header": 2641, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Pause notifications", - { - "type": "reference", - "argument": "timeout", - "category": "hidden", - "description": "Timeout of pause" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "sec" - }, - "id": 1, - "name": "timeout" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "RestoreNotifications", - "header": 2642, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Restoring notifications" - ], - "attributes": [] - } - }, - { - "type": "empty" - }, - { - "type": "update", - "content": { - "name": "Typing", - "header": 6, - "doc": [ - "Update about user's typing", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": " Conversation peer" - }, - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " User's id" - }, - { - "type": "reference", - "argument": "typingType", - "category": "full", - "description": " Type of typing" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Peer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 2, - "name": "uid" - }, - { - "type": { - "type": "enum", - "childType": "TypingType" - }, - "id": 3, - "name": "typingType" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "TypingStop", - "header": 81, - "doc": [ - "Update about user's typing stop", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": " Conversation peer" - }, - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " User's id" - }, - { - "type": "reference", - "argument": "typingType", - "category": "hidden", - "description": " Type of typing" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Peer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 2, - "name": "uid" - }, - { - "type": { - "type": "enum", - "childType": "TypingType" - }, - "id": 3, - "name": "typingType" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "UserOnline", - "header": 7, - "doc": [ - "Update about user became online", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " User's Id" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "enum", - "childType": "DeviceType" - } - }, - "id": 2, - "name": "deviceType" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 3, - "name": "deviceCategory" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "UserOffline", - "header": 8, - "doc": [ - "Update about user became offline", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " User's id" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "enum", - "childType": "DeviceType" - } - }, - "id": 2, - "name": "deviceType" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 3, - "name": "deviceCategory" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "UserLastSeen", - "header": 9, - "doc": [ - "Update about user's last seen state", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " User's id" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " Last seen time" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 2, - "name": "date" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "enum", - "childType": "DeviceType" - } - }, - "id": 3, - "name": "deviceType" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 4, - "name": "deviceCategory" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "GroupOnline", - "header": 33, - "doc": [ - "Update about group online change", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group id" - }, - { - "type": "reference", - "argument": "count", - "category": "full", - "description": " current online user's count" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - }, - { - "type": "int32", - "id": 2, - "name": "count" - } - ] - } - } - ] - }, - { - "title": "Media and Files", - "package": "files", - "items": [ - { - "type": "struct", - "content": { - "name": "FileLocation", - "doc": [ - "Location of file on server", - { - "type": "reference", - "argument": "fileId", - "category": "full", - "description": " Unique Id of file" - }, - { - "type": "reference", - "argument": "accessHash", - "category": "danger", - "description": " Access hash of file" - } - ], - "expandable": "true", - "attributes": [ - { - "type": "int64", - "id": 1, - "name": "fileId" - }, - { - "type": "int64", - "id": 2, - "name": "accessHash" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "ImageLocation", - "doc": [ - "Image location", - { - "type": "reference", - "argument": "fileLocation", - "category": "full", - "description": " Location of file" - }, - { - "type": "reference", - "argument": "width", - "category": "full", - "description": " Width of avatar image" - }, - { - "type": "reference", - "argument": "height", - "category": "full", - "description": " Height of avatar image" - }, - { - "type": "reference", - "argument": "fileSize", - "category": "full", - "description": " Size of file" - } - ], - "expandable": "true", - "attributes": [ - { - "type": { - "type": "struct", - "childType": "FileLocation" - }, - "id": 1, - "name": "fileLocation" - }, - { - "type": "int32", - "id": 2, - "name": "width" - }, - { - "type": "int32", - "id": 3, - "name": "height" - }, - { - "type": "int32", - "id": 4, - "name": "fileSize" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "AvatarImage", - "doc": [ - "Avatar Image", - { - "type": "reference", - "argument": "fileLocation", - "category": "full", - "description": " Location of file" - }, - { - "type": "reference", - "argument": "width", - "category": "full", - "description": " Width of avatar image" - }, - { - "type": "reference", - "argument": "height", - "category": "full", - "description": " Height of avatar image" - }, - { - "type": "reference", - "argument": "fileSize", - "category": "full", - "description": " Size of file" - } - ], - "expandable": "true", - "attributes": [ - { - "type": { - "type": "struct", - "childType": "FileLocation" - }, - "id": 1, - "name": "fileLocation" - }, - { - "type": "int32", - "id": 2, - "name": "width" - }, - { - "type": "int32", - "id": 3, - "name": "height" - }, - { - "type": "int32", - "id": 4, - "name": "fileSize" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "Avatar", - "doc": [ - "Avatar of User or Group", - { - "type": "reference", - "argument": "smallImage", - "category": "compact", - "description": " Optional small image of avatar box in 100x100" - }, - { - "type": "reference", - "argument": "largeImage", - "category": "compact", - "description": " Optional large image of avatar box in 200x200" - }, - { - "type": "reference", - "argument": "fullImage", - "category": "compact", - "description": " Optional full screen image of avatar" - } - ], - "expandable": "true", - "attributes": [ - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "AvatarImage" - } - }, - "id": 1, - "name": "smallImage" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "AvatarImage" - } - }, - "id": 2, - "name": "largeImage" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "AvatarImage" - } - }, - "id": 3, - "name": "fullImage" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "FastThumb", - "doc": [ - "Fast thumb of media messages. Less than 90x90 and compressed by JPEG with low quality", - { - "type": "reference", - "argument": "w", - "category": "full", - "description": " Width of thumb" - }, - { - "type": "reference", - "argument": "h", - "category": "full", - "description": " Height of thump" - }, - { - "type": "reference", - "argument": "thumb", - "category": "compact", - "description": " compressed image data" - } - ], - "expandable": "true", - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "w" - }, - { - "type": "int32", - "id": 2, - "name": "h" - }, - { - "type": "bytes", - "id": 3, - "name": "thumb" - } - ] - } - }, - { - "type": "enum", - "content": { - "name": "Colors", - "values": [ - { - "name": "red", - "id": 1 - }, - { - "name": "yellow", - "id": 2 - }, - { - "name": "green", - "id": 3 - } - ] - } - }, - { - "type": "trait", - "content": { - "isContainer": "true", - "name": "Color", - "attributes": [] - } - }, - { - "type": "struct", - "content": { - "name": "RgbColor", - "doc": [ - "RGB Color", - { - "type": "reference", - "argument": "rgb", - "category": "full", - "description": " RGB color value" - } - ], - "trait": { - "name": "Color", - "key": 1 - }, - "expandable": "true", - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "rgb" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "PredefinedColor", - "doc": [ - "Predefined color", - { - "type": "reference", - "argument": "color", - "category": "hidden", - "description": " Predefined color value" - } - ], - "trait": { - "name": "Color", - "key": 2 - }, - "expandable": "true", - "attributes": [ - { - "type": { - "type": "enum", - "childType": "Colors" - }, - "id": 1, - "name": "color" - } - ] - } - }, - { - "type": "empty" - }, - { - "type": "struct", - "content": { - "name": "HTTPHeader", - "doc": [ - "HTTP Header record", - { - "type": "reference", - "argument": "key", - "category": "full", - "description": " HTTP Header name" - }, - { - "type": "reference", - "argument": "value", - "category": "full", - "description": " HTTP Header value" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "key" - }, - { - "type": "string", - "id": 2, - "name": "value" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "FileUrlDescription", - "doc": [ - "File url description", - { - "type": "reference", - "argument": "fileId", - "category": "full", - "description": " File id of url" - }, - { - "type": "reference", - "argument": "url", - "category": "full", - "description": " Url for downloading" - }, - { - "type": "reference", - "argument": "timeout", - "category": "full", - "description": " Timeout of url" - }, - { - "type": "reference", - "argument": "unsignedUrl", - "category": "hidden", - "description": " Unsigned URL (used to honor web caches)" - }, - { - "type": "reference", - "argument": "unsignedUrlHeaders", - "category": "hidden", - "description": " Headers that is required to download files with unsigned url" - } - ], - "attributes": [ - { - "type": "int64", - "id": 1, - "name": "fileId" - }, - { - "type": "string", - "id": 2, - "name": "url" - }, - { - "type": { - "type": "alias", - "childType": "sec" - }, - "id": 3, - "name": "timeout" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 4, - "name": "unsignedUrl" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "HTTPHeader" - } - }, - "id": 5, - "name": "unsignedUrlHeaders" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "GetFileUrl", - "header": 77, - "response": { - "type": "anonymous", - "header": 78, - "doc": [ - { - "type": "reference", - "argument": "url", - "category": "full", - "description": " Url for downloading" - }, - { - "type": "reference", - "argument": "timeout", - "category": "full", - "description": " Timeout of url" - }, - { - "type": "reference", - "argument": "unsignedUrl", - "category": "full", - "description": " Unsigned URL (used to honor web caches)" - }, - { - "type": "reference", - "argument": "unsignedUrlHeaders", - "category": "full", - "description": " Headers that is required to download files with unsigned url" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "url" - }, - { - "type": { - "type": "alias", - "childType": "sec" - }, - "id": 2, - "name": "timeout" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 3, - "name": "unsignedUrl" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "HTTPHeader" - } - }, - "id": 4, - "name": "unsignedUrlHeaders" - } - ] - }, - "doc": [ - "Requesting file URL for downloading", - { - "type": "reference", - "argument": "file", - "category": "full", - "description": "file's location" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "FileLocation" - }, - "id": 1, - "name": "file" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "GetFileUrls", - "header": 2573, - "response": { - "type": "anonymous", - "header": 2574, - "doc": [ - { - "type": "reference", - "argument": "fileUrls", - "category": "full", - "description": " File urls" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "FileUrlDescription" - } - }, - "id": 1, - "name": "fileUrls" - } - ] - }, - "doc": [ - "Requesting multiple fle URL for downloading", - { - "type": "reference", - "argument": "files", - "category": "hidden", - "description": "File locations to load urls" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "FileLocation" - } - }, - "id": 1, - "name": "files" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "GetFileUrlBuilder", - "header": 2579, - "response": { - "type": "anonymous", - "header": 2580, - "doc": [ - { - "type": "reference", - "argument": "baseUrl", - "category": "full", - "description": " Base Url for files" - }, - { - "type": "reference", - "argument": "algo", - "category": "full", - "description": " Signature algorithm" - }, - { - "type": "reference", - "argument": "seed", - "category": "full", - "description": " Public-visible seed of signature" - }, - { - "type": "reference", - "argument": "signatureSecret", - "category": "full", - "description": " Signature Secret" - }, - { - "type": "reference", - "argument": "timeout", - "category": "full", - "description": " Timeout of url builder" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "baseUrl" - }, - { - "type": "string", - "id": 2, - "name": "algo" - }, - { - "type": "string", - "id": 5, - "name": "seed" - }, - { - "type": "bytes", - "id": 3, - "name": "signatureSecret" - }, - { - "type": { - "type": "alias", - "childType": "sec" - }, - "id": 4, - "name": "timeout" - } - ] - }, - "doc": [ - "Get File URL Builder that allows to build file urls from client side", - { - "type": "reference", - "argument": "supportedSignatureAlgorithms", - "category": "hidden", - "description": "Supported signature algorithms by client" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": "string" - }, - "id": 1, - "name": "supportedSignatureAlgorithms" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "GetFileUploadUrl", - "header": 97, - "response": { - "type": "anonymous", - "header": 121, - "doc": [ - { - "type": "reference", - "argument": "url", - "category": "full", - "description": " Url for uploading" - }, - { - "type": "reference", - "argument": "uploadKey", - "category": "compact", - "description": " Upload key for upload" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "url" - }, - { - "type": "bytes", - "id": 2, - "name": "uploadKey" - } - ] - }, - "doc": [ - "Requesting pload url", - { - "type": "reference", - "argument": "expectedSize", - "category": "full", - "description": "Expected size of uploading file. May be inaccurate. Used for size allocation optimizations." - } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "expectedSize" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "CommitFileUpload", - "header": 122, - "response": { - "type": "anonymous", - "header": 138, - "doc": [ - { - "type": "reference", - "argument": "uploadedFileLocation", - "category": "hidden", - "description": " Result file location" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "FileLocation" - }, - "id": 1, - "name": "uploadedFileLocation" - } - ] - }, - "doc": [ - "Comminting uploaded file to storage" - ], - "attributes": [ - { - "type": "bytes", - "id": 1, - "name": "uploadKey" - }, - { - "type": "string", - "id": 2, - "name": "fileName" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "GetFileUploadPartUrl", - "header": 142, - "response": { - "type": "anonymous", - "header": 141, - "doc": [ - { - "type": "reference", - "argument": "url", - "category": "full", - "description": " Upload file part url" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "url" - } - ] - }, - "doc": [ - "Upload file part", - { - "type": "reference", - "argument": "uploadKey", - "category": "compact", - "description": "Upload Key from requestFileUploadUrl" - } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "partNumber" - }, - { - "type": "int32", - "id": 2, - "name": "partSize" - }, - { - "type": "bytes", - "id": 3, - "name": "uploadKey" - } - ] - } - } - ] - }, - { - "title": "Features", - "package": "features", - "doc": [ - "Enable feature discovery. Currently available features:", - "* \"call\" - private audio calls" - ], - "items": [ - { - "type": "rpc", - "content": { - "name": "EnableFeature", - "header": 2588, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Enabling feature on the device", - { - "type": "reference", - "argument": "featureName", - "category": "full", - "description": "Feature name" - }, - { - "type": "reference", - "argument": "args", - "category": "danger", - "description": "Optional arguments to a feature" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "featureName" - }, - { - "type": { - "type": "opt", - "childType": "bytes" - }, - "id": 2, - "name": "args" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "DisableFeature", - "header": 2589, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Disabling feature on the device", - { - "type": "reference", - "argument": "featureName", - "category": "full", - "description": "Feature name" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "featureName" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "CheckFeatureEnabled", - "header": 2590, - "response": { - "type": "reference", - "name": "Bool" - }, - "doc": [ - "Method for checking if feature is available to user" - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "UserOutPeer" - }, - "id": 1, - "name": "userOutPeer" - }, - { - "type": "string", - "id": 2, - "name": "featureName" - } - ] - } - } - ] - }, - { - "title": "EventBus", - "package": "eventbus", - "items": [ - { - "type": "rpc", - "content": { - "name": "CreateNewEventBus", - "header": 2665, - "response": { - "type": "anonymous", - "header": 2666, - "doc": [ - "Created new Event Bus", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": " Event Bus Id" - }, - { - "type": "reference", - "argument": "deviceId", - "category": "full", - "description": " Your Device Id" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "busId" - }, - "id": 1, - "name": "id" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 2, - "name": "deviceId" - } - ] - }, - "doc": [ - "Create new Event Bus", - { - "type": "reference", - "argument": "timeout", - "category": "full", - "description": "Optional timeout of Event Bus" - }, - { - "type": "reference", - "argument": "isOwned", - "category": "full", - "description": "Is Event Bus owned by creator" - } - ], - "attributes": [ - { - "type": { - "type": "opt", - "childType": { - "type": "alias", - "childType": "msec" - } - }, - "id": 1, - "name": "timeout" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 2, - "name": "isOwned" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "JoinEventBus", - "header": 2668, - "response": { - "type": "anonymous", - "header": 2669, - "doc": [ - { - "type": "reference", - "argument": "deviceId", - "category": "full", - "description": " Your Device Id" - }, - { - "type": "reference", - "argument": "rejoinToken", - "category": "full", - "description": " Token that can be used for rejoining event bus with same device id" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 1, - "name": "deviceId" - }, - { - "type": { - "type": "opt", - "childType": "bytes" - }, - "id": 2, - "name": "rejoinToken" - } - ] - }, - "doc": [ - "Joining Event Bus", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": "Event Bus Id" - }, - { - "type": "reference", - "argument": "timeout", - "category": "full", - "description": "Join timeout" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "busId" - }, - "id": 1, - "name": "id" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "alias", - "childType": "msec" - } - }, - "id": 2, - "name": "timeout" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "ReJoinEventBus", - "header": 2675, - "response": { - "type": "anonymous", - "header": 2676, - "doc": [ - { - "type": "reference", - "argument": "deviceId", - "category": "hidden", - "description": " Your Device Id" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 1, - "name": "deviceId" - } - ] - }, - "doc": [ - "Rejoining to event bus after session was disposed", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": "Event Bus Id" - }, - { - "type": "reference", - "argument": "rejoinToken", - "category": "full", - "description": "Rejoin Token" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "busId" - }, - "id": 1, - "name": "id" - }, - { - "type": "bytes", - "id": 2, - "name": "rejoinToken" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "KeepAliveEventBus", - "header": 2670, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Keep Alive Event Bus", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": "Event Bus Id" - }, - { - "type": "reference", - "argument": "timeout", - "category": "full", - "description": "Optional timeout for keep alive" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "busId" - }, - "id": 1, - "name": "id" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "alias", - "childType": "msec" - } - }, - "id": 2, - "name": "timeout" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "DisposeEventBus", - "header": 2667, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Dispose Event Bus", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": "Event Bus Id" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "busId" - }, - "id": 1, - "name": "id" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "PostToEventBus", - "header": 2671, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Event Bus Destination", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": "Bus Id" - }, - { - "type": "reference", - "argument": "destinations", - "category": "full", - "description": "If Empty need to broadcase message to everyone" - }, - { - "type": "reference", - "argument": "message", - "category": "hidden", - "description": "Message" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "busId" - }, - "id": 1, - "name": "id" - }, - { - "type": { - "type": "list", - "childType": { - "type": "alias", - "childType": "randomId" - } - }, - "id": 2, - "name": "destinations" - }, - { - "type": "bytes", - "id": 3, - "name": "message" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "EventBusDeviceConnected", - "header": 2561, - "doc": [ - "Update about pubsub device connected", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": " ID of Event Bus" - }, - { - "type": "reference", - "argument": "userId", - "category": "full", - "description": " Joined User Id" - }, - { - "type": "reference", - "argument": "deviceId", - "category": "full", - "description": " Joined Device Unique Id" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "busId" - }, - "id": 1, - "name": "id" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "alias", - "childType": "userId" - } - }, - "id": 2, - "name": "userId" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 3, - "name": "deviceId" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "EventBusDeviceDisconnected", - "header": 2563, - "doc": [ - "Update about device disconnected", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": " ID of Event Bus" - }, - { - "type": "reference", - "argument": "userId", - "category": "full", - "description": " Joined User Id" - }, - { - "type": "reference", - "argument": "deviceId", - "category": "full", - "description": " Disconnected Device unique Id" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "busId" - }, - "id": 1, - "name": "id" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "alias", - "childType": "userId" - } - }, - "id": 2, - "name": "userId" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 3, - "name": "deviceId" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "EventBusMessage", - "header": 2562, - "doc": [ - "Event Bus Message", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": " Event Bus Id" - }, - { - "type": "reference", - "argument": "senderId", - "category": "full", - "description": " Sender of message" - }, - { - "type": "reference", - "argument": "senderDeviceId", - "category": "full", - "description": " Device Id of sender" - }, - { - "type": "reference", - "argument": "message", - "category": "hidden", - "description": " Message" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "busId" - }, - "id": 1, - "name": "id" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "alias", - "childType": "userId" - } - }, - "id": 2, - "name": "senderId" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "alias", - "childType": "randomId" - } - }, - "id": 3, - "name": "senderDeviceId" - }, - { - "type": "bytes", - "id": 4, - "name": "message" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "EventBusDisposed", - "header": 2564, - "doc": [ - "Event Bus dispose", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": " Event Bus Id" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "busId" - }, - "id": 1, - "name": "id" - } - ] - } - } - ] - }, - { - "title": "Values", - "package": "values", - "doc": [ - "Synced Values" - ], - "items": [ - { - "type": "struct", - "content": { - "name": "SyncedValue", - "doc": [ - "Synced Value container", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": " Unique Id of a value. Unique in the scope of one named value." - }, - { - "type": "reference", - "argument": "value", - "category": "full", - "description": " Optional value" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 1, - "name": "id" - }, - { - "type": { - "type": "opt", - "childType": "bytes" - }, - "id": 2, - "name": "value" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "LoadSyncedSet", - "header": 2679, - "response": { - "type": "anonymous", - "header": 2680, - "doc": [ - { - "type": "reference", - "argument": "values", - "category": "full", - "description": " Current set values" - }, - { - "type": "reference", - "argument": "isStrong", - "category": "full", - "description": " Is this value strong and stored in sequence. By default is true." - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "SyncedValue" - } - }, - "id": 1, - "name": "values" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 2, - "name": "isStrong" - } - ] - }, - "doc": [ - "Loading synced set", - { - "type": "reference", - "argument": "setName", - "category": "hidden", - "description": "readable name of the set" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "setName" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "SynedSetUpdated", - "header": 72, - "doc": [ - "Update about synced set update", - { - "type": "reference", - "argument": "setName", - "category": "full", - "description": " Set Name" - }, - { - "type": "reference", - "argument": "syncedValues", - "category": "full", - "description": " Current set values" - }, - { - "type": "reference", - "argument": "isStrong", - "category": "full", - "description": " Is this value strong and need to be stored on disk" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "setName" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "SyncedValue" - } - }, - "id": 2, - "name": "syncedValues" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 3, - "name": "isStrong" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "SyncedSetAddedOrUpdated", - "header": 73, - "doc": [ - "Update about added or updated values in the synced set", - { - "type": "reference", - "argument": "setName", - "category": "full", - "description": " Set Name" - }, - { - "type": "reference", - "argument": "addedOrUpdatedValues", - "category": "hidden", - "description": " Added or updated values" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "setName" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "SyncedValue" - } - }, - "id": 2, - "name": "addedOrUpdatedValues" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "SyncedSetRemoved", - "header": 74, - "doc": [ - "Update about removed items from synced set", - { - "type": "reference", - "argument": "setName", - "category": "full", - "description": " Set Name" - }, - { - "type": "reference", - "argument": "removedItems", - "category": "full", - "description": " Removed Items from the set" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "setName" - }, - { - "type": { - "type": "list", - "childType": { - "type": "alias", - "childType": "randomId" - } - }, - "id": 2, - "name": "removedItems" - } - ] - } - } - ] - }, - { - "title": "WebRTC", - "package": "webrtc", - "doc": [ - "WebRTC package that enables support to audio and video calls" - ], - "items": [ - { - "type": "update", - "content": { - "name": "IncomingCall", - "header": 52, - "doc": [ - "Update about incoming call (Sent every 10 seconds)", - { - "type": "reference", - "argument": "callId", - "category": "full", - "description": " Call Id" - }, - { - "type": "reference", - "argument": "attemptIndex", - "category": "full", - "description": " Optional attempt Index" - } - ], - "attributes": [ - { - "type": "int64", - "id": 1, - "name": "callId" - }, - { - "type": { - "type": "opt", - "childType": "int32" - }, - "id": 2, - "name": "attemptIndex" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "CallHandled", - "header": 53, - "doc": [ - "Update about incoming call handled", - { - "type": "reference", - "argument": "callId", - "category": "full", - "description": " Call Id" - }, - { - "type": "reference", - "argument": "attemptIndex", - "category": "full", - "description": " Optional attempt Index" - } - ], - "attributes": [ - { - "type": "int64", - "id": 1, - "name": "callId" - }, - { - "type": { - "type": "opt", - "childType": "int32" - }, - "id": 2, - "name": "attemptIndex" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "CallUpgraded", - "header": 56, - "doc": [ - "Update about call moved to other peer", - { - "type": "reference", - "argument": "callId", - "category": "full", - "description": " Call Id" - }, - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Upgraded group id" - } - ], - "attributes": [ - { - "type": "int64", - "id": 1, - "name": "callId" - }, - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 2, - "name": "groupId" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "GetCallInfo", - "header": 2600, - "response": { - "type": "anonymous", - "header": 2606, - "doc": [ - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": " Destination peer" - }, - { - "type": "reference", - "argument": "groups", - "category": "compact", - "description": " Groups" - }, - { - "type": "reference", - "argument": "users", - "category": "compact", - "description": " Users" - }, - { - "type": "reference", - "argument": "eventBusId", - "category": "full", - "description": " Event Bus Id" - }, - { - "type": "reference", - "argument": "isAudioOnlyCall", - "category": "full", - "description": " Is Audio Only Call. Default is true" - }, - { - "type": "reference", - "argument": "isVideoOnlyCall", - "category": "full", - "description": " Is Video Only Call. Default is false." - }, - { - "type": "reference", - "argument": "isVideoPreferred", - "category": "full", - "description": " Is Video preferred" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Peer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "GroupOutPeer" - } - }, - "id": 2, - "name": "groups" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "UserOutPeer" - } - }, - "id": 3, - "name": "users" - }, - { - "type": { - "type": "alias", - "childType": "busId" - }, - "id": 4, - "name": "eventBusId" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 5, - "name": "isAudioOnlyCall" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 6, - "name": "isVideoOnlyCall" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 7, - "name": "isVideoPreferred" - } - ] - }, - "doc": [ - "Getting Call Information", - { - "type": "reference", - "argument": "callId", - "category": "full", - "description": "Call Id" - } - ], - "attributes": [ - { - "type": "int64", - "id": 1, - "name": "callId" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "DoCall", - "header": 2597, - "response": { - "type": "anonymous", - "header": 2598, - "doc": [ - { - "type": "reference", - "argument": "callId", - "category": "full", - "description": " Call Id" - }, - { - "type": "reference", - "argument": "eventBusId", - "category": "full", - "description": " Call Event Bus Id" - } - ], - "attributes": [ - { - "type": "int64", - "id": 1, - "name": "callId" - }, - { - "type": { - "type": "alias", - "childType": "busId" - }, - "id": 2, - "name": "eventBusId" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 3, - "name": "deviceId" - } - ] - }, - "doc": [ - "Do Call. Right after a call client need to start sending CallInProgress", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": "destination peer" - }, - { - "type": "reference", - "argument": "timeout", - "category": "full", - "description": "Initial timeout" - }, - { - "type": "reference", - "argument": "isAudioOnlyCall", - "category": "full", - "description": "Is Audio only call. Default is true." - }, - { - "type": "reference", - "argument": "isVideoOnlyCall", - "category": "full", - "description": "Is Video Only call. Default is false." - }, - { - "type": "reference", - "argument": "isVideoPreferred", - "category": "full", - "description": "Is Video preferred" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "OutPeer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "alias", - "childType": "msec" - } - }, - "id": 2, - "name": "timeout" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 3, - "name": "isAudioOnlyCall" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 4, - "name": "isVideoOnlyCall" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 6, - "name": "isVideoPreferred" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "UpgradeCall", - "header": 2677, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Method for upgrading a call from private call to group call", - { - "type": "reference", - "argument": "callId", - "category": "full", - "description": "Call Id" - }, - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": "Destination peer for upgrading" - } - ], - "attributes": [ - { - "type": "int64", - "id": 1, - "name": "callId" - }, - { - "type": { - "type": "struct", - "childType": "GroupOutPeer" - }, - "id": 2, - "name": "peer" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "DoCallAgain", - "header": 2678, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Call again to user", - { - "type": "reference", - "argument": "callId", - "category": "full", - "description": "Call Id" - }, - { - "type": "reference", - "argument": "user", - "category": "full", - "description": "User to call again" - } - ], - "attributes": [ - { - "type": "int64", - "id": 1, - "name": "callId" - }, - { - "type": { - "type": "struct", - "childType": "UserOutPeer" - }, - "id": 2, - "name": "user" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "JoinCall", - "header": 2683, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Joining Call", - { - "type": "reference", - "argument": "callId", - "category": "full", - "description": "Call Id" - } - ], - "attributes": [ - { - "type": "int64", - "id": 1, - "name": "callId" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "RejectCall", - "header": 2684, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Rejecting Call", - { - "type": "reference", - "argument": "callId", - "category": "full", - "description": "Call Id" - } - ], - "attributes": [ - { - "type": "int64", - "id": 1, - "name": "callId" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "OptimizeSDP", - "header": 2685, - "response": { - "type": "anonymous", - "header": 2686, - "doc": [ - { - "type": "reference", - "argument": "optimizedSDP", - "category": "hidden", - "description": " Optimized version of SDP" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "optimizedSDP" - } - ] - }, - "doc": [ - "Optimizing SDP", - { - "type": "reference", - "argument": "type", - "category": "full", - "description": "Type of SDP (offer or answer)" - }, - { - "type": "reference", - "argument": "sdp", - "category": "full", - "description": "SDP value" - }, - { - "type": "reference", - "argument": "ownSettings", - "category": "full", - "description": "Own Settings" - }, - { - "type": "reference", - "argument": "theirSettings", - "category": "full", - "description": "Their Settings" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "type" - }, - { - "type": "string", - "id": 2, - "name": "sdp" - }, - { - "type": { - "type": "struct", - "childType": "PeerSettings" - }, - "id": 3, - "name": "ownSettings" - }, - { - "type": { - "type": "struct", - "childType": "PeerSettings" - }, - "id": 4, - "name": "theirSettings" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "ICEServer", - "doc": [ - "ICE Server description", - { - "type": "reference", - "argument": "url", - "category": "full", - "description": " Url to server" - }, - { - "type": "reference", - "argument": "username", - "category": "full", - "description": " Optional username" - }, - { - "type": "reference", - "argument": "credential", - "category": "danger", - "description": " Optional credential" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "url" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 2, - "name": "username" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 3, - "name": "credential" - } - ] - } - }, - { - "type": "trait", - "content": { - "isContainer": "true", - "name": "WebRTCSignaling", - "attributes": [] - } - }, - { - "type": "comment", - "content": "Advertising" - }, - { - "type": "struct", - "content": { - "name": "AdvertiseSelf", - "doc": [ - "Advertizing self to a master mode", - { - "type": "reference", - "argument": "peerSettings", - "category": "full", - "description": " Optional peer Settings" - } - ], - "trait": { - "name": "WebRTCSignaling", - "key": 21 - }, - "attributes": [ - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "PeerSettings" - } - }, - "id": 1, - "name": "peerSettings" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "AdvertiseMaster", - "doc": [ - "Sent by master" - ], - "trait": { - "name": "WebRTCSignaling", - "key": 26 - }, - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "ICEServer" - } - }, - "id": 1, - "name": "server" - } - ] - } - }, - { - "type": "comment", - "content": "Web RTC signaling" - }, - { - "type": "struct", - "content": { - "name": "Candidate", - "doc": [ - "Candidate signal", - { - "type": "reference", - "argument": "sessionId", - "category": "full", - "description": " Session Id of candidate" - }, - { - "type": "reference", - "argument": "index", - "category": "full", - "description": " Index of candidate" - }, - { - "type": "reference", - "argument": "id", - "category": "full", - "description": " Id of candidate" - }, - { - "type": "reference", - "argument": "sdp", - "category": "full", - "description": " SDP of candidate" - } - ], - "trait": { - "name": "WebRTCSignaling", - "key": 3 - }, - "attributes": [ - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 1, - "name": "sessionId" - }, - { - "type": "int32", - "id": 2, - "name": "index" - }, - { - "type": "string", - "id": 3, - "name": "id" - }, - { - "type": "string", - "id": 4, - "name": "sdp" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "Offer", - "doc": [ - "Offer signal", - { - "type": "reference", - "argument": "sessionId", - "category": "full", - "description": " Session Id of offer" - }, - { - "type": "reference", - "argument": "sdp", - "category": "full", - "description": " Offer SDP" - }, - { - "type": "reference", - "argument": "ownPeerSettings", - "category": "full", - "description": " Optional Own Peer settings" - } - ], - "trait": { - "name": "WebRTCSignaling", - "key": 4 - }, - "attributes": [ - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 1, - "name": "sessionId" - }, - { - "type": "string", - "id": 2, - "name": "sdp" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "PeerSettings" - } - }, - "id": 3, - "name": "ownPeerSettings" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "Answer", - "doc": [ - "Answer signal", - { - "type": "reference", - "argument": "sessionId", - "category": "full", - "description": " Session Id of answer" - }, - { - "type": "reference", - "argument": "sdp", - "category": "full", - "description": " Answer SDP" - } - ], - "trait": { - "name": "WebRTCSignaling", - "key": 5 - }, - "attributes": [ - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 1, - "name": "sessionId" - }, - { - "type": "string", - "id": 2, - "name": "sdp" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "MediaStreamsUpdated", - "doc": [ - "Update about media stream settings updated. Can be sent before offer/answer.", - { - "type": "reference", - "argument": "isAudioEnabled", - "category": "full", - "description": " Is Audio Enabled in current connection. True by default." - }, - { - "type": "reference", - "argument": "isVideoEnabled", - "category": "full", - "description": " Is Video Enabled in current connection. False by default." - } - ], - "trait": { - "name": "WebRTCSignaling", - "key": 28 - }, - "attributes": [ - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 1, - "name": "isAudioEnabled" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 2, - "name": "isVideoEnabled" - } - ] - } - }, - { - "type": "comment", - "content": "Call Controlling events" - }, - { - "type": "struct", - "content": { - "name": "NeedOffer", - "doc": [ - "Notification from master that offer is required", - { - "type": "reference", - "argument": "device", - "category": "full", - "description": " Destination Device Id" - }, - { - "type": "reference", - "argument": "sessionId", - "category": "full", - "description": " Session Id" - }, - { - "type": "reference", - "argument": "peerSettings", - "category": "full", - "description": " Optional peer settings" - } - ], - "trait": { - "name": "WebRTCSignaling", - "key": 8 - }, - "attributes": [ - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 1, - "name": "device" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 2, - "name": "sessionId" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "PeerSettings" - } - }, - "id": 3, - "name": "peerSettings" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "NegotinationSuccessful", - "doc": [ - "Notification about on negotiation is successful", - { - "type": "reference", - "argument": "device", - "category": "full", - "description": " Device Id" - }, - { - "type": "reference", - "argument": "sessionId", - "category": "full", - "description": " Session Id" - } - ], - "trait": { - "name": "WebRTCSignaling", - "key": 24 - }, - "attributes": [ - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 1, - "name": "device" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 2, - "name": "sessionId" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "EnableConnection", - "doc": [ - "Notification about enabling connection to peer", - { - "type": "reference", - "argument": "device", - "category": "full", - "description": " Device Id" - }, - { - "type": "reference", - "argument": "sessionId", - "category": "full", - "description": " Session Id" - } - ], - "trait": { - "name": "WebRTCSignaling", - "key": 22 - }, - "attributes": [ - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 1, - "name": "device" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 2, - "name": "sessionId" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "OnRenegotiationNeeded", - "doc": [ - "Need renegotiate session. For example when streams are changed.", - { - "type": "reference", - "argument": "device", - "category": "full", - "description": " Device Id" - }, - { - "type": "reference", - "argument": "sessionId", - "category": "full", - "description": " Session Id" - } - ], - "trait": { - "name": "WebRTCSignaling", - "key": 25 - }, - "attributes": [ - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 1, - "name": "device" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 2, - "name": "sessionId" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "CloseSession", - "doc": [ - "Close this session and be ready to", - { - "type": "reference", - "argument": "device", - "category": "hidden", - "description": " Device Id" - }, - { - "type": "reference", - "argument": "sessionId", - "category": "full", - "description": " Session Id for renegotiation" - } - ], - "trait": { - "name": "WebRTCSignaling", - "key": 6 - }, - "attributes": [ - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 1, - "name": "device" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 2, - "name": "sessionId" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "NeedDisconnect", - "doc": [ - "Notification about requirement about required disconnection from peer", - { - "type": "reference", - "argument": "device", - "category": "hidden", - "description": " Device Id" - } - ], - "trait": { - "name": "WebRTCSignaling", - "key": 20 - }, - "attributes": [ - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 1, - "name": "device" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "ActiveCall", - "doc": [ - "Active Calls. Used in broadcasting states of current calls.", - { - "type": "reference", - "argument": "callId", - "category": "full", - "description": " Call Id" - }, - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": " Call's peer" - }, - { - "type": "reference", - "argument": "callMembers", - "category": "full", - "description": " Call Members" - } - ], - "attributes": [ - { - "type": "int64", - "id": 1, - "name": "callId" - }, - { - "type": { - "type": "struct", - "childType": "Peer" - }, - "id": 2, - "name": "peer" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "CallMember" - } - }, - "id": 3, - "name": "callMembers" - } - ] - } - }, - { - "type": "enum", - "content": { - "name": "CallMemberState", - "values": [ - { - "name": "RINGING", - "id": 1 - }, - { - "name": "RINGING_REACHED", - "id": 4 - }, - { - "name": "CONNECTING", - "id": 2 - }, - { - "name": "CONNECTED", - "id": 3 - }, - { - "name": "ENDED", - "id": 5 - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "CallMemberStateHolder", - "doc": [ - "Call Member state holder", - { - "type": "reference", - "argument": "state", - "category": "full", - "description": " State Value" - }, - { - "type": "reference", - "argument": "fallbackIsRinging", - "category": "full", - "description": " Fallback flag for future compatibility of state" - }, - { - "type": "reference", - "argument": "fallbackIsConnected", - "category": "full", - "description": " Fallback flag for future compatibility of state" - }, - { - "type": "reference", - "argument": "fallbackIsConnecting", - "category": "full", - "description": " Fallback flag for future compatibility of state" - }, - { - "type": "reference", - "argument": "fallbackIsRingingReached", - "category": "full", - "description": " Fallback flag for future compatibility of state" - }, - { - "type": "reference", - "argument": "fallbackIsEnded", - "category": "full", - "description": " Fallback flag for future compatibility of state" - } - ], - "attributes": [ - { - "type": { - "type": "enum", - "childType": "CallMemberState" - }, - "id": 1, - "name": "state" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 2, - "name": "fallbackIsRinging" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 3, - "name": "fallbackIsConnected" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 4, - "name": "fallbackIsConnecting" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 5, - "name": "fallbackIsRingingReached" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 6, - "name": "fallbackIsEnded" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "CallMember", - "doc": [ - "Call Member", - { - "type": "reference", - "argument": "userId", - "category": "full", - "description": " Member User Id" - }, - { - "type": "reference", - "argument": "state", - "category": "full", - "description": " State of member" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "userId" - }, - { - "type": { - "type": "struct", - "childType": "CallMemberStateHolder" - }, - "id": 3, - "name": "state" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "PeerSettings", - "doc": [ - "Peer Settings", - { - "type": "reference", - "argument": "is3DESSupported", - "category": "full", - "description": " Marking if 3DES supported. Default is false." - }, - { - "type": "reference", - "argument": "isMobile", - "category": "full", - "description": " Is Peer a mobile phone. Default is false." - }, - { - "type": "reference", - "argument": "canBeAudioRelay", - "category": "full", - "description": " If peer can audio relay. Default is false." - }, - { - "type": "reference", - "argument": "canPreConnect", - "category": "full", - "description": " If peer can preconnect before answer" - } - ], - "attributes": [ - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 1, - "name": "is3DESSupported" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 2, - "name": "isMobile" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 3, - "name": "canBeAudioRelay" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 4, - "name": "canPreConnect" - } - ] - } - } - ] - }, - { - "title": "Config sync", - "package": "configs", - "doc": [ - "Parameter Syncronization across devices. Can be used for simple sync", - "across devices without rewriting server side code." - ], - "items": [ - { - "type": "struct", - "content": { - "name": "Parameter", - "doc": [ - "Syncing Parameter", - { - "type": "reference", - "argument": "key", - "category": "full", - "description": " Key of parameter" - }, - { - "type": "reference", - "argument": "value", - "category": "full", - "description": " Value of parameter" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "key" - }, - { - "type": "string", - "id": 2, - "name": "value" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "GetParameters", - "header": 134, - "response": { - "type": "anonymous", - "header": 135, - "doc": [ - { - "type": "reference", - "argument": "parameters", - "category": "full", - "description": " Current parameters" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Parameter" - } - }, - "id": 1, - "name": "parameters" - } - ] - }, - "doc": [ - "Getting Parameters" - ], - "attributes": [] - } - }, - { - "type": "rpc", - "content": { - "name": "EditParameter", - "header": 128, - "response": { - "type": "reference", - "name": "Seq" - }, - "doc": [ - "Change parameter value", - { - "type": "reference", - "argument": "key", - "category": "full", - "description": "Key of parameter" - }, - { - "type": "reference", - "argument": "value", - "category": "full", - "description": "Value of parameter" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "key" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 2, - "name": "value" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "ParameterChanged", - "header": 131, - "doc": [ - "Update about parameter change", - { - "type": "reference", - "argument": "key", - "category": "full", - "description": " Key of parameter" - }, - { - "type": "reference", - "argument": "value", - "category": "full", - "description": " Value of parameter" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "key" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 2, - "name": "value" - } - ] - } - } - ] - }, - { - "title": "Stats", - "package": "stats", - "doc": [ - "Saving statistics information" - ], - "items": [ - { - "type": "struct", - "content": { - "name": "EventRecord", - "doc": [ - "Record for stored event" - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 1, - "name": "date" - }, - { - "type": { - "type": "trait", - "childType": "Event" - }, - "id": 2, - "name": "event" - } - ] - } - }, - { - "type": "trait", - "content": { - "isContainer": "true", - "name": "Event", - "attributes": [] - } - }, - { - "type": "struct", - "content": { - "name": "UntypedEvent", - "doc": [ - "Untyped event", - { - "type": "reference", - "argument": "eventType", - "category": "full", - "description": " Event type" - }, - { - "type": "reference", - "argument": "params", - "category": "full", - "description": " optional params for event" - } - ], - "trait": { - "name": "Event", - "key": 1 - }, - "expandable": "true", - "attributes": [ - { - "type": "string", - "id": 1, - "name": "eventType" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "trait", - "childType": "RawValue" - } - }, - "id": 2, - "name": "params" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "ContentViewChanged", - "doc": [ - "Content view event", - { - "type": "reference", - "argument": "contentType", - "category": "full", - "description": " unique content id" - }, - { - "type": "reference", - "argument": "visible", - "category": "full", - "description": " Is content visible" - }, - { - "type": "reference", - "argument": "params", - "category": "full", - "description": " optional params for content view" - } - ], - "trait": { - "name": "Event", - "key": 2 - }, - "expandable": "true", - "attributes": [ - { - "type": "string", - "id": 1, - "name": "contentType" - }, - { - "type": "string", - "id": 2, - "name": "contentId" - }, - { - "type": "bool", - "id": 3, - "name": "visible" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "trait", - "childType": "RawValue" - } - }, - "id": 4, - "name": "params" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "AppVisibleChanged", - "doc": [ - "On App Visible event", - { - "type": "reference", - "argument": "visible", - "category": "full", - "description": " Is app visible" - } - ], - "trait": { - "name": "Event", - "key": 4 - }, - "expandable": "true", - "attributes": [ - { - "type": "bool", - "id": 1, - "name": "visible" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "StoreEvents", - "header": 243, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Storing events on server", - { - "type": "reference", - "argument": "events", - "category": "full", - "description": "Events for storing" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "trait", - "childType": "Event" - } - }, - "id": 1, - "name": "events" - } - ] - } - } - ] - }, - { - "title": "Raw API", - "package": "raw", - "doc": [ - "Schema-less API that is useful for external integrations" - ], - "items": [ - { - "type": "rpc", - "content": { - "name": "RawRequest", - "header": 2569, - "response": { - "type": "anonymous", - "header": 2570, - "doc": [ - "Response of a raw request", - { - "type": "reference", - "argument": "result", - "category": "full", - "description": " Result of request" - } - ], - "attributes": [ - { - "type": { - "type": "trait", - "childType": "RawValue" - }, - "id": 1, - "name": "result" - } - ] - }, - "doc": [ - "Making raw request to external service via shema-less RPC request", - { - "type": "reference", - "argument": "service", - "category": "full", - "description": "Service name for RPC request" - }, - { - "type": "reference", - "argument": "method", - "category": "full", - "description": "Method for execution" - }, - { - "type": "reference", - "argument": "params", - "category": "full", - "description": "Optional params for the method" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "service" - }, - { - "type": "string", - "id": 2, - "name": "method" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "trait", - "childType": "RawValue" - } - }, - "id": 3, - "name": "params" - } - ] - } - } - ] - }, - { - "title": "Wallpappers", - "package": "wallpappers", - "doc": [ - "Wallpappers support" - ], - "items": [ - { - "type": "struct", - "content": { - "name": "Wallpapper", - "doc": [ - "Wallpapper structure", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": " Wallpapper id" - }, - { - "type": "reference", - "argument": "w", - "category": "full", - "description": " Image width" - }, - { - "type": "reference", - "argument": "h", - "category": "full", - "description": " Image height" - }, - { - "type": "reference", - "argument": "fileSize", - "category": "full", - "description": " Image file size" - }, - { - "type": "reference", - "argument": "file", - "category": "full", - "description": " Image file reference" - }, - { - "type": "reference", - "argument": "thumb", - "category": "full", - "description": " Image thumb" - } - ], - "attributes": [ - { - "type": "int32", - "id": 7, - "name": "id" - }, - { - "type": "int32", - "id": 1, - "name": "w" - }, - { - "type": "int32", - "id": 2, - "name": "h" - }, - { - "type": "int32", - "id": 3, - "name": "fileSize" - }, - { - "type": { - "type": "struct", - "childType": "FileLocation" - }, - "id": 5, - "name": "file" - }, - { - "type": { - "type": "struct", - "childType": "FastThumb" - }, - "id": 6, - "name": "thumb" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "LoadWallpappers", - "header": 241, - "response": { - "type": "anonymous", - "header": 242, - "doc": [ - "Loaded Wallpappers", - { - "type": "reference", - "argument": "wallpappers", - "category": "full", - "description": " Available wallpapper list" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Wallpapper" - } - }, - "id": 1, - "name": "wallpappers" - } - ] - }, - "doc": [ - "Load available wallpappers", - { - "type": "reference", - "argument": "maxWidth", - "category": "full", - "description": "Maximum width of wallpapper" - }, - { - "type": "reference", - "argument": "maxHeight", - "category": "full", - "description": "Maximum height of wallpapper" - } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "maxWidth" - }, - { - "type": "int32", - "id": 2, - "name": "maxHeight" - } - ] - } - } - ] - }, - { - "title": "Push", - "package": "push", - "doc": [ - "Vendor's pushes for receiving push notifications.", - "Push notification contains current sequence number of main sequence." - ], - "items": [ - { - "type": "rpc", - "content": { - "name": "RegisterGooglePush", - "header": 51, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Registering push token on server", - { - "type": "reference", - "argument": "projectId", - "category": "hidden", - "description": "Project Id of token" - }, - { - "type": "reference", - "argument": "token", - "category": "danger", - "description": "token value" - } - ], - "attributes": [ - { - "type": "int64", - "id": 1, - "name": "projectId" - }, - { - "type": "string", - "id": 2, - "name": "token" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "UnregisterGooglePush", - "header": 2631, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Unregistering Google Push", - { - "type": "reference", - "argument": "token", - "category": "danger", - "description": "Token value" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "token" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "RegisterApplePush", - "header": 76, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Registering apple push on server", - { - "type": "reference", - "argument": "apnsKey", - "category": "hidden", - "description": "apns key id" - }, - { - "type": "reference", - "argument": "token", - "category": "danger", - "description": "token value" - } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "apnsKey" - }, - { - "type": "string", - "id": 2, - "name": "token" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "UnregisterApplePush", - "header": 2632, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Unregistering Apple Push", - { - "type": "reference", - "argument": "token", - "category": "full", - "description": "Token" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "token" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "RegisterApplePushKit", - "header": 2576, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Registration of a new Apple's PushKit tokens", - { - "type": "reference", - "argument": "apnsKey", - "category": "hidden", - "description": "APNS key id" - }, - { - "type": "reference", - "argument": "token", - "category": "danger", - "description": "token value" - } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "apnsKey" - }, - { - "type": "string", - "id": 2, - "name": "token" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "UnregisterApplePushKit", - "header": 2633, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Unregistering Apple Push Kit token", - { - "type": "reference", - "argument": "token", - "category": "hidden", - "description": "Token Value" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "token" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "RegisterApplePushToken", - "header": 2593, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Registering Apple Push Token", - { - "type": "reference", - "argument": "bundleId", - "category": "full", - "description": "Bundle Id of app" - }, - { - "type": "reference", - "argument": "token", - "category": "full", - "description": "Push token" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "bundleId" - }, - { - "type": "string", - "id": 2, - "name": "token" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "UnregisterApplePushToken", - "header": 2634, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Unregister Apple Push token", - { - "type": "reference", - "argument": "token", - "category": "hidden", - "description": "Token value" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "token" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "RegisterActorPush", - "header": 2575, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Register Actor Push endpoint", - { - "type": "reference", - "argument": "endpoint", - "category": "full", - "description": "Endpoint for push sending" - }, - { - "type": "reference", - "argument": "encryptionKeys", - "category": "full", - "description": "Push Encryption keys" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "endpoint" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "EncryptionKey" - } - }, - "id": 2, - "name": "encryptionKeys" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "UnregisterActorPush", - "header": 2635, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Unregister Actor Push endpoint", - { - "type": "reference", - "argument": "endpoint", - "category": "full", - "description": "Endpoint for unregistering" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "endpoint" - } - ] - } - } - ] - }, - { - "title": "Encryption", - "package": "encryption", - "doc": [ - "Package that include encryption support", - "Key alg types:", - "* curve25519 - https://en.wikipedia.org/wiki/Curve25519", - "* rsa-2048", - "* rsa-4096", - "* aes-128", - "* kuznechik-128", - "", - "Signature alg types:", - "* Ed25519 - used curve25519 conveted to Ed255519 for signing and validataion" - ], - "items": [ - { - "type": "comment", - "content": "Public Keys" - }, - { - "type": "struct", - "content": { - "name": "EncryptionKeyGroup", - "doc": [ - "Encryption Key Group", - { - "type": "reference", - "argument": "keyGroupId", - "category": "full", - "description": " Key Group Id" - }, - { - "type": "reference", - "argument": "identityKey", - "category": "full", - "description": " Key that is used as identity and for validation of Key Group changes" - }, - { - "type": "reference", - "argument": "supportedEncryption", - "category": "full", - "description": " Supported encryption methods by this key group" - }, - { - "type": "reference", - "argument": "keys", - "category": "compact", - "description": " keys of Key Group" - }, - { - "type": "reference", - "argument": "signatures", - "category": "compact", - "description": " Signatures of keys" - } - ], - "expandable": "true", - "attributes": [ - { - "type": { - "type": "alias", - "childType": "keyGroupId" - }, - "id": 1, - "name": "keyGroupId" - }, - { - "type": { - "type": "list", - "childType": "string" - }, - "id": 2, - "name": "supportedEncryption" - }, - { - "type": { - "type": "struct", - "childType": "EncryptionKey" - }, - "id": 3, - "name": "identityKey" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "EncryptionKey" - } - }, - "id": 4, - "name": "keys" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "EncryptionKeySignature" - } - }, - "id": 5, - "name": "signatures" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "EncryptionKeySignature", - "doc": [ - "Signed Key. Usually used for public keys.", - { - "type": "reference", - "argument": "keyId", - "category": "full", - "description": " Key Id used for signature" - }, - { - "type": "reference", - "argument": "signatureAlg", - "category": "full", - "description": " Signature algorithm" - }, - { - "type": "reference", - "argument": "signature", - "category": "full", - "description": " Signature value" - } - ], - "attributes": [ - { - "type": "int64", - "id": 1, - "name": "keyId" - }, - { - "type": "string", - "id": 2, - "name": "signatureAlg" - }, - { - "type": "bytes", - "id": 3, - "name": "signature" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "EncryptionKey", - "doc": [ - "Encryption Key", - { - "type": "reference", - "argument": "keyId", - "category": "full", - "description": " Key Id" - }, - { - "type": "reference", - "argument": "keyAlg", - "category": "full", - "description": " Key Algorithm" - }, - { - "type": "reference", - "argument": "keyMaterial", - "category": "compact", - "description": " Public key material. Can be null, but always not null for LoadPublicKey" - }, - { - "type": "reference", - "argument": "keyHash", - "category": "hidden", - "description": " If keyMaterial is null, pass keyHash - SHA256 of key" - } - ], - "expandable": "true", - "attributes": [ - { - "type": "int64", - "id": 1, - "name": "keyId" - }, - { - "type": "string", - "id": 2, - "name": "keyAlg" - }, - { - "type": { - "type": "opt", - "childType": "bytes" - }, - "id": 3, - "name": "keyMaterial" - }, - { - "type": { - "type": "opt", - "childType": "bytes" - }, - "id": 4, - "name": "keyHash" - } - ] - } - }, - { - "type": "response", - "content": { - "name": "PublicKeys", - "header": 2602, - "doc": [ - "Public Keys response", - { - "type": "reference", - "argument": "publicKey", - "category": "full", - "description": " Public keys" - }, - { - "type": "reference", - "argument": "signatures", - "category": "full", - "description": " Signatures of public keys" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "EncryptionKey" - } - }, - "id": 1, - "name": "publicKey" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "EncryptionKeySignature" - } - }, - "id": 2, - "name": "signatures" - } - ] - } - }, - { - "type": "response", - "content": { - "name": "PublicKeyGroups", - "header": 2604, - "doc": [ - "Public key groups response" - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "EncryptionKeyGroup" - } - }, - "id": 1, - "name": "publicKeyGroups" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "LoadPublicKeyGroups", - "header": 2601, - "response": { - "type": "reference", - "name": "PublicKeyGroups" - }, - "doc": [ - "Loading Public key groups", - { - "type": "reference", - "argument": "userPeer", - "category": "full", - "description": "User's peer" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "UserOutPeer" - }, - "id": 1, - "name": "userPeer" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "LoadPublicKey", - "header": 2605, - "response": { - "type": "reference", - "name": "PublicKeys" - }, - "doc": [ - "Loading public key explictly", - { - "type": "reference", - "argument": "userPeer", - "category": "full", - "description": "User's peer" - }, - { - "type": "reference", - "argument": "keyGroupId", - "category": "full", - "description": "Key group's id" - }, - { - "type": "reference", - "argument": "keyIds", - "category": "full", - "description": "Key ids for loading" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "UserOutPeer" - }, - "id": 1, - "name": "userPeer" - }, - { - "type": "int32", - "id": 2, - "name": "keyGroupId" - }, - { - "type": { - "type": "list", - "childType": "int64" - }, - "id": 3, - "name": "keyIds" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "LoadPrePublicKeys", - "header": 2603, - "response": { - "type": "reference", - "name": "PublicKeys" - }, - "doc": [ - "Loading SOME of ephermal public keys", - { - "type": "reference", - "argument": "userPeer", - "category": "full", - "description": "User's peer" - }, - { - "type": "reference", - "argument": "keyGroupId", - "category": "full", - "description": "User's key group id" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "UserOutPeer" - }, - "id": 1, - "name": "userPeer" - }, - { - "type": "int32", - "id": 2, - "name": "keyGroupId" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "PublicKeyGroupChanged", - "header": 103, - "doc": [ - "Update about public key group changed", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " User's id" - }, - { - "type": "reference", - "argument": "keyGroup", - "category": "full", - "description": " Updated Key Group" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": { - "type": "struct", - "childType": "EncryptionKeyGroup" - }, - "id": 2, - "name": "keyGroup" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "KeysAdded", - "header": 112, - "doc": [ - "Update about keys added to Key Group", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " User's id" - }, - { - "type": "reference", - "argument": "keyGroupId", - "category": "full", - "description": " Key Group Id" - }, - { - "type": "reference", - "argument": "keys", - "category": "compact", - "description": " Added keys" - }, - { - "type": "reference", - "argument": "signatures", - "category": "compact", - "description": " Signatures of a public key" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": { - "type": "alias", - "childType": "keyGroupId" - }, - "id": 2, - "name": "keyGroupId" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "EncryptionKey" - } - }, - "id": 3, - "name": "keys" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "EncryptionKeySignature" - } - }, - "id": 4, - "name": "signatures" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "KeysRemoved", - "header": 113, - "doc": [ - "Update about keys removed from Key Group", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " User's id" - }, - { - "type": "reference", - "argument": "keyGroupId", - "category": "full", - "description": " Key Group Id" - }, - { - "type": "reference", - "argument": "keyIds", - "category": "full", - "description": " Removed keys" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": { - "type": "alias", - "childType": "keyGroupId" - }, - "id": 2, - "name": "keyGroupId" - }, - { - "type": { - "type": "list", - "childType": "int64" - }, - "id": 3, - "name": "keyIds" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "PublicKeyGroupAdded", - "header": 104, - "doc": [ - "Update about public key group added", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " User's id" - }, - { - "type": "reference", - "argument": "keyGroup", - "category": "full", - "description": " Added Key Group" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": { - "type": "struct", - "childType": "EncryptionKeyGroup" - }, - "id": 2, - "name": "keyGroup" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "PublicKeyGroupRemoved", - "header": 105, - "doc": [ - "Update about public key group removed", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " User's id" - }, - { - "type": "reference", - "argument": "keyGroupId", - "category": "full", - "description": " Removed Key Group Id" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": { - "type": "alias", - "childType": "keyGroupId" - }, - "id": 2, - "name": "keyGroupId" - } - ] - } - }, - { - "type": "comment", - "content": "Device Side" - }, - { - "type": "rpc", - "content": { - "name": "CreateNewKeyGroup", - "header": 2609, - "response": { - "type": "anonymous", - "header": 2610, - "doc": [ - { - "type": "reference", - "argument": "keyGroupId", - "category": "full", - "description": " Created Key Group id" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "keyGroupId" - }, - "id": 1, - "name": "keyGroupId" - } - ] - }, - "doc": [ - "Creation of a new Key Group", - { - "type": "reference", - "argument": "identityKey", - "category": "full", - "description": "Identity Key of a new group" - }, - { - "type": "reference", - "argument": "supportedEncryptions", - "category": "full", - "description": "Supported encryption methods" - }, - { - "type": "reference", - "argument": "keys", - "category": "full", - "description": "keys of current group" - }, - { - "type": "reference", - "argument": "signatures", - "category": "full", - "description": "signatures of keys" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "EncryptionKey" - }, - "id": 1, - "name": "identityKey" - }, - { - "type": { - "type": "list", - "childType": "string" - }, - "id": 2, - "name": "supportedEncryptions" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "EncryptionKey" - } - }, - "id": 3, - "name": "keys" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "EncryptionKeySignature" - } - }, - "id": 4, - "name": "signatures" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "DeleteKeyGroup", - "header": 2611, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Deletion of a Key Group", - { - "type": "reference", - "argument": "keyGroupId", - "category": "full", - "description": "Key Group Id for deletion" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "keyGroupId" - }, - "id": 1, - "name": "keyGroupId" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "DisconnectKeyGroup", - "header": 2613, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Disconnect Key Group from device", - { - "type": "reference", - "argument": "keyGroupId", - "category": "full", - "description": "Key Group Id for disconnection" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "keyGroupId" - }, - "id": 1, - "name": "keyGroupId" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "ConnectKeyGroup", - "header": 2614, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Connectiong Key Group to device", - { - "type": "reference", - "argument": "keyGroupId", - "category": "full", - "description": "Key Group Id for connection" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "keyGroupId" - }, - "id": 1, - "name": "keyGroupId" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "UploadPreKey", - "header": 2612, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Uploading Ephermal Keys", - { - "type": "reference", - "argument": "keyGroupId", - "category": "full", - "description": "Key Group Id" - }, - { - "type": "reference", - "argument": "keys", - "category": "compact", - "description": "Encryprion keys" - }, - { - "type": "reference", - "argument": "signatures", - "category": "compact", - "description": "Key signatures" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "keyGroupId" - }, - "id": 1, - "name": "keyGroupId" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "EncryptionKey" - } - }, - "id": 2, - "name": "keys" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "EncryptionKeySignature" - } - }, - "id": 3, - "name": "signatures" - } - ] - } - }, - { - "type": "comment", - "content": "Encrypted Packages" - }, - { - "type": "struct", - "content": { - "name": "EncryptedBox", - "doc": [ - "Encrypted package that is encrypted for multiple keys", - { - "type": "reference", - "argument": "keys", - "category": "full", - "description": " Encrypted encryption keys" - }, - { - "type": "reference", - "argument": "algType", - "category": "full", - "description": " Package encryption type" - }, - { - "type": "reference", - "argument": "encPackage", - "category": "full", - "description": " Encrypted package" - }, - { - "type": "reference", - "argument": "senderKeyGroupId", - "category": "full", - "description": " Sender key group" - } - ], - "expandable": "true", - "attributes": [ - { - "type": { - "type": "alias", - "childType": "keyGroupId" - }, - "id": 4, - "name": "senderKeyGroupId" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "EncyptedBoxKey" - } - }, - "id": 1, - "name": "keys" - }, - { - "type": "string", - "id": 2, - "name": "algType" - }, - { - "type": "bytes", - "id": 3, - "name": "encPackage" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "EncryptedBoxSignature" - } - }, - "id": 5, - "name": "signatures" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "EncryptedBoxSignature", - "doc": [ - "Signature for encrypted package", - { - "type": "reference", - "argument": "algType", - "category": "full", - "description": " Alg Type" - }, - { - "type": "reference", - "argument": "signature", - "category": "full", - "description": " Signature of encrypted package" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "algType" - }, - { - "type": "bytes", - "id": 2, - "name": "signature" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "EncyptedBoxKey", - "doc": [ - "Encrypted package encryption key", - { - "type": "reference", - "argument": "keyGroupId", - "category": "full", - "description": " Key Group Id" - }, - { - "type": "reference", - "argument": "algType", - "category": "full", - "description": " Key encryption algorithm" - }, - { - "type": "reference", - "argument": "encryptedKey", - "category": "hidden", - "description": " Encrypted encryption key" - } - ], - "expandable": "true", - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "usersId" - }, - { - "type": { - "type": "alias", - "childType": "keyGroupId" - }, - "id": 2, - "name": "keyGroupId" - }, - { - "type": "string", - "id": 3, - "name": "algType" - }, - { - "type": "bytes", - "id": 4, - "name": "encryptedKey" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "KeyGroupId", - "doc": [ - "References to key groups", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " User's id" - }, - { - "type": "reference", - "argument": "keyGroupId", - "category": "full", - "description": " Key Group Id" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": { - "type": "alias", - "childType": "keyGroupId" - }, - "id": 2, - "name": "keyGroupId" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "KeyGroupHolder", - "doc": [ - "Key Group Holder", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " User's id" - }, - { - "type": "reference", - "argument": "keyGroup", - "category": "full", - "description": " Key Group" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": { - "type": "struct", - "childType": "EncryptionKeyGroup" - }, - "id": 2, - "name": "keyGroup" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "SendEncryptedPackage", - "header": 2657, - "response": { - "type": "anonymous", - "header": 2664, - "doc": [ - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " date" - }, - { - "type": "reference", - "argument": "obsoleteKeyGroups", - "category": "full", - "description": " obsolete key group ids" - }, - { - "type": "reference", - "argument": "missedKeyGroups", - "category": "full", - "description": " missed key groups" - } - ], - "attributes": [ - { - "type": { - "type": "opt", - "childType": { - "type": "alias", - "childType": "date" - } - }, - "id": 1, - "name": "date" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "KeyGroupId" - } - }, - "id": 2, - "name": "obsoleteKeyGroups" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "KeyGroupHolder" - } - }, - "id": 3, - "name": "missedKeyGroups" - } - ] - }, - "doc": [ - "Sending encrypted package", - { - "type": "reference", - "argument": "randomId", - "category": "hidden", - "description": "Random id" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 1, - "name": "randomId" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "UserOutPeer" - } - }, - "id": 2, - "name": "destPeers" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "KeyGroupId" - } - }, - "id": 3, - "name": "ignoredKeyGroups" - }, - { - "type": { - "type": "struct", - "childType": "EncryptedBox" - }, - "id": 4, - "name": "encryptedBox" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "EncryptedPackage", - "header": 177, - "doc": [ - "Update about encrypted package", - { - "type": "reference", - "argument": "randomId", - "category": "full", - "description": " Random Id of package" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " Sending date of package" - }, - { - "type": "reference", - "argument": "senderId", - "category": "full", - "description": " Sender id of package" - }, - { - "type": "reference", - "argument": "encryptedBox", - "category": "full", - "description": " Encrypted box" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 1, - "name": "randomId" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 2, - "name": "date" - }, - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 3, - "name": "senderId" - }, - { - "type": { - "type": "struct", - "childType": "EncryptedBox" - }, - "id": 4, - "name": "encryptedBox" - } - ] - } - } - ] - }, - { - "title": "Storage", - "package": "storage", - "items": [ - { - "type": "rpc", - "content": { - "name": "UploadSharedBlob", - "header": 2660, - "response": { - "type": "anonymous", - "header": 2661, - "doc": [ - { - "type": "reference", - "argument": "sharedObjectId", - "category": "full", - "description": " Id of shared object" - } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "sharedObjectId" - } - ] - }, - "doc": [ - "Upload shared blob with user", - { - "type": "reference", - "argument": "destPeer", - "category": "full", - "description": "Destination peer" - }, - { - "type": "reference", - "argument": "bucket", - "category": "full", - "description": "Bucked name" - }, - { - "type": "reference", - "argument": "blob", - "category": "full", - "description": "Blob data" - }, - { - "type": "reference", - "argument": "randomId", - "category": "full", - "description": "Random id for protecting from double upload" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "UserOutPeer" - }, - "id": 1, - "name": "destPeer" - }, - { - "type": "string", - "id": 2, - "name": "bucket" - }, - { - "type": "bytes", - "id": 3, - "name": "blob" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 4, - "name": "randomId" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "DownloadSharedBlob", - "header": 2662, - "response": { - "type": "anonymous", - "header": 2663, - "doc": [ - { - "type": "reference", - "argument": "blob", - "category": "full", - "description": " Blob contents" - } - ], - "attributes": [ - { - "type": "bytes", - "id": 1, - "name": "blob" - } - ] - }, - "doc": [ - "Download shared blob", - { - "type": "reference", - "argument": "destPeer", - "category": "full", - "description": "Destination peer" - }, - { - "type": "reference", - "argument": "bucket", - "category": "full", - "description": "Bucket name" - }, - { - "type": "reference", - "argument": "objectId", - "category": "full", - "description": "Object Id" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "UserOutPeer" - }, - "id": 1, - "name": "destPeer" - }, - { - "type": "string", - "id": 2, - "name": "bucket" - }, - { - "type": "int32", - "id": 3, - "name": "objectId" - } - ] - } - } - ] - }, - { - "title": "Peers", - "package": "peers", - "doc": [ - "Peer is an identificator of specific conversation." - ], - "items": [ - { - "type": "enum", - "content": { - "name": "PeerType", - "values": [ - { - "name": "Private", - "id": 1 - }, - { - "name": "Group", - "id": 2 - }, - { - "name": "EncryptedPrivate", - "id": 3 - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "Peer", - "doc": [ - "Peer", - { - "type": "reference", - "argument": "type", - "category": "full", - "description": " Peer Type" - }, - { - "type": "reference", - "argument": "id", - "category": "full", - "description": " Peer Id" - } - ], - "attributes": [ - { - "type": { - "type": "enum", - "childType": "PeerType" - }, - "id": 1, - "name": "type" - }, - { - "type": "int32", - "id": 2, - "name": "id" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "OutPeer", - "doc": [ - "Out peer with access hash", - { - "type": "reference", - "argument": "type", - "category": "full", - "description": " Peer Type" - }, - { - "type": "reference", - "argument": "id", - "category": "full", - "description": " Peer Id" - }, - { - "type": "reference", - "argument": "accessHash", - "category": "danger", - "description": " Peer access hash" - } - ], - "attributes": [ - { - "type": { - "type": "enum", - "childType": "PeerType" - }, - "id": 1, - "name": "type" - }, - { - "type": "int32", - "id": 2, - "name": "id" - }, - { - "type": "int64", - "id": 3, - "name": "accessHash" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "UserOutPeer", - "doc": [ - "User's out peer", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " User's id" - }, - { - "type": "reference", - "argument": "accessHash", - "category": "danger", - "description": " User's access hash" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" + "name": "Text", + "id": 2 }, { - "type": "int64", - "id": 2, - "name": "accessHash" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "GroupOutPeer", - "doc": [ - "Group's out peer", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group's Id" + "name": "Links", + "id": 3 }, { - "type": "reference", - "argument": "accessHash", - "category": "danger", - "description": " Group's access hash" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" + "name": "Documents", + "id": 4 }, { - "type": "int64", - "id": 2, - "name": "accessHash" + "name": "Photos", + "id": 5 } - ] - } + ] } - ] - }, - { - "title": "Sequence and Updates", - "package": "sequence", + },{"type":"trait","content":{ +"isContainer":"true","name":"SearchCondition","attributes":[ +]}}, { + "type":"struct", + "content": { + "name":"SearchPeerTypeCondition", +"doc":[ +"Search peer type condition",{"type":"reference","argument":"peerType","category":"full","description":" Peer type for searching"}],"trait":{"name":"SearchCondition","key":1},"attributes":[ +{"type":{"type":"enum","childType":"SearchPeerType"},"id":1,"name":"peerType"} +]}}, { + "type":"struct", + "content": { + "name":"SearchPieceText", +"doc":[ +"Search peer name condition",{"type":"reference","argument":"query","category":"full","description":" Search query"}],"trait":{"name":"SearchCondition","key":2},"attributes":[ +{"type":"string","id":1,"name":"query"} +]}}, { + "type":"struct", + "content": { + "name":"SearchAndCondition", +"doc":[ +"Search AND condion",{"type":"reference","argument":"andQuery","category":"full","description":" And Query"}],"trait":{"name":"SearchCondition","key":3},"attributes":[ +{"type":{"type":"list","childType":{"type":"trait","childType":"SearchCondition"}},"id":1,"name":"andQuery"} +]}}, { + "type":"struct", + "content": { + "name":"SearchOrCondition", +"doc":[ +"Search OR condition",{"type":"reference","argument":"orQuery","category":"full","description":" Or Query"}],"trait":{"name":"SearchCondition","key":4},"attributes":[ +{"type":{"type":"list","childType":{"type":"trait","childType":"SearchCondition"}},"id":2,"name":"orQuery"} +]}}, { + "type":"struct", + "content": { + "name":"SearchPeerCondition", +"doc":[ +"Serch Peer condition",{"type":"reference","argument":"peer","category":"full","description":" Peer condition"}],"trait":{"name":"SearchCondition","key":5},"attributes":[ +{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"} +]}}, { + "type":"struct", + "content": { + "name":"SearchPeerContentType", +"doc":[ +"Search content type condition",{"type":"reference","argument":"contentType","category":"full","description":" Content Type"}],"trait":{"name":"SearchCondition","key":6},"attributes":[ +{"type":{"type":"enum","childType":"SearchContentType"},"id":1,"name":"contentType"} +]}}, { + "type":"struct", + "content": { + "name":"SearchSenderIdConfition", +"doc":[ +"Searching sender uid condition",{"type":"reference","argument":"senderId","category":"full","description":" sender UID"}],"trait":{"name":"SearchCondition","key":7},"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"senderId"} +]}}, { + "type":"struct", + "content": { + "name":"PeerSearchResult", +"doc":[ +"Peer search result",{"type":"reference","argument":"peer","category":"full","description":" Peer information"},{"type":"reference","argument":"optMatchString","category":"full","description":" Description"}],"attributes":[ +{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"} +,{"type":{"type":"opt","childType":"string"},"id":3,"name":"optMatchString"} +]}},{"type":"rpc","content":{ +"name":"PeerSearch", +"header":233, +"response":{"type":"anonymous","header":234, "doc":[ +"Found peers",{"type":"reference","argument":"searchResults","category":"full","description":" Search Results"},{"type":"reference","argument":"users","category":"full","description":" Related users"},{"type":"reference","argument":"groups","category":"full","description":" Related groups"},{"type":"reference","argument":"userPeers","category":"full","description":" Related user peers"},{"type":"reference","argument":"groupPeers","category":"full","description":" Related group peers"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"PeerSearchResult"}},"id":1,"name":"searchResults"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":2,"name":"users"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"Group"}},"id":3,"name":"groups"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":4,"name":"userPeers"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"GroupOutPeer"}},"id":5,"name":"groupPeers"} +]}, +"doc":[ +"Performing peer search",{"type":"reference","argument":"query","category":"full","description":"Search query. Warring not all combinations can be processed by server. (acts as OR)"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled Optimizations"}],"attributes":[ +{"type":{"type":"list","childType":{"type":"trait","childType":"SearchCondition"}},"id":1,"name":"query"} +,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":2,"name":"optimizations"} +]}}, { + "type":"struct", + "content": { + "name":"MessageSearchResult", +"doc":[ +"Message container",{"type":"reference","argument":"peer","category":"full","description":" Message Peer"},{"type":"reference","argument":"rid","category":"full","description":" Message Random Id"},{"type":"reference","argument":"date","category":"full","description":" Message Date"},{"type":"reference","argument":"senderId","category":"full","description":" Message sender UID"},{"type":"reference","argument":"content","category":"full","description":" Message content"}],"attributes":[ +{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"} +,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"rid"} +,{"type":{"type":"alias","childType":"date"},"id":3,"name":"date"} +,{"type":{"type":"alias","childType":"userId"},"id":4,"name":"senderId"} +,{"type":{"type":"trait","childType":"Message"},"id":5,"name":"content"} +]}}, { + "type":"struct", + "content": { + "name":"MessageSearchItem", +"doc":[ +"Message Search result container"],"attributes":[ +{"type":{"type":"struct","childType":"MessageSearchResult"},"id":1,"name":"result"} +]}},{"type":"response","content":{ +"name":"MessageSearchResponse", +"header":218, +"doc":[ +"Search Result",{"type":"reference","argument":"searchResults","category":"full","description":" Search results"},{"type":"reference","argument":"users","category":"full","description":" Search users"},{"type":"reference","argument":"groups","category":"full","description":" Search groups"},{"type":"reference","argument":"loadMoreState","category":"hidden","description":" State for loading more results"},{"type":"reference","argument":"userOutPeers","category":"full","description":" Search user peers"},{"type":"reference","argument":"groupOutPeers","category":"full","description":" Search group peers"}],"attributes":[ +{"type":{"type":"list","childType":{"type":"struct","childType":"MessageSearchItem"}},"id":1,"name":"searchResults"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":2,"name":"users"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"Group"}},"id":3,"name":"groups"} +,{"type":{"type":"opt","childType":"bytes"},"id":4,"name":"loadMoreState"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":5,"name":"userOutPeers"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"GroupOutPeer"}},"id":6,"name":"groupOutPeers"} +]}},{"type":"rpc","content":{ +"name":"MessageSearch", +"header":217, +"response":{"type":"reference","name":"MessageSearchResponse"}, +"doc":[ +"Performing message search",{"type":"reference","argument":"query","category":"full","description":"Search query"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled Optimizations"}],"attributes":[ +{"type":{"type":"trait","childType":"SearchCondition"},"id":1,"name":"query"} +,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":2,"name":"optimizations"} +]}},{"type":"rpc","content":{ +"name":"MessageSearchMore", +"header":222, +"response":{"type":"reference","name":"MessageSearchResponse"}, +"doc":[ +"Performing message search paging",{"type":"reference","argument":"loadMoreState","category":"hidden","description":"State for loading more results"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled Optimizations"}],"attributes":[ +{"type":"bytes","id":1,"name":"loadMoreState"} +,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":2,"name":"optimizations"} +]}}]}, { + "title": "Public Groups", + "package": "pubgroups", "doc": [ - "Each device has it's own update sequence. At the begining application request initial sequence state by", - "calling GetState. On each application restart or NewSessionCreated application calls GetDifference for receiving", - "updates in update sequence.", - "GetState and GetDifference automatically subscribes session to receiving updates in session.", - "Each update has seq and state. Seq is sequental index of updated and used for detecting of holes in update sequence", - "(because of server failure or session die) on client side.", - "All updates needed to be processed in partucular order according to seq values.", - "In some updates there can be references to users that are not available at client yer. In this case application need", - "to ignore such update and init getting difference." + "Public group is easy way to find communities" ], + "items": [ + { + "type":"struct", + "content": { + "name":"PublicGroup", +"doc":[ +"Public Group description",{"type":"reference","argument":"id","category":"full","description":" Group id"},{"type":"reference","argument":"accessHash","category":"danger","description":" Group Access hash"},{"type":"reference","argument":"title","category":"full","description":" Group title"},{"type":"reference","argument":"avatar","category":"full","description":" Group avatar"},{"type":"reference","argument":"membersCount","category":"full","description":" Members count in group"},{"type":"reference","argument":"friendsCount","category":"full","description":" Friends count int group"},{"type":"reference","argument":"description","category":"full","description":" Description of group"}],"attributes":[ +{"type":"int32","id":1,"name":"id"} +,{"type":"int64","id":2,"name":"accessHash"} +,{"type":"string","id":3,"name":"title"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"Avatar"}},"id":7,"name":"avatar"} +,{"type":"int32","id":4,"name":"membersCount"} +,{"type":"int32","id":5,"name":"friendsCount"} +,{"type":"string","id":6,"name":"description"} +]}},{"type":"rpc","content":{ +"name":"GetPublicGroups", +"header":201, +"response":{"type":"anonymous","header":202, "doc":[ +"Loaded public groups",{"type":"reference","argument":"groups","category":"full","description":" All available groups"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"PublicGroup"}},"id":1,"name":"groups"} +]}, +"doc":[ +"Getting public groups"],"attributes":[ +]}}]}, { + "title": "Invites", + "package": "invites", + "doc": [ + "Invite mechanizm" + ], + "items": [ + { + "type":"struct", + "content": { + "name":"InviteState", +"doc":[ +"Invite state",{"type":"reference","argument":"email","category":"full","description":" Email of invite"},{"type":"reference","argument":"name","category":"full","description":" Name of invited user"},{"type":"reference","argument":"uid","category":"full","description":" Uid of registered user"},{"type":"reference","argument":"tid","category":"full","description":" Team id of invite"}],"attributes":[ +{"type":"string","id":1,"name":"email"} +,{"type":{"type":"opt","childType":"string"},"id":2,"name":"name"} +,{"type":{"type":"opt","childType":"int32"},"id":3,"name":"uid"} +,{"type":{"type":"opt","childType":"int32"},"id":4,"name":"tid"} +]}},{"type":"response","content":{ +"name":"InviteList", +"header":2564, +"doc":[ +"Intites list",{"type":"reference","argument":"invites","category":"full","description":" Intvites"},{"type":"reference","argument":"relatedUsers","category":"full","description":" Related users in invites"},{"type":"reference","argument":"relatedGroups","category":"full","description":" Related groups in invites"},{"type":"reference","argument":"relatedTeams","category":"full","description":" Related teams in invites"}],"attributes":[ +{"type":{"type":"list","childType":{"type":"struct","childType":"InviteState"}},"id":1,"name":"invites"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":2,"name":"relatedUsers"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"Group"}},"id":3,"name":"relatedGroups"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"Team"}},"id":4,"name":"relatedTeams"} +]}},{"type":"rpc","content":{ +"name":"LoadOwnSentInvites", +"header":2563, +"response":{"type":"reference","name":"InviteList"}, +"doc":[ +"Loading current invite states"],"attributes":[ +]}},{"type":"rpc","content":{ +"name":"SendInvite", +"header":2565, +"response":{"type":"reference","name":"InviteList"}, +"doc":[ +"Sending an email invite",{"type":"reference","argument":"email","category":"full","description":"Email for invite"},{"type":"reference","argument":"name","category":"full","description":"Optional name for invite"},{"type":"reference","argument":"destTeam","category":"full","description":"Optional team for invite"}],"attributes":[ +{"type":"string","id":1,"name":"email"} +,{"type":{"type":"opt","childType":"string"},"id":2,"name":"name"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"OutTeam"}},"id":3,"name":"destTeam"} +]}}]}, { + "title": "Teams", + "package": "teams", + "doc": [ + "Teams support for Actor" + ], + "items": [ + { + "type":"struct", + "content": { + "name":"Team", +"doc":[ +"Team entity",{"type":"reference","argument":"id","category":"full","description":" Team Id"},{"type":"reference","argument":"accessHash","category":"danger","description":" Team Access Hash"},{"type":"reference","argument":"name","category":"full","description":" Team name"}],"attributes":[ +{"type":"int32","id":1,"name":"id"} +,{"type":"int64","id":2,"name":"accessHash"} +,{"type":"string","id":3,"name":"name"} +]}}, { + "type":"struct", + "content": { + "name":"OutTeam", +"doc":[ +"Reference to a team",{"type":"reference","argument":"id","category":"full","description":" Team Id"},{"type":"reference","argument":"accessHash","category":"full","description":" Team access hash"}],"attributes":[ +{"type":"int32","id":1,"name":"id"} +,{"type":"int64","id":2,"name":"accessHash"} +]}},{"type":"response","content":{ +"name":"TeamsList", +"header":2562, +"doc":[ +"Teams response",{"type":"reference","argument":"teams","category":"hidden","description":" Teams list"}],"attributes":[ +{"type":{"type":"list","childType":{"type":"struct","childType":"Team"}},"id":1,"name":"teams"} +]}},{"type":"rpc","content":{ +"name":"LoadOwnTeams", +"header":2561, +"response":{"type":"reference","name":"TeamsList"}, +"doc":[ +"Loading own teams"],"attributes":[ +]}},{"type":"update","content":{ +"name":"OwnTeamsChanged", +"header":165, +"doc":[ +"Update about own teams changed",{"type":"reference","argument":"ownTeams","category":"full","description":" Updated own teams list"}],"attributes":[ +{"type":{"type":"list","childType":{"type":"struct","childType":"Team"}},"id":1,"name":"ownTeams"} +]}},{"type":"rpc","content":{ +"name":"CreateTeam", +"header":2566, +"response":{"type":"anonymous","header":2567, "doc":[ +"Created team response",{"type":"reference","argument":"createdTeam","category":"full","description":" Created Team"}] ,"attributes":[{"type":{"type":"struct","childType":"Team"},"id":1,"name":"createdTeam"} +]}, +"doc":[ +"Creation of a Team",{"type":"reference","argument":"title","category":"full","description":"Title of a team"}],"attributes":[ +{"type":"string","id":1,"name":"title"} +]}},{"type":"rpc","content":{ +"name":"InviteToTeam", +"header":2568, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Inviting people to team",{"type":"reference","argument":"user","category":"full","description":"Dest user"},{"type":"reference","argument":"destTeam","category":"full","description":"Dest team"}],"attributes":[ +{"type":{"type":"struct","childType":"UserOutPeer"},"id":1,"name":"user"} +,{"type":{"type":"struct","childType":"OutTeam"},"id":3,"name":"destTeam"} +]}}]}, { + "title": "Integrations", + "package": "integrations", + "doc": [ + "Package contains methods for providing integration" + ], + "items": [ +{"type":"response","content":{ +"name":"IntegrationToken", +"header":183, +"doc":[ +"Group token response",{"type":"reference","argument":"token","category":"danger","description":" current group token"},{"type":"reference","argument":"url","category":"danger","description":" current group url"}],"attributes":[ +{"type":"string","id":1,"name":"token"} +,{"type":"string","id":2,"name":"url"} +]}},{"type":"rpc","content":{ +"name":"GetIntegrationToken", +"header":182, +"response":{"type":"reference","name":"IntegrationToken"}, +"doc":[ +"Getting current group token",{"type":"reference","argument":"groupPeer","category":"full","description":"Peer"}],"attributes":[ +{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"groupPeer"} +]}},{"type":"rpc","content":{ +"name":"RevokeIntegrationToken", +"header":184, +"response":{"type":"reference","name":"IntegrationToken"}, +"doc":[ +"Revoke group token",{"type":"reference","argument":"groupPeer","category":"full","description":"Peer"}],"attributes":[ +{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"groupPeer"} +]}}]}, { + "title": "Typing and Online", + "package": "weak", "items": [ { - "type": "update_box", - "content": { - "name": "SeqUpdate", - "header": 13, - "doc": [ - "Sequence update", - { - "type": "reference", - "argument": "seq", - "category": "full", - "description": " Sequence number of update" - }, - { - "type": "reference", - "argument": "state", - "category": "compact", - "description": " Sequece state of update" - }, - { - "type": "reference", - "argument": "updateHeader", - "category": "full", - "description": " header of update" - }, - { - "type": "reference", - "argument": "update", - "category": "compact", - "description": " The update" - } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "seq" - }, - { - "type": { - "type": "alias", - "childType": "seq_state" - }, - "id": 2, - "name": "state" - }, - { - "type": "int32", - "id": 3, - "name": "updateHeader" - }, - { - "type": "bytes", - "id": 4, - "name": "update" - } - ] - } - }, - { - "type": "update_box", - "content": { - "name": "FatSeqUpdate", - "header": 73, - "doc": [ - "Fat sequence update with additional data", - { - "type": "reference", - "argument": "seq", - "category": "full", - "description": " Sequence number of update" - }, - { - "type": "reference", - "argument": "state", - "category": "compact", - "description": " Sequence state of update" - }, - { - "type": "reference", - "argument": "updateHeader", - "category": "full", - "description": " header of update" - }, - { - "type": "reference", - "argument": "update", - "category": "compact", - "description": " The update" - }, - { - "type": "reference", - "argument": "users", - "category": "compact", - "description": " Users that are referenced in update" - }, - { - "type": "reference", - "argument": "groups", - "category": "compact", - "description": " Groups that are referenced in update" - } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "seq" - }, - { - "type": { - "type": "alias", - "childType": "seq_state" - }, - "id": 2, - "name": "state" - }, - { - "type": "int32", - "id": 3, - "name": "updateHeader" - }, - { - "type": "bytes", - "id": 4, - "name": "update" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "User" - } - }, - "id": 5, - "name": "users" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Group" - } - }, - "id": 6, - "name": "groups" - } - ] - } - }, - { - "type": "update_box", + "type": "enum", "content": { - "name": "WeakUpdate", - "header": 26, - "doc": [ - "Out of sequence update (for typing and online statuses)", - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " Date of update" - }, - { - "type": "reference", - "argument": "updateHeader", - "category": "full", - "description": " Header of update" - }, - { - "type": "reference", - "argument": "update", - "category": "compact", - "description": " The update" - } - ], - "attributes": [ - { - "type": "int64", - "id": 1, - "name": "date" - }, - { - "type": "int32", - "id": 2, - "name": "updateHeader" - }, + "name": "TypingType", + "values": [ { - "type": "bytes", - "id": 3, - "name": "update" + "name": "Text", + "id": 0 } - ] - } - }, - { - "type": "update_box", + ] + } + },{"type":"rpc","content":{ +"name":"Typing", +"header":27, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Sending typing notification",{"type":"reference","argument":"peer","category":"full","description":"Destination peer"},{"type":"reference","argument":"typingType","category":"full","description":"typing type."}],"attributes":[ +{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"} +,{"type":{"type":"enum","childType":"TypingType"},"id":3,"name":"typingType"} +]}},{"type":"rpc","content":{ +"name":"StopTyping", +"header":30, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Stop typing",{"type":"reference","argument":"peer","category":"full","description":"Destination peer"},{"type":"reference","argument":"typingType","category":"full","description":"typing type"}],"attributes":[ +{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"} +,{"type":{"type":"enum","childType":"TypingType"},"id":2,"name":"typingType"} +]}}, { + "type": "enum", "content": { - "name": "WeakFatUpdate", - "header": 2673, - "doc": [ - "Fat Weak Update", - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " Date of update" - }, + "name": "DeviceType", + "values": [ { - "type": "reference", - "argument": "updateHeader", - "category": "full", - "description": " Header of update" + "name": "GENERIC", + "id": 1 }, { - "type": "reference", - "argument": "update", - "category": "full", - "description": " The update" + "name": "PC", + "id": 2 }, { - "type": "reference", - "argument": "users", - "category": "full", - "description": " Users that are referenced in update" + "name": "MOBILE", + "id": 3 }, { - "type": "reference", - "argument": "groups", - "category": "full", - "description": " Groups that are referenced in update" - } - ], - "attributes": [ - { - "type": "int64", - "id": 1, - "name": "date" + "name": "TABLET", + "id": 4 }, { - "type": "int32", - "id": 2, - "name": "updateHeader" + "name": "WATCH", + "id": 5 }, { - "type": "bytes", - "id": 3, - "name": "update" + "name": "MIRROR", + "id": 6 }, { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "User" - } - }, - "id": 4, - "name": "users" + "name": "CAR", + "id": 7 }, { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Group" - } - }, - "id": 5, - "name": "groups" + "name": "TABLE", + "id": 8 } - ] - } - }, - { - "type": "update_box", - "content": { - "name": "SeqUpdateTooLong", - "header": 25, - "doc": [ - "Notification about requiring performing manual GetDifference" - ], - "attributes": [] - } - }, - { - "type": "struct", + ] + } + },{"type":"rpc","content":{ +"name":"SetOnline", +"header":29, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Sending online state",{"type":"reference","argument":"isOnline","category":"full","description":"is user online"},{"type":"reference","argument":"timeout","category":"full","description":"timeout of online state in milliseconds"},{"type":"reference","argument":"deviceType","category":"full","description":"Optional device type"},{"type":"reference","argument":"deviceCategory","category":"full","description":"Optional device category, for example android or ios"}],"attributes":[ +{"type":"bool","id":1,"name":"isOnline"} +,{"type":{"type":"alias","childType":"msec"},"id":2,"name":"timeout"} +,{"type":{"type":"opt","childType":{"type":"enum","childType":"DeviceType"}},"id":3,"name":"deviceType"} +,{"type":{"type":"opt","childType":"string"},"id":4,"name":"deviceCategory"} +]}},{"type":"update","content":{ +"name":"PauseNotifications", +"header":166, +"doc":[ +"Update about pausing notifications",{"type":"reference","argument":"timeout","category":"full","description":" Timeout for notifications resume"}],"attributes":[ +{"type":{"type":"alias","childType":"sec"},"id":1,"name":"timeout"} +]}},{"type":"update","content":{ +"name":"RestoreNotifications", +"header":167, +"doc":[ +"Update about restoring notifications"],"attributes":[ +]}},{"type":"rpc","content":{ +"name":"PauseNotifications", +"header":2641, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Pause notifications",{"type":"reference","argument":"timeout","category":"hidden","description":"Timeout of pause"}],"attributes":[ +{"type":{"type":"alias","childType":"sec"},"id":1,"name":"timeout"} +]}},{"type":"rpc","content":{ +"name":"RestoreNotifications", +"header":2642, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Restoring notifications"],"attributes":[ +]}},{"type":"empty"},{"type":"update","content":{ +"name":"Typing", +"header":6, +"doc":[ +"Update about user's typing",{"type":"reference","argument":"peer","category":"full","description":" Conversation peer"},{"type":"reference","argument":"uid","category":"full","description":" User's id"},{"type":"reference","argument":"typingType","category":"full","description":" Type of typing"}],"attributes":[ +{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"} +,{"type":{"type":"alias","childType":"userId"},"id":2,"name":"uid"} +,{"type":{"type":"enum","childType":"TypingType"},"id":3,"name":"typingType"} +]}},{"type":"update","content":{ +"name":"TypingStop", +"header":81, +"doc":[ +"Update about user's typing stop",{"type":"reference","argument":"peer","category":"full","description":" Conversation peer"},{"type":"reference","argument":"uid","category":"full","description":" User's id"},{"type":"reference","argument":"typingType","category":"hidden","description":" Type of typing"}],"attributes":[ +{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"} +,{"type":{"type":"alias","childType":"userId"},"id":2,"name":"uid"} +,{"type":{"type":"enum","childType":"TypingType"},"id":3,"name":"typingType"} +]}},{"type":"update","content":{ +"name":"UserOnline", +"header":7, +"doc":[ +"Update about user became online",{"type":"reference","argument":"uid","category":"full","description":" User's Id"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":{"type":"opt","childType":{"type":"enum","childType":"DeviceType"}},"id":2,"name":"deviceType"} +,{"type":{"type":"opt","childType":"string"},"id":3,"name":"deviceCategory"} +]}},{"type":"update","content":{ +"name":"UserOffline", +"header":8, +"doc":[ +"Update about user became offline",{"type":"reference","argument":"uid","category":"full","description":" User's id"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":{"type":"opt","childType":{"type":"enum","childType":"DeviceType"}},"id":2,"name":"deviceType"} +,{"type":{"type":"opt","childType":"string"},"id":3,"name":"deviceCategory"} +]}},{"type":"update","content":{ +"name":"UserLastSeen", +"header":9, +"doc":[ +"Update about user's last seen state",{"type":"reference","argument":"uid","category":"full","description":" User's id"},{"type":"reference","argument":"date","category":"full","description":" Last seen time"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":{"type":"alias","childType":"date"},"id":2,"name":"date"} +,{"type":{"type":"opt","childType":{"type":"enum","childType":"DeviceType"}},"id":3,"name":"deviceType"} +,{"type":{"type":"opt","childType":"string"},"id":4,"name":"deviceCategory"} +]}},{"type":"update","content":{ +"name":"GroupOnline", +"header":33, +"doc":[ +"Update about group online change",{"type":"reference","argument":"groupId","category":"full","description":" Group id"},{"type":"reference","argument":"count","category":"full","description":" current online user's count"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":"int32","id":2,"name":"count"} +]}}]}, { + "title": "Media and Files", + "package": "files", + "items": [ + { + "type":"struct", + "content": { + "name":"FileLocation", +"doc":[ +"Location of file on server",{"type":"reference","argument":"fileId","category":"full","description":" Unique Id of file"},{"type":"reference","argument":"accessHash","category":"danger","description":" Access hash of file"}],"expandable":"true","attributes":[ +{"type":"int64","id":1,"name":"fileId"} +,{"type":"int64","id":2,"name":"accessHash"} +]}}, { + "type":"struct", + "content": { + "name":"ImageLocation", +"doc":[ +"Image location",{"type":"reference","argument":"fileLocation","category":"full","description":" Location of file"},{"type":"reference","argument":"width","category":"full","description":" Width of avatar image"},{"type":"reference","argument":"height","category":"full","description":" Height of avatar image"},{"type":"reference","argument":"fileSize","category":"full","description":" Size of file"}],"expandable":"true","attributes":[ +{"type":{"type":"struct","childType":"FileLocation"},"id":1,"name":"fileLocation"} +,{"type":"int32","id":2,"name":"width"} +,{"type":"int32","id":3,"name":"height"} +,{"type":"int32","id":4,"name":"fileSize"} +]}}, { + "type":"struct", + "content": { + "name":"AvatarImage", +"doc":[ +"Avatar Image",{"type":"reference","argument":"fileLocation","category":"full","description":" Location of file"},{"type":"reference","argument":"width","category":"full","description":" Width of avatar image"},{"type":"reference","argument":"height","category":"full","description":" Height of avatar image"},{"type":"reference","argument":"fileSize","category":"full","description":" Size of file"}],"expandable":"true","attributes":[ +{"type":{"type":"struct","childType":"FileLocation"},"id":1,"name":"fileLocation"} +,{"type":"int32","id":2,"name":"width"} +,{"type":"int32","id":3,"name":"height"} +,{"type":"int32","id":4,"name":"fileSize"} +]}}, { + "type":"struct", + "content": { + "name":"Avatar", +"doc":[ +"Avatar of User or Group",{"type":"reference","argument":"smallImage","category":"compact","description":" Optional small image of avatar box in 100x100"},{"type":"reference","argument":"largeImage","category":"compact","description":" Optional large image of avatar box in 200x200"},{"type":"reference","argument":"fullImage","category":"compact","description":" Optional full screen image of avatar"}],"expandable":"true","attributes":[ +{"type":{"type":"opt","childType":{"type":"struct","childType":"AvatarImage"}},"id":1,"name":"smallImage"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"AvatarImage"}},"id":2,"name":"largeImage"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"AvatarImage"}},"id":3,"name":"fullImage"} +]}}, { + "type":"struct", + "content": { + "name":"FastThumb", +"doc":[ +"Fast thumb of media messages. Less than 90x90 and compressed by JPEG with low quality",{"type":"reference","argument":"w","category":"full","description":" Width of thumb"},{"type":"reference","argument":"h","category":"full","description":" Height of thump"},{"type":"reference","argument":"thumb","category":"compact","description":" compressed image data"}],"expandable":"true","attributes":[ +{"type":"int32","id":1,"name":"w"} +,{"type":"int32","id":2,"name":"h"} +,{"type":"bytes","id":3,"name":"thumb"} +]}}, { + "type": "enum", "content": { - "name": "UpdateContainer", - "doc": [ - "Update container", + "name": "Colors", + "values": [ { - "type": "reference", - "argument": "updateHeader", - "category": "full", - "description": " Header of update" + "name": "red", + "id": 1 }, { - "type": "reference", - "argument": "update", - "category": "compact", - "description": " The updatre" - } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "updateHeader" + "name": "yellow", + "id": 2 }, { - "type": "bytes", - "id": 2, - "name": "update" + "name": "green", + "id": 3 } - ] - } - }, - { - "type": "update_box", + ] + } + },{"type":"trait","content":{ +"isContainer":"true","name":"Color","attributes":[ +]}}, { + "type":"struct", + "content": { + "name":"RgbColor", +"doc":[ +"RGB Color",{"type":"reference","argument":"rgb","category":"full","description":" RGB color value"}],"trait":{"name":"Color","key":1},"expandable":"true","attributes":[ +{"type":"int32","id":1,"name":"rgb"} +]}}, { + "type":"struct", + "content": { + "name":"PredefinedColor", +"doc":[ +"Predefined color",{"type":"reference","argument":"color","category":"hidden","description":" Predefined color value"}],"trait":{"name":"Color","key":2},"expandable":"true","attributes":[ +{"type":{"type":"enum","childType":"Colors"},"id":1,"name":"color"} +]}},{"type":"empty"}, { + "type":"struct", + "content": { + "name":"HTTPHeader", +"doc":[ +"HTTP Header record",{"type":"reference","argument":"key","category":"full","description":" HTTP Header name"},{"type":"reference","argument":"value","category":"full","description":" HTTP Header value"}],"attributes":[ +{"type":"string","id":1,"name":"key"} +,{"type":"string","id":2,"name":"value"} +]}}, { + "type":"struct", + "content": { + "name":"FileUrlDescription", +"doc":[ +"File url description",{"type":"reference","argument":"fileId","category":"full","description":" File id of url"},{"type":"reference","argument":"url","category":"full","description":" Url for downloading"},{"type":"reference","argument":"timeout","category":"full","description":" Timeout of url"},{"type":"reference","argument":"unsignedUrl","category":"hidden","description":" Unsigned URL (used to honor web caches)"},{"type":"reference","argument":"unsignedUrlHeaders","category":"hidden","description":" Headers that is required to download files with unsigned url"}],"attributes":[ +{"type":"int64","id":1,"name":"fileId"} +,{"type":"string","id":2,"name":"url"} +,{"type":{"type":"alias","childType":"sec"},"id":3,"name":"timeout"} +,{"type":{"type":"opt","childType":"string"},"id":4,"name":"unsignedUrl"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"HTTPHeader"}},"id":5,"name":"unsignedUrlHeaders"} +]}},{"type":"rpc","content":{ +"name":"GetFileUrl", +"header":77, +"response":{"type":"anonymous","header":78, "doc":[ +{"type":"reference","argument":"url","category":"full","description":" Url for downloading"},{"type":"reference","argument":"timeout","category":"full","description":" Timeout of url"},{"type":"reference","argument":"unsignedUrl","category":"full","description":" Unsigned URL (used to honor web caches)"},{"type":"reference","argument":"unsignedUrlHeaders","category":"full","description":" Headers that is required to download files with unsigned url"}] ,"attributes":[{"type":"string","id":1,"name":"url"} +,{"type":{"type":"alias","childType":"sec"},"id":2,"name":"timeout"} +,{"type":{"type":"opt","childType":"string"},"id":3,"name":"unsignedUrl"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"HTTPHeader"}},"id":4,"name":"unsignedUrlHeaders"} +]}, +"doc":[ +"Requesting file URL for downloading",{"type":"reference","argument":"file","category":"full","description":"file's location"}],"attributes":[ +{"type":{"type":"struct","childType":"FileLocation"},"id":1,"name":"file"} +]}},{"type":"rpc","content":{ +"name":"GetFileUrls", +"header":2573, +"response":{"type":"anonymous","header":2574, "doc":[ +{"type":"reference","argument":"fileUrls","category":"full","description":" File urls"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"FileUrlDescription"}},"id":1,"name":"fileUrls"} +]}, +"doc":[ +"Requesting multiple fle URL for downloading",{"type":"reference","argument":"files","category":"hidden","description":"File locations to load urls"}],"attributes":[ +{"type":{"type":"list","childType":{"type":"struct","childType":"FileLocation"}},"id":1,"name":"files"} +]}},{"type":"rpc","content":{ +"name":"GetFileUrlBuilder", +"header":2579, +"response":{"type":"anonymous","header":2580, "doc":[ +{"type":"reference","argument":"baseUrl","category":"full","description":" Base Url for files"},{"type":"reference","argument":"algo","category":"full","description":" Signature algorithm"},{"type":"reference","argument":"seed","category":"full","description":" Public-visible seed of signature"},{"type":"reference","argument":"signatureSecret","category":"full","description":" Signature Secret"},{"type":"reference","argument":"timeout","category":"full","description":" Timeout of url builder"}] ,"attributes":[{"type":"string","id":1,"name":"baseUrl"} +,{"type":"string","id":2,"name":"algo"} +,{"type":"string","id":5,"name":"seed"} +,{"type":"bytes","id":3,"name":"signatureSecret"} +,{"type":{"type":"alias","childType":"sec"},"id":4,"name":"timeout"} +]}, +"doc":[ +"Get File URL Builder that allows to build file urls from client side",{"type":"reference","argument":"supportedSignatureAlgorithms","category":"hidden","description":"Supported signature algorithms by client"}],"attributes":[ +{"type":{"type":"list","childType":"string"},"id":1,"name":"supportedSignatureAlgorithms"} +]}},{"type":"rpc","content":{ +"name":"GetFileUploadUrl", +"header":97, +"response":{"type":"anonymous","header":121, "doc":[ +{"type":"reference","argument":"url","category":"full","description":" Url for uploading"},{"type":"reference","argument":"uploadKey","category":"compact","description":" Upload key for upload"}] ,"attributes":[{"type":"string","id":1,"name":"url"} +,{"type":"bytes","id":2,"name":"uploadKey"} +]}, +"doc":[ +"Requesting pload url",{"type":"reference","argument":"expectedSize","category":"full","description":"Expected size of uploading file. May be inaccurate. Used for size allocation optimizations."}],"attributes":[ +{"type":"int32","id":1,"name":"expectedSize"} +]}},{"type":"rpc","content":{ +"name":"CommitFileUpload", +"header":122, +"response":{"type":"anonymous","header":138, "doc":[ +{"type":"reference","argument":"uploadedFileLocation","category":"hidden","description":" Result file location"}] ,"attributes":[{"type":{"type":"struct","childType":"FileLocation"},"id":1,"name":"uploadedFileLocation"} +]}, +"doc":[ +"Comminting uploaded file to storage"],"attributes":[ +{"type":"bytes","id":1,"name":"uploadKey"} +,{"type":"string","id":2,"name":"fileName"} +]}},{"type":"rpc","content":{ +"name":"GetFileUploadPartUrl", +"header":142, +"response":{"type":"anonymous","header":141, "doc":[ +{"type":"reference","argument":"url","category":"full","description":" Upload file part url"}] ,"attributes":[{"type":"string","id":1,"name":"url"} +]}, +"doc":[ +"Upload file part",{"type":"reference","argument":"uploadKey","category":"compact","description":"Upload Key from requestFileUploadUrl"}],"attributes":[ +{"type":"int32","id":1,"name":"partNumber"} +,{"type":"int32","id":2,"name":"partSize"} +,{"type":"bytes","id":3,"name":"uploadKey"} +]}}]}, { + "title": "Features", + "package": "features", + "doc": [ + "Enable feature discovery. Currently available features:", + "* \"call\" - private audio calls" + ], + "items": [ +{"type":"rpc","content":{ +"name":"EnableFeature", +"header":2588, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Enabling feature on the device",{"type":"reference","argument":"featureName","category":"full","description":"Feature name"},{"type":"reference","argument":"args","category":"danger","description":"Optional arguments to a feature"}],"attributes":[ +{"type":"string","id":1,"name":"featureName"} +,{"type":{"type":"opt","childType":"bytes"},"id":2,"name":"args"} +]}},{"type":"rpc","content":{ +"name":"DisableFeature", +"header":2589, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Disabling feature on the device",{"type":"reference","argument":"featureName","category":"full","description":"Feature name"}],"attributes":[ +{"type":"string","id":1,"name":"featureName"} +]}},{"type":"rpc","content":{ +"name":"CheckFeatureEnabled", +"header":2590, +"response":{"type":"reference","name":"Bool"}, +"doc":[ +"Method for checking if feature is available to user"],"attributes":[ +{"type":{"type":"struct","childType":"UserOutPeer"},"id":1,"name":"userOutPeer"} +,{"type":"string","id":2,"name":"featureName"} +]}}]}, { + "title": "EventBus", + "package": "eventbus", + "items": [ +{"type":"rpc","content":{ +"name":"CreateNewEventBus", +"header":2665, +"response":{"type":"anonymous","header":2666, "doc":[ +"Created new Event Bus",{"type":"reference","argument":"id","category":"full","description":" Event Bus Id"},{"type":"reference","argument":"deviceId","category":"full","description":" Your Device Id"}] ,"attributes":[{"type":{"type":"alias","childType":"busId"},"id":1,"name":"id"} +,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"deviceId"} +]}, +"doc":[ +"Create new Event Bus",{"type":"reference","argument":"timeout","category":"full","description":"Optional timeout of Event Bus"},{"type":"reference","argument":"isOwned","category":"full","description":"Is Event Bus owned by creator"}],"attributes":[ +{"type":{"type":"opt","childType":{"type":"alias","childType":"msec"}},"id":1,"name":"timeout"} +,{"type":{"type":"opt","childType":"bool"},"id":2,"name":"isOwned"} +]}},{"type":"rpc","content":{ +"name":"JoinEventBus", +"header":2668, +"response":{"type":"anonymous","header":2669, "doc":[ +{"type":"reference","argument":"deviceId","category":"full","description":" Your Device Id"},{"type":"reference","argument":"rejoinToken","category":"full","description":" Token that can be used for rejoining event bus with same device id"}] ,"attributes":[{"type":{"type":"alias","childType":"randomId"},"id":1,"name":"deviceId"} +,{"type":{"type":"opt","childType":"bytes"},"id":2,"name":"rejoinToken"} +]}, +"doc":[ +"Joining Event Bus",{"type":"reference","argument":"id","category":"full","description":"Event Bus Id"},{"type":"reference","argument":"timeout","category":"full","description":"Join timeout"}],"attributes":[ +{"type":{"type":"alias","childType":"busId"},"id":1,"name":"id"} +,{"type":{"type":"opt","childType":{"type":"alias","childType":"msec"}},"id":2,"name":"timeout"} +]}},{"type":"rpc","content":{ +"name":"ReJoinEventBus", +"header":2675, +"response":{"type":"anonymous","header":2676, "doc":[ +{"type":"reference","argument":"deviceId","category":"hidden","description":" Your Device Id"}] ,"attributes":[{"type":{"type":"alias","childType":"randomId"},"id":1,"name":"deviceId"} +]}, +"doc":[ +"Rejoining to event bus after session was disposed",{"type":"reference","argument":"id","category":"full","description":"Event Bus Id"},{"type":"reference","argument":"rejoinToken","category":"full","description":"Rejoin Token"}],"attributes":[ +{"type":{"type":"alias","childType":"busId"},"id":1,"name":"id"} +,{"type":"bytes","id":2,"name":"rejoinToken"} +]}},{"type":"rpc","content":{ +"name":"KeepAliveEventBus", +"header":2670, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Keep Alive Event Bus",{"type":"reference","argument":"id","category":"full","description":"Event Bus Id"},{"type":"reference","argument":"timeout","category":"full","description":"Optional timeout for keep alive"}],"attributes":[ +{"type":{"type":"alias","childType":"busId"},"id":1,"name":"id"} +,{"type":{"type":"opt","childType":{"type":"alias","childType":"msec"}},"id":2,"name":"timeout"} +]}},{"type":"rpc","content":{ +"name":"DisposeEventBus", +"header":2667, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Dispose Event Bus",{"type":"reference","argument":"id","category":"full","description":"Event Bus Id"}],"attributes":[ +{"type":{"type":"alias","childType":"busId"},"id":1,"name":"id"} +]}},{"type":"rpc","content":{ +"name":"PostToEventBus", +"header":2671, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Event Bus Destination",{"type":"reference","argument":"id","category":"full","description":"Bus Id"},{"type":"reference","argument":"destinations","category":"full","description":"If Empty need to broadcase message to everyone"},{"type":"reference","argument":"message","category":"hidden","description":"Message"}],"attributes":[ +{"type":{"type":"alias","childType":"busId"},"id":1,"name":"id"} +,{"type":{"type":"list","childType":{"type":"alias","childType":"randomId"}},"id":2,"name":"destinations"} +,{"type":"bytes","id":3,"name":"message"} +]}},{"type":"update","content":{ +"name":"EventBusDeviceConnected", +"header":2561, +"doc":[ +"Update about pubsub device connected",{"type":"reference","argument":"id","category":"full","description":" ID of Event Bus"},{"type":"reference","argument":"userId","category":"full","description":" Joined User Id"},{"type":"reference","argument":"deviceId","category":"full","description":" Joined Device Unique Id"}],"attributes":[ +{"type":{"type":"alias","childType":"busId"},"id":1,"name":"id"} +,{"type":{"type":"opt","childType":{"type":"alias","childType":"userId"}},"id":2,"name":"userId"} +,{"type":{"type":"alias","childType":"randomId"},"id":3,"name":"deviceId"} +]}},{"type":"update","content":{ +"name":"EventBusDeviceDisconnected", +"header":2563, +"doc":[ +"Update about device disconnected",{"type":"reference","argument":"id","category":"full","description":" ID of Event Bus"},{"type":"reference","argument":"userId","category":"full","description":" Joined User Id"},{"type":"reference","argument":"deviceId","category":"full","description":" Disconnected Device unique Id"}],"attributes":[ +{"type":{"type":"alias","childType":"busId"},"id":1,"name":"id"} +,{"type":{"type":"opt","childType":{"type":"alias","childType":"userId"}},"id":2,"name":"userId"} +,{"type":{"type":"alias","childType":"randomId"},"id":3,"name":"deviceId"} +]}},{"type":"update","content":{ +"name":"EventBusMessage", +"header":2562, +"doc":[ +"Event Bus Message",{"type":"reference","argument":"id","category":"full","description":" Event Bus Id"},{"type":"reference","argument":"senderId","category":"full","description":" Sender of message"},{"type":"reference","argument":"senderDeviceId","category":"full","description":" Device Id of sender"},{"type":"reference","argument":"message","category":"hidden","description":" Message"}],"attributes":[ +{"type":{"type":"alias","childType":"busId"},"id":1,"name":"id"} +,{"type":{"type":"opt","childType":{"type":"alias","childType":"userId"}},"id":2,"name":"senderId"} +,{"type":{"type":"opt","childType":{"type":"alias","childType":"randomId"}},"id":3,"name":"senderDeviceId"} +,{"type":"bytes","id":4,"name":"message"} +]}},{"type":"update","content":{ +"name":"EventBusDisposed", +"header":2564, +"doc":[ +"Event Bus dispose",{"type":"reference","argument":"id","category":"full","description":" Event Bus Id"}],"attributes":[ +{"type":{"type":"alias","childType":"busId"},"id":1,"name":"id"} +]}}]}, { + "title": "Values", + "package": "values", + "doc": [ + "Synced Values" + ], + "items": [ + { + "type":"struct", + "content": { + "name":"SyncedValue", +"doc":[ +"Synced Value container",{"type":"reference","argument":"id","category":"full","description":" Unique Id of a value. Unique in the scope of one named value."},{"type":"reference","argument":"value","category":"full","description":" Optional value"}],"attributes":[ +{"type":{"type":"alias","childType":"randomId"},"id":1,"name":"id"} +,{"type":{"type":"opt","childType":"bytes"},"id":2,"name":"value"} +]}},{"type":"rpc","content":{ +"name":"LoadSyncedSet", +"header":2679, +"response":{"type":"anonymous","header":2680, "doc":[ +{"type":"reference","argument":"values","category":"full","description":" Current set values"},{"type":"reference","argument":"isStrong","category":"full","description":" Is this value strong and stored in sequence. By default is true."}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"SyncedValue"}},"id":1,"name":"values"} +,{"type":{"type":"opt","childType":"bool"},"id":2,"name":"isStrong"} +]}, +"doc":[ +"Loading synced set",{"type":"reference","argument":"setName","category":"hidden","description":"readable name of the set"}],"attributes":[ +{"type":"string","id":1,"name":"setName"} +]}},{"type":"update","content":{ +"name":"SynedSetUpdated", +"header":72, +"doc":[ +"Update about synced set update",{"type":"reference","argument":"setName","category":"full","description":" Set Name"},{"type":"reference","argument":"syncedValues","category":"full","description":" Current set values"},{"type":"reference","argument":"isStrong","category":"full","description":" Is this value strong and need to be stored on disk"}],"attributes":[ +{"type":"string","id":1,"name":"setName"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"SyncedValue"}},"id":2,"name":"syncedValues"} +,{"type":{"type":"opt","childType":"bool"},"id":3,"name":"isStrong"} +]}},{"type":"update","content":{ +"name":"SyncedSetAddedOrUpdated", +"header":73, +"doc":[ +"Update about added or updated values in the synced set",{"type":"reference","argument":"setName","category":"full","description":" Set Name"},{"type":"reference","argument":"addedOrUpdatedValues","category":"hidden","description":" Added or updated values"}],"attributes":[ +{"type":"string","id":1,"name":"setName"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"SyncedValue"}},"id":2,"name":"addedOrUpdatedValues"} +]}},{"type":"update","content":{ +"name":"SyncedSetRemoved", +"header":74, +"doc":[ +"Update about removed items from synced set",{"type":"reference","argument":"setName","category":"full","description":" Set Name"},{"type":"reference","argument":"removedItems","category":"full","description":" Removed Items from the set"}],"attributes":[ +{"type":"string","id":1,"name":"setName"} +,{"type":{"type":"list","childType":{"type":"alias","childType":"randomId"}},"id":2,"name":"removedItems"} +]}}]}, { + "title": "WebRTC", + "package": "webrtc", + "doc": [ + "WebRTC package that enables support to audio and video calls" + ], + "items": [ +{"type":"update","content":{ +"name":"IncomingCall", +"header":52, +"doc":[ +"Update about incoming call (Sent every 10 seconds)",{"type":"reference","argument":"callId","category":"full","description":" Call Id"},{"type":"reference","argument":"attemptIndex","category":"full","description":" Optional attempt Index"}],"attributes":[ +{"type":"int64","id":1,"name":"callId"} +,{"type":{"type":"opt","childType":"int32"},"id":2,"name":"attemptIndex"} +]}},{"type":"update","content":{ +"name":"CallHandled", +"header":53, +"doc":[ +"Update about incoming call handled",{"type":"reference","argument":"callId","category":"full","description":" Call Id"},{"type":"reference","argument":"attemptIndex","category":"full","description":" Optional attempt Index"}],"attributes":[ +{"type":"int64","id":1,"name":"callId"} +,{"type":{"type":"opt","childType":"int32"},"id":2,"name":"attemptIndex"} +]}},{"type":"update","content":{ +"name":"CallUpgraded", +"header":56, +"doc":[ +"Update about call moved to other peer",{"type":"reference","argument":"callId","category":"full","description":" Call Id"},{"type":"reference","argument":"groupId","category":"full","description":" Upgraded group id"}],"attributes":[ +{"type":"int64","id":1,"name":"callId"} +,{"type":{"type":"alias","childType":"groupId"},"id":2,"name":"groupId"} +]}},{"type":"rpc","content":{ +"name":"GetCallInfo", +"header":2600, +"response":{"type":"anonymous","header":2606, "doc":[ +{"type":"reference","argument":"peer","category":"full","description":" Destination peer"},{"type":"reference","argument":"groups","category":"compact","description":" Groups"},{"type":"reference","argument":"users","category":"compact","description":" Users"},{"type":"reference","argument":"eventBusId","category":"full","description":" Event Bus Id"},{"type":"reference","argument":"isAudioOnlyCall","category":"full","description":" Is Audio Only Call. Default is true"},{"type":"reference","argument":"isVideoOnlyCall","category":"full","description":" Is Video Only Call. Default is false."},{"type":"reference","argument":"isVideoPreferred","category":"full","description":" Is Video preferred"}] ,"attributes":[{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"GroupOutPeer"}},"id":2,"name":"groups"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":3,"name":"users"} +,{"type":{"type":"alias","childType":"busId"},"id":4,"name":"eventBusId"} +,{"type":{"type":"opt","childType":"bool"},"id":5,"name":"isAudioOnlyCall"} +,{"type":{"type":"opt","childType":"bool"},"id":6,"name":"isVideoOnlyCall"} +,{"type":{"type":"opt","childType":"bool"},"id":7,"name":"isVideoPreferred"} +]}, +"doc":[ +"Getting Call Information",{"type":"reference","argument":"callId","category":"full","description":"Call Id"}],"attributes":[ +{"type":"int64","id":1,"name":"callId"} +]}},{"type":"rpc","content":{ +"name":"DoCall", +"header":2597, +"response":{"type":"anonymous","header":2598, "doc":[ +{"type":"reference","argument":"callId","category":"full","description":" Call Id"},{"type":"reference","argument":"eventBusId","category":"full","description":" Call Event Bus Id"}] ,"attributes":[{"type":"int64","id":1,"name":"callId"} +,{"type":{"type":"alias","childType":"busId"},"id":2,"name":"eventBusId"} +,{"type":{"type":"alias","childType":"randomId"},"id":3,"name":"deviceId"} +]}, +"doc":[ +"Do Call. Right after a call client need to start sending CallInProgress",{"type":"reference","argument":"peer","category":"full","description":"destination peer"},{"type":"reference","argument":"timeout","category":"full","description":"Initial timeout"},{"type":"reference","argument":"isAudioOnlyCall","category":"full","description":"Is Audio only call. Default is true."},{"type":"reference","argument":"isVideoOnlyCall","category":"full","description":"Is Video Only call. Default is false."},{"type":"reference","argument":"isVideoPreferred","category":"full","description":"Is Video preferred"}],"attributes":[ +{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"} +,{"type":{"type":"opt","childType":{"type":"alias","childType":"msec"}},"id":2,"name":"timeout"} +,{"type":{"type":"opt","childType":"bool"},"id":3,"name":"isAudioOnlyCall"} +,{"type":{"type":"opt","childType":"bool"},"id":4,"name":"isVideoOnlyCall"} +,{"type":{"type":"opt","childType":"bool"},"id":6,"name":"isVideoPreferred"} +]}},{"type":"rpc","content":{ +"name":"UpgradeCall", +"header":2677, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Method for upgrading a call from private call to group call",{"type":"reference","argument":"callId","category":"full","description":"Call Id"},{"type":"reference","argument":"peer","category":"full","description":"Destination peer for upgrading"}],"attributes":[ +{"type":"int64","id":1,"name":"callId"} +,{"type":{"type":"struct","childType":"GroupOutPeer"},"id":2,"name":"peer"} +]}},{"type":"rpc","content":{ +"name":"DoCallAgain", +"header":2678, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Call again to user",{"type":"reference","argument":"callId","category":"full","description":"Call Id"},{"type":"reference","argument":"user","category":"full","description":"User to call again"}],"attributes":[ +{"type":"int64","id":1,"name":"callId"} +,{"type":{"type":"struct","childType":"UserOutPeer"},"id":2,"name":"user"} +]}},{"type":"rpc","content":{ +"name":"JoinCall", +"header":2683, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Joining Call",{"type":"reference","argument":"callId","category":"full","description":"Call Id"}],"attributes":[ +{"type":"int64","id":1,"name":"callId"} +]}},{"type":"rpc","content":{ +"name":"RejectCall", +"header":2684, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Rejecting Call",{"type":"reference","argument":"callId","category":"full","description":"Call Id"}],"attributes":[ +{"type":"int64","id":1,"name":"callId"} +]}},{"type":"rpc","content":{ +"name":"OptimizeSDP", +"header":2685, +"response":{"type":"anonymous","header":2686, "doc":[ +{"type":"reference","argument":"optimizedSDP","category":"hidden","description":" Optimized version of SDP"}] ,"attributes":[{"type":"string","id":1,"name":"optimizedSDP"} +]}, +"doc":[ +"Optimizing SDP",{"type":"reference","argument":"type","category":"full","description":"Type of SDP (offer or answer)"},{"type":"reference","argument":"sdp","category":"full","description":"SDP value"},{"type":"reference","argument":"ownSettings","category":"full","description":"Own Settings"},{"type":"reference","argument":"theirSettings","category":"full","description":"Their Settings"}],"attributes":[ +{"type":"string","id":1,"name":"type"} +,{"type":"string","id":2,"name":"sdp"} +,{"type":{"type":"struct","childType":"PeerSettings"},"id":3,"name":"ownSettings"} +,{"type":{"type":"struct","childType":"PeerSettings"},"id":4,"name":"theirSettings"} +]}}, { + "type":"struct", + "content": { + "name":"ICEServer", +"doc":[ +"ICE Server description",{"type":"reference","argument":"url","category":"full","description":" Url to server"},{"type":"reference","argument":"username","category":"full","description":" Optional username"},{"type":"reference","argument":"credential","category":"danger","description":" Optional credential"}],"attributes":[ +{"type":"string","id":1,"name":"url"} +,{"type":{"type":"opt","childType":"string"},"id":2,"name":"username"} +,{"type":{"type":"opt","childType":"string"},"id":3,"name":"credential"} +]}},{"type":"trait","content":{ +"isContainer":"true","name":"WebRTCSignaling","attributes":[ +]}},{"type":"comment","content":"Advertising"}, { + "type":"struct", + "content": { + "name":"AdvertiseSelf", +"doc":[ +"Advertizing self to a master mode",{"type":"reference","argument":"peerSettings","category":"full","description":" Optional peer Settings"}],"trait":{"name":"WebRTCSignaling","key":21},"attributes":[ +{"type":{"type":"opt","childType":{"type":"struct","childType":"PeerSettings"}},"id":1,"name":"peerSettings"} +]}}, { + "type":"struct", + "content": { + "name":"AdvertiseMaster", +"doc":[ +"Sent by master"],"trait":{"name":"WebRTCSignaling","key":26},"attributes":[ +{"type":{"type":"list","childType":{"type":"struct","childType":"ICEServer"}},"id":1,"name":"server"} +]}},{"type":"comment","content":"Web RTC signaling"}, { + "type":"struct", + "content": { + "name":"Candidate", +"doc":[ +"Candidate signal",{"type":"reference","argument":"sessionId","category":"full","description":" Session Id of candidate"},{"type":"reference","argument":"index","category":"full","description":" Index of candidate"},{"type":"reference","argument":"id","category":"full","description":" Id of candidate"},{"type":"reference","argument":"sdp","category":"full","description":" SDP of candidate"}],"trait":{"name":"WebRTCSignaling","key":3},"attributes":[ +{"type":{"type":"alias","childType":"randomId"},"id":1,"name":"sessionId"} +,{"type":"int32","id":2,"name":"index"} +,{"type":"string","id":3,"name":"id"} +,{"type":"string","id":4,"name":"sdp"} +]}}, { + "type":"struct", + "content": { + "name":"Offer", +"doc":[ +"Offer signal",{"type":"reference","argument":"sessionId","category":"full","description":" Session Id of offer"},{"type":"reference","argument":"sdp","category":"full","description":" Offer SDP"},{"type":"reference","argument":"ownPeerSettings","category":"full","description":" Optional Own Peer settings"}],"trait":{"name":"WebRTCSignaling","key":4},"attributes":[ +{"type":{"type":"alias","childType":"randomId"},"id":1,"name":"sessionId"} +,{"type":"string","id":2,"name":"sdp"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"PeerSettings"}},"id":3,"name":"ownPeerSettings"} +]}}, { + "type":"struct", + "content": { + "name":"Answer", +"doc":[ +"Answer signal",{"type":"reference","argument":"sessionId","category":"full","description":" Session Id of answer"},{"type":"reference","argument":"sdp","category":"full","description":" Answer SDP"}],"trait":{"name":"WebRTCSignaling","key":5},"attributes":[ +{"type":{"type":"alias","childType":"randomId"},"id":1,"name":"sessionId"} +,{"type":"string","id":2,"name":"sdp"} +]}}, { + "type":"struct", + "content": { + "name":"MediaStreamsUpdated", +"doc":[ +"Update about media stream settings updated. Can be sent before offer/answer.",{"type":"reference","argument":"isAudioEnabled","category":"full","description":" Is Audio Enabled in current connection. True by default."},{"type":"reference","argument":"isVideoEnabled","category":"full","description":" Is Video Enabled in current connection. False by default."}],"trait":{"name":"WebRTCSignaling","key":28},"attributes":[ +{"type":{"type":"opt","childType":"bool"},"id":1,"name":"isAudioEnabled"} +,{"type":{"type":"opt","childType":"bool"},"id":2,"name":"isVideoEnabled"} +]}},{"type":"comment","content":"Call Controlling events"}, { + "type":"struct", + "content": { + "name":"NeedOffer", +"doc":[ +"Notification from master that offer is required",{"type":"reference","argument":"device","category":"full","description":" Destination Device Id"},{"type":"reference","argument":"sessionId","category":"full","description":" Session Id"},{"type":"reference","argument":"peerSettings","category":"full","description":" Optional peer settings"}],"trait":{"name":"WebRTCSignaling","key":8},"attributes":[ +{"type":{"type":"alias","childType":"randomId"},"id":1,"name":"device"} +,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"sessionId"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"PeerSettings"}},"id":3,"name":"peerSettings"} +]}}, { + "type":"struct", + "content": { + "name":"NegotinationSuccessful", +"doc":[ +"Notification about on negotiation is successful",{"type":"reference","argument":"device","category":"full","description":" Device Id"},{"type":"reference","argument":"sessionId","category":"full","description":" Session Id"}],"trait":{"name":"WebRTCSignaling","key":24},"attributes":[ +{"type":{"type":"alias","childType":"randomId"},"id":1,"name":"device"} +,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"sessionId"} +]}}, { + "type":"struct", + "content": { + "name":"EnableConnection", +"doc":[ +"Notification about enabling connection to peer",{"type":"reference","argument":"device","category":"full","description":" Device Id"},{"type":"reference","argument":"sessionId","category":"full","description":" Session Id"}],"trait":{"name":"WebRTCSignaling","key":22},"attributes":[ +{"type":{"type":"alias","childType":"randomId"},"id":1,"name":"device"} +,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"sessionId"} +]}}, { + "type":"struct", + "content": { + "name":"OnRenegotiationNeeded", +"doc":[ +"Need renegotiate session. For example when streams are changed.",{"type":"reference","argument":"device","category":"full","description":" Device Id"},{"type":"reference","argument":"sessionId","category":"full","description":" Session Id"}],"trait":{"name":"WebRTCSignaling","key":25},"attributes":[ +{"type":{"type":"alias","childType":"randomId"},"id":1,"name":"device"} +,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"sessionId"} +]}}, { + "type":"struct", + "content": { + "name":"CloseSession", +"doc":[ +"Close this session and be ready to",{"type":"reference","argument":"device","category":"hidden","description":" Device Id"},{"type":"reference","argument":"sessionId","category":"full","description":" Session Id for renegotiation"}],"trait":{"name":"WebRTCSignaling","key":6},"attributes":[ +{"type":{"type":"alias","childType":"randomId"},"id":1,"name":"device"} +,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"sessionId"} +]}}, { + "type":"struct", + "content": { + "name":"NeedDisconnect", +"doc":[ +"Notification about requirement about required disconnection from peer",{"type":"reference","argument":"device","category":"hidden","description":" Device Id"}],"trait":{"name":"WebRTCSignaling","key":20},"attributes":[ +{"type":{"type":"alias","childType":"randomId"},"id":1,"name":"device"} +]}}, { + "type":"struct", + "content": { + "name":"ActiveCall", +"doc":[ +"Active Calls. Used in broadcasting states of current calls.",{"type":"reference","argument":"callId","category":"full","description":" Call Id"},{"type":"reference","argument":"peer","category":"full","description":" Call's peer"},{"type":"reference","argument":"callMembers","category":"full","description":" Call Members"}],"attributes":[ +{"type":"int64","id":1,"name":"callId"} +,{"type":{"type":"struct","childType":"Peer"},"id":2,"name":"peer"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"CallMember"}},"id":3,"name":"callMembers"} +]}}, { + "type": "enum", "content": { - "name": "CombinedUpdate", - "header": 2625, - "doc": [ - "Combined update", - { - "type": "reference", - "argument": "seqStart", - "category": "full", - "description": " Sequence number start" - }, - { - "type": "reference", - "argument": "seqEnd", - "category": "full", - "description": " Sequence number end" - }, + "name": "CallMemberState", + "values": [ { - "type": "reference", - "argument": "state", - "category": "full", - "description": " Sequence state" + "name": "RINGING", + "id": 1 }, { - "type": "reference", - "argument": "users", - "category": "compact", - "description": " Update's users" + "name": "RINGING_REACHED", + "id": 4 }, { - "type": "reference", - "argument": "groups", - "category": "compact", - "description": " Update's groups" + "name": "CONNECTING", + "id": 2 }, { - "type": "reference", - "argument": "updates", - "category": "full", - "description": " Updates (can be empty)" + "name": "CONNECTED", + "id": 3 }, { - "type": "reference", - "argument": "messages", - "category": "full", - "description": " New messages" + "name": "ENDED", + "id": 5 } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "seqStart" - }, - { - "type": "int32", - "id": 2, - "name": "seqEnd" - }, - { - "type": { - "type": "alias", - "childType": "seq_state" - }, - "id": 3, - "name": "state" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "User" - } - }, - "id": 4, - "name": "users" - }, + ] + } + }, { + "type":"struct", + "content": { + "name":"CallMemberStateHolder", +"doc":[ +"Call Member state holder",{"type":"reference","argument":"state","category":"full","description":" State Value"},{"type":"reference","argument":"fallbackIsRinging","category":"full","description":" Fallback flag for future compatibility of state"},{"type":"reference","argument":"fallbackIsConnected","category":"full","description":" Fallback flag for future compatibility of state"},{"type":"reference","argument":"fallbackIsConnecting","category":"full","description":" Fallback flag for future compatibility of state"},{"type":"reference","argument":"fallbackIsRingingReached","category":"full","description":" Fallback flag for future compatibility of state"},{"type":"reference","argument":"fallbackIsEnded","category":"full","description":" Fallback flag for future compatibility of state"}],"attributes":[ +{"type":{"type":"enum","childType":"CallMemberState"},"id":1,"name":"state"} +,{"type":{"type":"opt","childType":"bool"},"id":2,"name":"fallbackIsRinging"} +,{"type":{"type":"opt","childType":"bool"},"id":3,"name":"fallbackIsConnected"} +,{"type":{"type":"opt","childType":"bool"},"id":4,"name":"fallbackIsConnecting"} +,{"type":{"type":"opt","childType":"bool"},"id":5,"name":"fallbackIsRingingReached"} +,{"type":{"type":"opt","childType":"bool"},"id":6,"name":"fallbackIsEnded"} +]}}, { + "type":"struct", + "content": { + "name":"CallMember", +"doc":[ +"Call Member",{"type":"reference","argument":"userId","category":"full","description":" Member User Id"},{"type":"reference","argument":"state","category":"full","description":" State of member"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"userId"} +,{"type":{"type":"struct","childType":"CallMemberStateHolder"},"id":3,"name":"state"} +]}}, { + "type":"struct", + "content": { + "name":"PeerSettings", +"doc":[ +"Peer Settings",{"type":"reference","argument":"is3DESSupported","category":"full","description":" Marking if 3DES supported. Default is false."},{"type":"reference","argument":"isMobile","category":"full","description":" Is Peer a mobile phone. Default is false."},{"type":"reference","argument":"canBeAudioRelay","category":"full","description":" If peer can audio relay. Default is false."},{"type":"reference","argument":"canPreConnect","category":"full","description":" If peer can preconnect before answer"}],"attributes":[ +{"type":{"type":"opt","childType":"bool"},"id":1,"name":"is3DESSupported"} +,{"type":{"type":"opt","childType":"bool"},"id":2,"name":"isMobile"} +,{"type":{"type":"opt","childType":"bool"},"id":3,"name":"canBeAudioRelay"} +,{"type":{"type":"opt","childType":"bool"},"id":4,"name":"canPreConnect"} +]}}]}, { + "title": "Config sync", + "package": "configs", + "doc": [ + "Parameter Syncronization across devices. Can be used for simple sync", + "across devices without rewriting server side code." + ], + "items": [ + { + "type":"struct", + "content": { + "name":"Parameter", +"doc":[ +"Syncing Parameter",{"type":"reference","argument":"key","category":"full","description":" Key of parameter"},{"type":"reference","argument":"value","category":"full","description":" Value of parameter"}],"attributes":[ +{"type":"string","id":1,"name":"key"} +,{"type":"string","id":2,"name":"value"} +]}},{"type":"rpc","content":{ +"name":"GetParameters", +"header":134, +"response":{"type":"anonymous","header":135, "doc":[ +{"type":"reference","argument":"parameters","category":"full","description":" Current parameters"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"Parameter"}},"id":1,"name":"parameters"} +]}, +"doc":[ +"Getting Parameters"],"attributes":[ +]}},{"type":"rpc","content":{ +"name":"EditParameter", +"header":128, +"response":{"type":"reference","name":"Seq"}, +"doc":[ +"Change parameter value",{"type":"reference","argument":"key","category":"full","description":"Key of parameter"},{"type":"reference","argument":"value","category":"full","description":"Value of parameter"}],"attributes":[ +{"type":"string","id":1,"name":"key"} +,{"type":{"type":"opt","childType":"string"},"id":2,"name":"value"} +]}},{"type":"update","content":{ +"name":"ParameterChanged", +"header":131, +"doc":[ +"Update about parameter change",{"type":"reference","argument":"key","category":"full","description":" Key of parameter"},{"type":"reference","argument":"value","category":"full","description":" Value of parameter"}],"attributes":[ +{"type":"string","id":1,"name":"key"} +,{"type":{"type":"opt","childType":"string"},"id":2,"name":"value"} +]}}]}, { + "title": "Stats", + "package": "stats", + "doc": [ + "Saving statistics information" + ], + "items": [ + { + "type":"struct", + "content": { + "name":"EventRecord", +"doc":[ +"Record for stored event"],"attributes":[ +{"type":{"type":"alias","childType":"date"},"id":1,"name":"date"} +,{"type":{"type":"trait","childType":"Event"},"id":2,"name":"event"} +]}},{"type":"trait","content":{ +"isContainer":"true","name":"Event","attributes":[ +]}}, { + "type":"struct", + "content": { + "name":"UntypedEvent", +"doc":[ +"Untyped event",{"type":"reference","argument":"eventType","category":"full","description":" Event type"},{"type":"reference","argument":"params","category":"full","description":" optional params for event"}],"trait":{"name":"Event","key":1},"expandable":"true","attributes":[ +{"type":"string","id":1,"name":"eventType"} +,{"type":{"type":"opt","childType":{"type":"trait","childType":"RawValue"}},"id":2,"name":"params"} +]}}, { + "type":"struct", + "content": { + "name":"ContentViewChanged", +"doc":[ +"Content view event",{"type":"reference","argument":"contentType","category":"full","description":" unique content id"},{"type":"reference","argument":"visible","category":"full","description":" Is content visible"},{"type":"reference","argument":"params","category":"full","description":" optional params for content view"}],"trait":{"name":"Event","key":2},"expandable":"true","attributes":[ +{"type":"string","id":1,"name":"contentType"} +,{"type":"string","id":2,"name":"contentId"} +,{"type":"bool","id":3,"name":"visible"} +,{"type":{"type":"opt","childType":{"type":"trait","childType":"RawValue"}},"id":4,"name":"params"} +]}}, { + "type":"struct", + "content": { + "name":"AppVisibleChanged", +"doc":[ +"On App Visible event",{"type":"reference","argument":"visible","category":"full","description":" Is app visible"}],"trait":{"name":"Event","key":4},"expandable":"true","attributes":[ +{"type":"bool","id":1,"name":"visible"} +]}},{"type":"rpc","content":{ +"name":"StoreEvents", +"header":243, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Storing events on server",{"type":"reference","argument":"events","category":"full","description":"Events for storing"}],"attributes":[ +{"type":{"type":"list","childType":{"type":"trait","childType":"Event"}},"id":1,"name":"events"} +]}}]}, { + "title": "Raw API", + "package": "raw", + "doc": [ + "Schema-less API that is useful for external integrations" + ], + "items": [ +{"type":"rpc","content":{ +"name":"RawRequest", +"header":2569, +"response":{"type":"anonymous","header":2570, "doc":[ +"Response of a raw request",{"type":"reference","argument":"result","category":"full","description":" Result of request"}] ,"attributes":[{"type":{"type":"trait","childType":"RawValue"},"id":1,"name":"result"} +]}, +"doc":[ +"Making raw request to external service via shema-less RPC request",{"type":"reference","argument":"service","category":"full","description":"Service name for RPC request"},{"type":"reference","argument":"method","category":"full","description":"Method for execution"},{"type":"reference","argument":"params","category":"full","description":"Optional params for the method"}],"attributes":[ +{"type":"string","id":1,"name":"service"} +,{"type":"string","id":2,"name":"method"} +,{"type":{"type":"opt","childType":{"type":"trait","childType":"RawValue"}},"id":3,"name":"params"} +]}}]}, { + "title": "Wallpappers", + "package": "wallpappers", + "doc": [ + "Wallpappers support" + ], + "items": [ + { + "type":"struct", + "content": { + "name":"Wallpapper", +"doc":[ +"Wallpapper structure",{"type":"reference","argument":"id","category":"full","description":" Wallpapper id"},{"type":"reference","argument":"w","category":"full","description":" Image width"},{"type":"reference","argument":"h","category":"full","description":" Image height"},{"type":"reference","argument":"fileSize","category":"full","description":" Image file size"},{"type":"reference","argument":"file","category":"full","description":" Image file reference"},{"type":"reference","argument":"thumb","category":"full","description":" Image thumb"}],"attributes":[ +{"type":"int32","id":7,"name":"id"} +,{"type":"int32","id":1,"name":"w"} +,{"type":"int32","id":2,"name":"h"} +,{"type":"int32","id":3,"name":"fileSize"} +,{"type":{"type":"struct","childType":"FileLocation"},"id":5,"name":"file"} +,{"type":{"type":"struct","childType":"FastThumb"},"id":6,"name":"thumb"} +]}},{"type":"rpc","content":{ +"name":"LoadWallpappers", +"header":241, +"response":{"type":"anonymous","header":242, "doc":[ +"Loaded Wallpappers",{"type":"reference","argument":"wallpappers","category":"full","description":" Available wallpapper list"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"Wallpapper"}},"id":1,"name":"wallpappers"} +]}, +"doc":[ +"Load available wallpappers",{"type":"reference","argument":"maxWidth","category":"full","description":"Maximum width of wallpapper"},{"type":"reference","argument":"maxHeight","category":"full","description":"Maximum height of wallpapper"}],"attributes":[ +{"type":"int32","id":1,"name":"maxWidth"} +,{"type":"int32","id":2,"name":"maxHeight"} +]}}]}, { + "title": "Push", + "package": "push", + "doc": [ + "Vendor's pushes for receiving push notifications.", + "Push notification contains current sequence number of main sequence." + ], + "items": [ +{"type":"rpc","content":{ +"name":"RegisterGooglePush", +"header":51, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Registering push token on server",{"type":"reference","argument":"projectId","category":"hidden","description":"Project Id of token"},{"type":"reference","argument":"token","category":"danger","description":"token value"}],"attributes":[ +{"type":"int64","id":1,"name":"projectId"} +,{"type":"string","id":2,"name":"token"} +]}},{"type":"rpc","content":{ +"name":"UnregisterGooglePush", +"header":2631, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Unregistering Google Push",{"type":"reference","argument":"token","category":"danger","description":"Token value"}],"attributes":[ +{"type":"string","id":1,"name":"token"} +]}},{"type":"rpc","content":{ +"name":"RegisterApplePush", +"header":76, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Registering apple push on server",{"type":"reference","argument":"apnsKey","category":"hidden","description":"apns key id"},{"type":"reference","argument":"token","category":"danger","description":"token value"}],"attributes":[ +{"type":"int32","id":1,"name":"apnsKey"} +,{"type":"string","id":2,"name":"token"} +]}},{"type":"rpc","content":{ +"name":"UnregisterApplePush", +"header":2632, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Unregistering Apple Push",{"type":"reference","argument":"token","category":"full","description":"Token"}],"attributes":[ +{"type":"string","id":1,"name":"token"} +]}},{"type":"rpc","content":{ +"name":"RegisterApplePushKit", +"header":2576, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Registration of a new Apple's PushKit tokens",{"type":"reference","argument":"apnsKey","category":"hidden","description":"APNS key id"},{"type":"reference","argument":"token","category":"danger","description":"token value"}],"attributes":[ +{"type":"int32","id":1,"name":"apnsKey"} +,{"type":"string","id":2,"name":"token"} +]}},{"type":"rpc","content":{ +"name":"UnregisterApplePushKit", +"header":2633, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Unregistering Apple Push Kit token",{"type":"reference","argument":"token","category":"hidden","description":"Token Value"}],"attributes":[ +{"type":"string","id":1,"name":"token"} +]}},{"type":"rpc","content":{ +"name":"RegisterApplePushToken", +"header":2593, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Registering Apple Push Token",{"type":"reference","argument":"bundleId","category":"full","description":"Bundle Id of app"},{"type":"reference","argument":"token","category":"full","description":"Push token"}],"attributes":[ +{"type":"string","id":1,"name":"bundleId"} +,{"type":"string","id":2,"name":"token"} +]}},{"type":"rpc","content":{ +"name":"UnregisterApplePushToken", +"header":2634, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Unregister Apple Push token",{"type":"reference","argument":"token","category":"hidden","description":"Token value"}],"attributes":[ +{"type":"string","id":1,"name":"token"} +]}},{"type":"rpc","content":{ +"name":"RegisterActorPush", +"header":2575, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Register Actor Push endpoint",{"type":"reference","argument":"endpoint","category":"full","description":"Endpoint for push sending"},{"type":"reference","argument":"encryptionKeys","category":"full","description":"Push Encryption keys"}],"attributes":[ +{"type":"string","id":1,"name":"endpoint"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"EncryptionKey"}},"id":2,"name":"encryptionKeys"} +]}},{"type":"rpc","content":{ +"name":"UnregisterActorPush", +"header":2635, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Unregister Actor Push endpoint",{"type":"reference","argument":"endpoint","category":"full","description":"Endpoint for unregistering"}],"attributes":[ +{"type":"string","id":1,"name":"endpoint"} +]}}]}, { + "title": "Encryption", + "package": "encryption", + "doc": [ + "Package that include encryption support", + "Key alg types:", + "* curve25519 - https://en.wikipedia.org/wiki/Curve25519", + "* rsa-2048", + "* rsa-4096", + "* aes-128", + "* kuznechik-128", + "", + "Signature alg types:", + "* Ed25519 - used curve25519 conveted to Ed255519 for signing and validataion" + ], + "items": [ +{"type":"comment","content":"Public Keys"}, { + "type":"struct", + "content": { + "name":"EncryptionKeyGroup", +"doc":[ +"Encryption Key Group",{"type":"reference","argument":"keyGroupId","category":"full","description":" Key Group Id"},{"type":"reference","argument":"identityKey","category":"full","description":" Key that is used as identity and for validation of Key Group changes"},{"type":"reference","argument":"supportedEncryption","category":"full","description":" Supported encryption methods by this key group"},{"type":"reference","argument":"keys","category":"compact","description":" keys of Key Group"},{"type":"reference","argument":"signatures","category":"compact","description":" Signatures of keys"}],"expandable":"true","attributes":[ +{"type":{"type":"alias","childType":"keyGroupId"},"id":1,"name":"keyGroupId"} +,{"type":{"type":"list","childType":"string"},"id":2,"name":"supportedEncryption"} +,{"type":{"type":"struct","childType":"EncryptionKey"},"id":3,"name":"identityKey"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"EncryptionKey"}},"id":4,"name":"keys"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"EncryptionKeySignature"}},"id":5,"name":"signatures"} +]}}, { + "type":"struct", + "content": { + "name":"EncryptionKeySignature", +"doc":[ +"Signed Key. Usually used for public keys.",{"type":"reference","argument":"keyId","category":"full","description":" Key Id used for signature"},{"type":"reference","argument":"signatureAlg","category":"full","description":" Signature algorithm"},{"type":"reference","argument":"signature","category":"full","description":" Signature value"}],"attributes":[ +{"type":"int64","id":1,"name":"keyId"} +,{"type":"string","id":2,"name":"signatureAlg"} +,{"type":"bytes","id":3,"name":"signature"} +]}}, { + "type":"struct", + "content": { + "name":"EncryptionKey", +"doc":[ +"Encryption Key",{"type":"reference","argument":"keyId","category":"full","description":" Key Id"},{"type":"reference","argument":"keyAlg","category":"full","description":" Key Algorithm"},{"type":"reference","argument":"keyMaterial","category":"compact","description":" Public key material. Can be null, but always not null for LoadPublicKey"},{"type":"reference","argument":"keyHash","category":"hidden","description":" If keyMaterial is null, pass keyHash - SHA256 of key"}],"expandable":"true","attributes":[ +{"type":"int64","id":1,"name":"keyId"} +,{"type":"string","id":2,"name":"keyAlg"} +,{"type":{"type":"opt","childType":"bytes"},"id":3,"name":"keyMaterial"} +,{"type":{"type":"opt","childType":"bytes"},"id":4,"name":"keyHash"} +]}},{"type":"response","content":{ +"name":"PublicKeys", +"header":2602, +"doc":[ +"Public Keys response",{"type":"reference","argument":"publicKey","category":"full","description":" Public keys"},{"type":"reference","argument":"signatures","category":"full","description":" Signatures of public keys"}],"attributes":[ +{"type":{"type":"list","childType":{"type":"struct","childType":"EncryptionKey"}},"id":1,"name":"publicKey"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"EncryptionKeySignature"}},"id":2,"name":"signatures"} +]}},{"type":"response","content":{ +"name":"PublicKeyGroups", +"header":2604, +"doc":[ +"Public key groups response"],"attributes":[ +{"type":{"type":"list","childType":{"type":"struct","childType":"EncryptionKeyGroup"}},"id":1,"name":"publicKeyGroups"} +]}},{"type":"rpc","content":{ +"name":"LoadPublicKeyGroups", +"header":2601, +"response":{"type":"reference","name":"PublicKeyGroups"}, +"doc":[ +"Loading Public key groups",{"type":"reference","argument":"userPeer","category":"full","description":"User's peer"}],"attributes":[ +{"type":{"type":"struct","childType":"UserOutPeer"},"id":1,"name":"userPeer"} +]}},{"type":"rpc","content":{ +"name":"LoadPublicKey", +"header":2605, +"response":{"type":"reference","name":"PublicKeys"}, +"doc":[ +"Loading public key explictly",{"type":"reference","argument":"userPeer","category":"full","description":"User's peer"},{"type":"reference","argument":"keyGroupId","category":"full","description":"Key group's id"},{"type":"reference","argument":"keyIds","category":"full","description":"Key ids for loading"}],"attributes":[ +{"type":{"type":"struct","childType":"UserOutPeer"},"id":1,"name":"userPeer"} +,{"type":"int32","id":2,"name":"keyGroupId"} +,{"type":{"type":"list","childType":"int64"},"id":3,"name":"keyIds"} +]}},{"type":"rpc","content":{ +"name":"LoadPrePublicKeys", +"header":2603, +"response":{"type":"reference","name":"PublicKeys"}, +"doc":[ +"Loading SOME of ephermal public keys",{"type":"reference","argument":"userPeer","category":"full","description":"User's peer"},{"type":"reference","argument":"keyGroupId","category":"full","description":"User's key group id"}],"attributes":[ +{"type":{"type":"struct","childType":"UserOutPeer"},"id":1,"name":"userPeer"} +,{"type":"int32","id":2,"name":"keyGroupId"} +]}},{"type":"update","content":{ +"name":"PublicKeyGroupChanged", +"header":103, +"doc":[ +"Update about public key group changed",{"type":"reference","argument":"uid","category":"full","description":" User's id"},{"type":"reference","argument":"keyGroup","category":"full","description":" Updated Key Group"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":{"type":"struct","childType":"EncryptionKeyGroup"},"id":2,"name":"keyGroup"} +]}},{"type":"update","content":{ +"name":"KeysAdded", +"header":112, +"doc":[ +"Update about keys added to Key Group",{"type":"reference","argument":"uid","category":"full","description":" User's id"},{"type":"reference","argument":"keyGroupId","category":"full","description":" Key Group Id"},{"type":"reference","argument":"keys","category":"compact","description":" Added keys"},{"type":"reference","argument":"signatures","category":"compact","description":" Signatures of a public key"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":{"type":"alias","childType":"keyGroupId"},"id":2,"name":"keyGroupId"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"EncryptionKey"}},"id":3,"name":"keys"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"EncryptionKeySignature"}},"id":4,"name":"signatures"} +]}},{"type":"update","content":{ +"name":"KeysRemoved", +"header":113, +"doc":[ +"Update about keys removed from Key Group",{"type":"reference","argument":"uid","category":"full","description":" User's id"},{"type":"reference","argument":"keyGroupId","category":"full","description":" Key Group Id"},{"type":"reference","argument":"keyIds","category":"full","description":" Removed keys"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":{"type":"alias","childType":"keyGroupId"},"id":2,"name":"keyGroupId"} +,{"type":{"type":"list","childType":"int64"},"id":3,"name":"keyIds"} +]}},{"type":"update","content":{ +"name":"PublicKeyGroupAdded", +"header":104, +"doc":[ +"Update about public key group added",{"type":"reference","argument":"uid","category":"full","description":" User's id"},{"type":"reference","argument":"keyGroup","category":"full","description":" Added Key Group"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":{"type":"struct","childType":"EncryptionKeyGroup"},"id":2,"name":"keyGroup"} +]}},{"type":"update","content":{ +"name":"PublicKeyGroupRemoved", +"header":105, +"doc":[ +"Update about public key group removed",{"type":"reference","argument":"uid","category":"full","description":" User's id"},{"type":"reference","argument":"keyGroupId","category":"full","description":" Removed Key Group Id"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":{"type":"alias","childType":"keyGroupId"},"id":2,"name":"keyGroupId"} +]}},{"type":"comment","content":"Device Side"},{"type":"rpc","content":{ +"name":"CreateNewKeyGroup", +"header":2609, +"response":{"type":"anonymous","header":2610, "doc":[ +{"type":"reference","argument":"keyGroupId","category":"full","description":" Created Key Group id"}] ,"attributes":[{"type":{"type":"alias","childType":"keyGroupId"},"id":1,"name":"keyGroupId"} +]}, +"doc":[ +"Creation of a new Key Group",{"type":"reference","argument":"identityKey","category":"full","description":"Identity Key of a new group"},{"type":"reference","argument":"supportedEncryptions","category":"full","description":"Supported encryption methods"},{"type":"reference","argument":"keys","category":"full","description":"keys of current group"},{"type":"reference","argument":"signatures","category":"full","description":"signatures of keys"}],"attributes":[ +{"type":{"type":"struct","childType":"EncryptionKey"},"id":1,"name":"identityKey"} +,{"type":{"type":"list","childType":"string"},"id":2,"name":"supportedEncryptions"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"EncryptionKey"}},"id":3,"name":"keys"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"EncryptionKeySignature"}},"id":4,"name":"signatures"} +]}},{"type":"rpc","content":{ +"name":"DeleteKeyGroup", +"header":2611, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Deletion of a Key Group",{"type":"reference","argument":"keyGroupId","category":"full","description":"Key Group Id for deletion"}],"attributes":[ +{"type":{"type":"alias","childType":"keyGroupId"},"id":1,"name":"keyGroupId"} +]}},{"type":"rpc","content":{ +"name":"DisconnectKeyGroup", +"header":2613, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Disconnect Key Group from device",{"type":"reference","argument":"keyGroupId","category":"full","description":"Key Group Id for disconnection"}],"attributes":[ +{"type":{"type":"alias","childType":"keyGroupId"},"id":1,"name":"keyGroupId"} +]}},{"type":"rpc","content":{ +"name":"ConnectKeyGroup", +"header":2614, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Connectiong Key Group to device",{"type":"reference","argument":"keyGroupId","category":"full","description":"Key Group Id for connection"}],"attributes":[ +{"type":{"type":"alias","childType":"keyGroupId"},"id":1,"name":"keyGroupId"} +]}},{"type":"rpc","content":{ +"name":"UploadPreKey", +"header":2612, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Uploading Ephermal Keys",{"type":"reference","argument":"keyGroupId","category":"full","description":"Key Group Id"},{"type":"reference","argument":"keys","category":"compact","description":"Encryprion keys"},{"type":"reference","argument":"signatures","category":"compact","description":"Key signatures"}],"attributes":[ +{"type":{"type":"alias","childType":"keyGroupId"},"id":1,"name":"keyGroupId"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"EncryptionKey"}},"id":2,"name":"keys"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"EncryptionKeySignature"}},"id":3,"name":"signatures"} +]}},{"type":"comment","content":"Encrypted Packages"}, { + "type":"struct", + "content": { + "name":"EncryptedBox", +"doc":[ +"Encrypted package that is encrypted for multiple keys",{"type":"reference","argument":"keys","category":"full","description":" Encrypted encryption keys"},{"type":"reference","argument":"algType","category":"full","description":" Package encryption type"},{"type":"reference","argument":"encPackage","category":"full","description":" Encrypted package"},{"type":"reference","argument":"senderKeyGroupId","category":"full","description":" Sender key group"}],"expandable":"true","attributes":[ +{"type":{"type":"alias","childType":"keyGroupId"},"id":4,"name":"senderKeyGroupId"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"EncyptedBoxKey"}},"id":1,"name":"keys"} +,{"type":"string","id":2,"name":"algType"} +,{"type":"bytes","id":3,"name":"encPackage"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"EncryptedBoxSignature"}},"id":5,"name":"signatures"} +]}}, { + "type":"struct", + "content": { + "name":"EncryptedBoxSignature", +"doc":[ +"Signature for encrypted package",{"type":"reference","argument":"algType","category":"full","description":" Alg Type"},{"type":"reference","argument":"signature","category":"full","description":" Signature of encrypted package"}],"attributes":[ +{"type":"string","id":1,"name":"algType"} +,{"type":"bytes","id":2,"name":"signature"} +]}}, { + "type":"struct", + "content": { + "name":"EncyptedBoxKey", +"doc":[ +"Encrypted package encryption key",{"type":"reference","argument":"keyGroupId","category":"full","description":" Key Group Id"},{"type":"reference","argument":"algType","category":"full","description":" Key encryption algorithm"},{"type":"reference","argument":"encryptedKey","category":"hidden","description":" Encrypted encryption key"}],"expandable":"true","attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"usersId"} +,{"type":{"type":"alias","childType":"keyGroupId"},"id":2,"name":"keyGroupId"} +,{"type":"string","id":3,"name":"algType"} +,{"type":"bytes","id":4,"name":"encryptedKey"} +]}}, { + "type":"struct", + "content": { + "name":"KeyGroupId", +"doc":[ +"References to key groups",{"type":"reference","argument":"uid","category":"full","description":" User's id"},{"type":"reference","argument":"keyGroupId","category":"full","description":" Key Group Id"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":{"type":"alias","childType":"keyGroupId"},"id":2,"name":"keyGroupId"} +]}}, { + "type":"struct", + "content": { + "name":"KeyGroupHolder", +"doc":[ +"Key Group Holder",{"type":"reference","argument":"uid","category":"full","description":" User's id"},{"type":"reference","argument":"keyGroup","category":"full","description":" Key Group"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":{"type":"struct","childType":"EncryptionKeyGroup"},"id":2,"name":"keyGroup"} +]}},{"type":"rpc","content":{ +"name":"SendEncryptedPackage", +"header":2657, +"response":{"type":"anonymous","header":2664, "doc":[ +{"type":"reference","argument":"date","category":"full","description":" date"},{"type":"reference","argument":"obsoleteKeyGroups","category":"full","description":" obsolete key group ids"},{"type":"reference","argument":"missedKeyGroups","category":"full","description":" missed key groups"}] ,"attributes":[{"type":{"type":"opt","childType":{"type":"alias","childType":"date"}},"id":1,"name":"date"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"KeyGroupId"}},"id":2,"name":"obsoleteKeyGroups"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"KeyGroupHolder"}},"id":3,"name":"missedKeyGroups"} +]}, +"doc":[ +"Sending encrypted package",{"type":"reference","argument":"randomId","category":"hidden","description":"Random id"}],"attributes":[ +{"type":{"type":"alias","childType":"randomId"},"id":1,"name":"randomId"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":2,"name":"destPeers"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"KeyGroupId"}},"id":3,"name":"ignoredKeyGroups"} +,{"type":{"type":"struct","childType":"EncryptedBox"},"id":4,"name":"encryptedBox"} +]}},{"type":"update","content":{ +"name":"EncryptedPackage", +"header":177, +"doc":[ +"Update about encrypted package",{"type":"reference","argument":"randomId","category":"full","description":" Random Id of package"},{"type":"reference","argument":"date","category":"full","description":" Sending date of package"},{"type":"reference","argument":"senderId","category":"full","description":" Sender id of package"},{"type":"reference","argument":"encryptedBox","category":"full","description":" Encrypted box"}],"attributes":[ +{"type":{"type":"alias","childType":"randomId"},"id":1,"name":"randomId"} +,{"type":{"type":"alias","childType":"date"},"id":2,"name":"date"} +,{"type":{"type":"alias","childType":"userId"},"id":3,"name":"senderId"} +,{"type":{"type":"struct","childType":"EncryptedBox"},"id":4,"name":"encryptedBox"} +]}}]}, { + "title": "Storage", + "package": "storage", + "items": [ +{"type":"rpc","content":{ +"name":"UploadSharedBlob", +"header":2660, +"response":{"type":"anonymous","header":2661, "doc":[ +{"type":"reference","argument":"sharedObjectId","category":"full","description":" Id of shared object"}] ,"attributes":[{"type":"int32","id":1,"name":"sharedObjectId"} +]}, +"doc":[ +"Upload shared blob with user",{"type":"reference","argument":"destPeer","category":"full","description":"Destination peer"},{"type":"reference","argument":"bucket","category":"full","description":"Bucked name"},{"type":"reference","argument":"blob","category":"full","description":"Blob data"},{"type":"reference","argument":"randomId","category":"full","description":"Random id for protecting from double upload"}],"attributes":[ +{"type":{"type":"struct","childType":"UserOutPeer"},"id":1,"name":"destPeer"} +,{"type":"string","id":2,"name":"bucket"} +,{"type":"bytes","id":3,"name":"blob"} +,{"type":{"type":"alias","childType":"randomId"},"id":4,"name":"randomId"} +]}},{"type":"rpc","content":{ +"name":"DownloadSharedBlob", +"header":2662, +"response":{"type":"anonymous","header":2663, "doc":[ +{"type":"reference","argument":"blob","category":"full","description":" Blob contents"}] ,"attributes":[{"type":"bytes","id":1,"name":"blob"} +]}, +"doc":[ +"Download shared blob",{"type":"reference","argument":"destPeer","category":"full","description":"Destination peer"},{"type":"reference","argument":"bucket","category":"full","description":"Bucket name"},{"type":"reference","argument":"objectId","category":"full","description":"Object Id"}],"attributes":[ +{"type":{"type":"struct","childType":"UserOutPeer"},"id":1,"name":"destPeer"} +,{"type":"string","id":2,"name":"bucket"} +,{"type":"int32","id":3,"name":"objectId"} +]}}]}, { + "title": "Peers", + "package": "peers", + "doc": [ + "Peer is an identificator of specific conversation." + ], + "items": [ + { + "type": "enum", + "content": { + "name": "PeerType", + "values": [ { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Group" - } - }, - "id": 5, - "name": "groups" + "name": "Private", + "id": 1 }, { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "UpdateContainer" - } - }, - "id": 6, - "name": "updates" + "name": "Group", + "id": 2 }, { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "MessageContainer" - } - }, - "id": 7, - "name": "messages" + "name": "EncryptedPrivate", + "id": 3 } - ] - } - }, - { + ] + } + }, { + "type":"struct", + "content": { + "name":"Peer", +"doc":[ +"Peer",{"type":"reference","argument":"type","category":"full","description":" Peer Type"},{"type":"reference","argument":"id","category":"full","description":" Peer Id"}],"attributes":[ +{"type":{"type":"enum","childType":"PeerType"},"id":1,"name":"type"} +,{"type":"int32","id":2,"name":"id"} +]}}, { + "type":"struct", + "content": { + "name":"OutPeer", +"doc":[ +"Out peer with access hash",{"type":"reference","argument":"type","category":"full","description":" Peer Type"},{"type":"reference","argument":"id","category":"full","description":" Peer Id"},{"type":"reference","argument":"accessHash","category":"danger","description":" Peer access hash"}],"attributes":[ +{"type":{"type":"enum","childType":"PeerType"},"id":1,"name":"type"} +,{"type":"int32","id":2,"name":"id"} +,{"type":"int64","id":3,"name":"accessHash"} +]}}, { + "type":"struct", + "content": { + "name":"UserOutPeer", +"doc":[ +"User's out peer",{"type":"reference","argument":"uid","category":"full","description":" User's id"},{"type":"reference","argument":"accessHash","category":"danger","description":" User's access hash"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":"int64","id":2,"name":"accessHash"} +]}}, { + "type":"struct", + "content": { + "name":"GroupOutPeer", +"doc":[ +"Group's out peer",{"type":"reference","argument":"groupId","category":"full","description":" Group's Id"},{"type":"reference","argument":"accessHash","category":"danger","description":" Group's access hash"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":"int64","id":2,"name":"accessHash"} +]}}]}, { + "title": "Sequence and Updates", + "package": "sequence", + "doc": [ + "Each device has it's own update sequence. At the begining application request initial sequence state by", + "calling GetState. On each application restart or NewSessionCreated application calls GetDifference for receiving", + "updates in update sequence.", + "GetState and GetDifference automatically subscribes session to receiving updates in session.", + "Each update has seq and state. Seq is sequental index of updated and used for detecting of holes in update sequence", + "(because of server failure or session die) on client side.", + "All updates needed to be processed in partucular order according to seq values.", + "In some updates there can be references to users that are not available at client yer. In this case application need", + "to ignore such update and init getting difference." + ], + "items": [ +{"type":"update_box","content":{ +"name":"SeqUpdate", +"header":13, +"doc":[ +"Sequence update",{"type":"reference","argument":"seq","category":"full","description":" Sequence number of update"},{"type":"reference","argument":"state","category":"compact","description":" Sequece state of update"},{"type":"reference","argument":"updateHeader","category":"full","description":" header of update"},{"type":"reference","argument":"update","category":"compact","description":" The update"}],"attributes":[ +{"type":"int32","id":1,"name":"seq"} +,{"type":{"type":"alias","childType":"seq_state"},"id":2,"name":"state"} +,{"type":"int32","id":3,"name":"updateHeader"} +,{"type":"bytes","id":4,"name":"update"} +]}},{"type":"update_box","content":{ +"name":"FatSeqUpdate", +"header":73, +"doc":[ +"Fat sequence update with additional data",{"type":"reference","argument":"seq","category":"full","description":" Sequence number of update"},{"type":"reference","argument":"state","category":"compact","description":" Sequence state of update"},{"type":"reference","argument":"updateHeader","category":"full","description":" header of update"},{"type":"reference","argument":"update","category":"compact","description":" The update"},{"type":"reference","argument":"users","category":"compact","description":" Users that are referenced in update"},{"type":"reference","argument":"groups","category":"compact","description":" Groups that are referenced in update"}],"attributes":[ +{"type":"int32","id":1,"name":"seq"} +,{"type":{"type":"alias","childType":"seq_state"},"id":2,"name":"state"} +,{"type":"int32","id":3,"name":"updateHeader"} +,{"type":"bytes","id":4,"name":"update"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":5,"name":"users"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"Group"}},"id":6,"name":"groups"} +]}},{"type":"update_box","content":{ +"name":"WeakUpdate", +"header":26, +"doc":[ +"Out of sequence update (for typing and online statuses)",{"type":"reference","argument":"date","category":"full","description":" Date of update"},{"type":"reference","argument":"updateHeader","category":"full","description":" Header of update"},{"type":"reference","argument":"update","category":"compact","description":" The update"}],"attributes":[ +{"type":"int64","id":1,"name":"date"} +,{"type":"int32","id":2,"name":"updateHeader"} +,{"type":"bytes","id":3,"name":"update"} +]}},{"type":"update_box","content":{ +"name":"WeakFatUpdate", +"header":2673, +"doc":[ +"Fat Weak Update",{"type":"reference","argument":"date","category":"full","description":" Date of update"},{"type":"reference","argument":"updateHeader","category":"full","description":" Header of update"},{"type":"reference","argument":"update","category":"full","description":" The update"},{"type":"reference","argument":"users","category":"full","description":" Users that are referenced in update"},{"type":"reference","argument":"groups","category":"full","description":" Groups that are referenced in update"}],"attributes":[ +{"type":"int64","id":1,"name":"date"} +,{"type":"int32","id":2,"name":"updateHeader"} +,{"type":"bytes","id":3,"name":"update"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":4,"name":"users"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"Group"}},"id":5,"name":"groups"} +]}},{"type":"update_box","content":{ +"name":"SeqUpdateTooLong", +"header":25, +"doc":[ +"Notification about requiring performing manual GetDifference"],"attributes":[ +]}}, { + "type":"struct", + "content": { + "name":"UpdateContainer", +"doc":[ +"Update container",{"type":"reference","argument":"updateHeader","category":"full","description":" Header of update"},{"type":"reference","argument":"update","category":"compact","description":" The updatre"}],"attributes":[ +{"type":"int32","id":1,"name":"updateHeader"} +,{"type":"bytes","id":2,"name":"update"} +]}},{"type":"update_box","content":{ +"name":"CombinedUpdate", +"header":2625, +"doc":[ +"Combined update",{"type":"reference","argument":"seqStart","category":"full","description":" Sequence number start"},{"type":"reference","argument":"seqEnd","category":"full","description":" Sequence number end"},{"type":"reference","argument":"state","category":"full","description":" Sequence state"},{"type":"reference","argument":"users","category":"compact","description":" Update's users"},{"type":"reference","argument":"groups","category":"compact","description":" Update's groups"},{"type":"reference","argument":"updates","category":"full","description":" Updates (can be empty)"},{"type":"reference","argument":"messages","category":"full","description":" New messages"}],"attributes":[ +{"type":"int32","id":1,"name":"seqStart"} +,{"type":"int32","id":2,"name":"seqEnd"} +,{"type":{"type":"alias","childType":"seq_state"},"id":3,"name":"state"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":4,"name":"users"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"Group"}},"id":5,"name":"groups"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"UpdateContainer"}},"id":6,"name":"updates"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"MessageContainer"}},"id":7,"name":"messages"} +]}}, { "type": "enum", "content": { "name": "UpdateOptimization", @@ -20644,780 +3984,157 @@ "name": "GROUPS_V2", "id": 7 } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "GetState", - "header": 9, - "response": { - "type": "reference", - "name": "Seq" - }, - "doc": [ - "Get main sequence state", - { - "type": "reference", - "argument": "optimizations", - "category": "full", - "description": "Enabled optimizations" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "enum", - "childType": "UpdateOptimization" - } - }, - "id": 1, - "name": "optimizations" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "GetDifference", - "header": 11, - "response": { - "type": "anonymous", - "header": 12, - "doc": [ - { - "type": "reference", - "argument": "seq", - "category": "full", - "description": " Seq of LAST update in updates" - }, - { - "type": "reference", - "argument": "state", - "category": "full", - "description": " State of LAST update in updates" - }, - { - "type": "reference", - "argument": "users", - "category": "compact", - "description": " Users referenced in updates" - }, - { - "type": "reference", - "argument": "groups", - "category": "compact", - "description": " Groups referenced in updates" - }, - { - "type": "reference", - "argument": "updates", - "category": "compact", - "description": " Updates" - }, - { - "type": "reference", - "argument": "needMore", - "category": "full", - "description": " Need to perform other difference" - }, - { - "type": "reference", - "argument": "usersRefs", - "category": "full", - "description": " Direct references of users" - }, - { - "type": "reference", - "argument": "groupsRefs", - "category": "full", - "description": " Direct References of groups" - } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "seq" - }, - { - "type": { - "type": "alias", - "childType": "seq_state" - }, - "id": 2, - "name": "state" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "User" - } - }, - "id": 3, - "name": "users" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Group" - } - }, - "id": 6, - "name": "groups" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "UpdateContainer" - } - }, - "id": 4, - "name": "updates" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "MessageContainer" - } - }, - "id": 7, - "name": "messages" - }, - { - "type": "bool", - "id": 5, - "name": "needMore" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "UserOutPeer" - } - }, - "id": 8, - "name": "usersRefs" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "GroupOutPeer" - } - }, - "id": 9, - "name": "groupsRefs" - } - ] - }, - "doc": [ - "Getting difference of sequence", - { - "type": "reference", - "argument": "seq", - "category": "full", - "description": "Sequence number" - }, - { - "type": "reference", - "argument": "state", - "category": "compact", - "description": "Sequence state" - }, - { - "type": "reference", - "argument": "optimizations", - "category": "full", - "description": "Enabled optimizations" - } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "seq" - }, - { - "type": { - "type": "alias", - "childType": "seq_state" - }, - "id": 2, - "name": "state" - }, - { - "type": { - "type": "list", - "childType": { - "type": "enum", - "childType": "UpdateOptimization" - } - }, - "id": 3, - "name": "optimizations" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "GetReferencedEntitites", - "header": 2628, - "response": { - "type": "anonymous", - "header": 2629, - "doc": [ - { - "type": "reference", - "argument": "users", - "category": "compact", - "description": " Loaded users" - }, - { - "type": "reference", - "argument": "groups", - "category": "compact", - "description": " Loaded groups" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "User" - } - }, - "id": 1, - "name": "users" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Group" - } - }, - "id": 2, - "name": "groups" - } - ] - }, - "doc": [ - "Loading referenced entities", - { - "type": "reference", - "argument": "users", - "category": "compact", - "description": "Users to load" - }, - { - "type": "reference", - "argument": "groups", - "category": "compact", - "description": "Groups to load. Also returns all members of a group." - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "UserOutPeer" - } - }, - "id": 1, - "name": "users" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "GroupOutPeer" - } - }, - "id": 2, - "name": "groups" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "RawUpdate", - "header": 80, - "doc": [ - "Custom Raw Update", - { - "type": "reference", - "argument": "type", - "category": "full", - "description": " Type of content" - }, - { - "type": "reference", - "argument": "bytes", - "category": "full", - "description": " Raw data" - } - ], - "attributes": [ - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 1, - "name": "type" - }, - { - "type": "bytes", - "id": 2, - "name": "bytes" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "EmptyUpdate", - "header": 85, - "doc": [ - "Empty update" - ], - "attributes": [] - } - }, - { - "type": "empty" - }, - { - "type": "rpc", - "content": { - "name": "SubscribeToOnline", - "header": 32, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Subscribing for users online", - { - "type": "reference", - "argument": "users", - "category": "compact", - "description": "Users for subscription" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "UserOutPeer" - } - }, - "id": 1, - "name": "users" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "SubscribeFromOnline", - "header": 33, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Removing subscription for users online", - { - "type": "reference", - "argument": "users", - "category": "compact", - "description": "Users of subscriptions" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "UserOutPeer" - } - }, - "id": 1, - "name": "users" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "SubscribeToGroupOnline", - "header": 74, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Subscribing for groups online", - { - "type": "reference", - "argument": "groups", - "category": "compact", - "description": "Groups for subscription" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "GroupOutPeer" - } - }, - "id": 1, - "name": "groups" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "SubscribeFromGroupOnline", - "header": 75, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Removing subscription for groups online", - { - "type": "reference", - "argument": "groups", - "category": "compact", - "description": "Groups of subscriptions" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "GroupOutPeer" - } - }, - "id": 1, - "name": "groups" - } - ] - } + ] } - ] - }, - { + },{"type":"rpc","content":{ +"name":"GetState", +"header":9, +"response":{"type":"reference","name":"Seq"}, +"doc":[ +"Get main sequence state",{"type":"reference","argument":"optimizations","category":"full","description":"Enabled optimizations"}],"attributes":[ +{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":1,"name":"optimizations"} +]}},{"type":"rpc","content":{ +"name":"GetDifference", +"header":11, +"response":{"type":"anonymous","header":12, "doc":[ +{"type":"reference","argument":"seq","category":"full","description":" Seq of LAST update in updates"},{"type":"reference","argument":"state","category":"full","description":" State of LAST update in updates"},{"type":"reference","argument":"users","category":"compact","description":" Users referenced in updates"},{"type":"reference","argument":"groups","category":"compact","description":" Groups referenced in updates"},{"type":"reference","argument":"updates","category":"compact","description":" Updates"},{"type":"reference","argument":"needMore","category":"full","description":" Need to perform other difference"},{"type":"reference","argument":"usersRefs","category":"full","description":" Direct references of users"},{"type":"reference","argument":"groupsRefs","category":"full","description":" Direct References of groups"}] ,"attributes":[{"type":"int32","id":1,"name":"seq"} +,{"type":{"type":"alias","childType":"seq_state"},"id":2,"name":"state"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":3,"name":"users"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"Group"}},"id":6,"name":"groups"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"UpdateContainer"}},"id":4,"name":"updates"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"MessageContainer"}},"id":7,"name":"messages"} +,{"type":"bool","id":5,"name":"needMore"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":8,"name":"usersRefs"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"GroupOutPeer"}},"id":9,"name":"groupsRefs"} +]}, +"doc":[ +"Getting difference of sequence",{"type":"reference","argument":"seq","category":"full","description":"Sequence number"},{"type":"reference","argument":"state","category":"compact","description":"Sequence state"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled optimizations"}],"attributes":[ +{"type":"int32","id":1,"name":"seq"} +,{"type":{"type":"alias","childType":"seq_state"},"id":2,"name":"state"} +,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":3,"name":"optimizations"} +]}},{"type":"rpc","content":{ +"name":"GetReferencedEntitites", +"header":2628, +"response":{"type":"anonymous","header":2629, "doc":[ +{"type":"reference","argument":"users","category":"compact","description":" Loaded users"},{"type":"reference","argument":"groups","category":"compact","description":" Loaded groups"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":1,"name":"users"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"Group"}},"id":2,"name":"groups"} +]}, +"doc":[ +"Loading referenced entities",{"type":"reference","argument":"users","category":"compact","description":"Users to load"},{"type":"reference","argument":"groups","category":"compact","description":"Groups to load. Also returns all members of a group."}],"attributes":[ +{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":1,"name":"users"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"GroupOutPeer"}},"id":2,"name":"groups"} +]}},{"type":"update","content":{ +"name":"RawUpdate", +"header":80, +"doc":[ +"Custom Raw Update",{"type":"reference","argument":"type","category":"full","description":" Type of content"},{"type":"reference","argument":"bytes","category":"full","description":" Raw data"}],"attributes":[ +{"type":{"type":"opt","childType":"string"},"id":1,"name":"type"} +,{"type":"bytes","id":2,"name":"bytes"} +]}},{"type":"update","content":{ +"name":"EmptyUpdate", +"header":85, +"doc":[ +"Empty update"],"attributes":[ +]}},{"type":"empty"},{"type":"rpc","content":{ +"name":"SubscribeToOnline", +"header":32, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Subscribing for users online",{"type":"reference","argument":"users","category":"compact","description":"Users for subscription"}],"attributes":[ +{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":1,"name":"users"} +]}},{"type":"rpc","content":{ +"name":"SubscribeFromOnline", +"header":33, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Removing subscription for users online",{"type":"reference","argument":"users","category":"compact","description":"Users of subscriptions"}],"attributes":[ +{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":1,"name":"users"} +]}},{"type":"rpc","content":{ +"name":"SubscribeToGroupOnline", +"header":74, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Subscribing for groups online",{"type":"reference","argument":"groups","category":"compact","description":"Groups for subscription"}],"attributes":[ +{"type":{"type":"list","childType":{"type":"struct","childType":"GroupOutPeer"}},"id":1,"name":"groups"} +]}},{"type":"rpc","content":{ +"name":"SubscribeFromGroupOnline", +"header":75, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Removing subscription for groups online",{"type":"reference","argument":"groups","category":"compact","description":"Groups of subscriptions"}],"attributes":[ +{"type":{"type":"list","childType":{"type":"struct","childType":"GroupOutPeer"}},"id":1,"name":"groups"} +]}}]}, { "title": "Counters", "package": "counters", "doc": [ "Application Counters, used to display various counters in application" ], "items": [ - { - "type": "struct", - "content": { - "name": "AppCounters", - "doc": [ - "Application counters", - { - "type": "reference", - "argument": "globalCounter", - "category": "full", - "description": " Global unread counter" - } - ], - "expandable": "true", - "attributes": [ - { - "type": { - "type": "opt", - "childType": "int32" - }, - "id": 1, - "name": "globalCounter" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "CountersChanged", - "header": 215, - "doc": [ - "Update about counters changed", - { - "type": "reference", - "argument": "counters", - "category": "full", - "description": " Current Application counters" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "AppCounters" - }, - "id": 1, - "name": "counters" - } - ] - } - } - ] - }, - { + { + "type":"struct", + "content": { + "name":"AppCounters", +"doc":[ +"Application counters",{"type":"reference","argument":"globalCounter","category":"full","description":" Global unread counter"}],"expandable":"true","attributes":[ +{"type":{"type":"opt","childType":"int32"},"id":1,"name":"globalCounter"} +]}},{"type":"update","content":{ +"name":"CountersChanged", +"header":215, +"doc":[ +"Update about counters changed",{"type":"reference","argument":"counters","category":"full","description":" Current Application counters"}],"attributes":[ +{"type":{"type":"struct","childType":"AppCounters"},"id":1,"name":"counters"} +]}}]}, { "title": "Miscellaneous", "package": "misc", "items": [ - { - "type": "response", - "content": { - "name": "Void", - "header": 50, - "doc": [ - "Empty response" - ], - "attributes": [] - } - }, - { - "type": "response", - "content": { - "name": "Seq", - "header": 72, - "doc": [ - "Sequence response. Methods that return this value must process response in particular order", - { - "type": "reference", - "argument": "seq", - "category": "full", - "description": " Sequence number of response" - }, - { - "type": "reference", - "argument": "state", - "category": "full", - "description": " Sequence state of response" - } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "seq" - }, - { - "type": { - "type": "alias", - "childType": "seq_state" - }, - "id": 2, - "name": "state" - } - ] - } - }, - { - "type": "response", - "content": { - "name": "SeqDate", - "header": 102, - "doc": [ - "Sequence response with date. Methods that return this value must process response in particular order", - { - "type": "reference", - "argument": "seq", - "category": "full", - "description": " Sequence number of response" - }, - { - "type": "reference", - "argument": "state", - "category": "full", - "description": " Sequence state of response" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " Date of response" - } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "seq" - }, - { - "type": { - "type": "alias", - "childType": "seq_state" - }, - "id": 2, - "name": "state" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 3, - "name": "date" - } - ] - } - }, - { - "type": "response", - "content": { - "name": "Bool", - "header": 209, - "doc": [ - "Boolean response", - { - "type": "reference", - "argument": "value", - "category": "full", - "description": " Response value" - } - ], - "attributes": [ - { - "type": "bool", - "id": 1, - "name": "value" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "Config", - "doc": [ - "Configuration of system", - { - "type": "reference", - "argument": "maxGroupSize", - "category": "full", - "description": " Current maximum group size" - } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "maxGroupSize" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "Extension", - "doc": [ - "Extention", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": " Extension id" - }, - { - "type": "reference", - "argument": "data", - "category": "full", - "description": " Extension data" - } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "id" - }, - { - "type": "bytes", - "id": 2, - "name": "data" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "Config", - "header": 42, - "doc": [ - "Update about config change", - { - "type": "reference", - "argument": "config", - "category": "full", - "description": " new config" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Config" - }, - "id": 1, - "name": "config" - } - ] - } - } - ] - }, - { +{"type":"response","content":{ +"name":"Void", +"header":50, +"doc":[ +"Empty response"],"attributes":[ +]}},{"type":"response","content":{ +"name":"Seq", +"header":72, +"doc":[ +"Sequence response. Methods that return this value must process response in particular order",{"type":"reference","argument":"seq","category":"full","description":" Sequence number of response"},{"type":"reference","argument":"state","category":"full","description":" Sequence state of response"}],"attributes":[ +{"type":"int32","id":1,"name":"seq"} +,{"type":{"type":"alias","childType":"seq_state"},"id":2,"name":"state"} +]}},{"type":"response","content":{ +"name":"SeqDate", +"header":102, +"doc":[ +"Sequence response with date. Methods that return this value must process response in particular order",{"type":"reference","argument":"seq","category":"full","description":" Sequence number of response"},{"type":"reference","argument":"state","category":"full","description":" Sequence state of response"},{"type":"reference","argument":"date","category":"full","description":" Date of response"}],"attributes":[ +{"type":"int32","id":1,"name":"seq"} +,{"type":{"type":"alias","childType":"seq_state"},"id":2,"name":"state"} +,{"type":{"type":"alias","childType":"date"},"id":3,"name":"date"} +]}},{"type":"response","content":{ +"name":"Bool", +"header":209, +"doc":[ +"Boolean response",{"type":"reference","argument":"value","category":"full","description":" Response value"}],"attributes":[ +{"type":"bool","id":1,"name":"value"} +]}}, { + "type":"struct", + "content": { + "name":"Config", +"doc":[ +"Configuration of system",{"type":"reference","argument":"maxGroupSize","category":"full","description":" Current maximum group size"}],"attributes":[ +{"type":"int32","id":1,"name":"maxGroupSize"} +]}}, { + "type":"struct", + "content": { + "name":"Extension", +"doc":[ +"Extention",{"type":"reference","argument":"id","category":"full","description":" Extension id"},{"type":"reference","argument":"data","category":"full","description":" Extension data"}],"attributes":[ +{"type":"int32","id":1,"name":"id"} +,{"type":"bytes","id":2,"name":"data"} +]}},{"type":"update","content":{ +"name":"Config", +"header":42, +"doc":[ +"Update about config change",{"type":"reference","argument":"config","category":"full","description":" new config"}],"attributes":[ +{"type":{"type":"struct","childType":"Config"},"id":1,"name":"config"} +]}}]}, { "title": "Device Info", "package": "device", "doc": [ @@ -21425,53 +4142,15 @@ "For example, getting timezone or preffered languages" ], "items": [ - { - "type": "rpc", - "content": { - "name": "NotifyAboutDeviceInfo", - "header": 229, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Notifying about device information", - { - "type": "reference", - "argument": "preferredLanguages", - "category": "full", - "description": "Preferred languages" - }, - { - "type": "reference", - "argument": "timeZone", - "category": "full", - "description": "Device Time Zone" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": "string" - }, - "id": 1, - "name": "preferredLanguages" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 2, - "name": "timeZone" - } - ] - } - } - ] - }, - { +{"type":"rpc","content":{ +"name":"NotifyAboutDeviceInfo", +"header":229, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Notifying about device information",{"type":"reference","argument":"preferredLanguages","category":"full","description":"Preferred languages"},{"type":"reference","argument":"timeZone","category":"full","description":"Device Time Zone"}],"attributes":[ +{"type":{"type":"list","childType":"string"},"id":1,"name":"preferredLanguages"} +,{"type":{"type":"opt","childType":"string"},"id":2,"name":"timeZone"} +]}}]}, { "title": "Webactions", "package": "webactions", "doc": [ @@ -21479,314 +4158,85 @@ "perform actions, and pass result on action completion" ], "items": [ - { - "type": "rpc", - "content": { - "name": "InitWebaction", - "header": 116, - "response": { - "type": "anonymous", - "header": 117, - "doc": [ - { - "type": "reference", - "argument": "uri", - "category": "full", - "description": " Web action uri" - }, - { - "type": "reference", - "argument": "regexp", - "category": "full", - "description": " Regular expression. Required to match completion of web action" - }, - { - "type": "reference", - "argument": "actionHash", - "category": "danger", - "description": " Identifier of current web action. Required to complete it" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "uri" - }, - { - "type": "string", - "id": 2, - "name": "regexp" - }, - { - "type": "string", - "id": 3, - "name": "actionHash" - } - ] - }, - "doc": [ - "Initialize start of web action", - { - "type": "reference", - "argument": "actionName", - "category": "full", - "description": "Name of web action" - }, - { - "type": "reference", - "argument": "params", - "category": "full", - "description": "Additional params required to make action's uri" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "actionName" - }, - { - "type": { - "type": "struct", - "childType": "MapValue" - }, - "id": 2, - "name": "params" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "CompleteWebaction", - "header": 123, - "response": { - "type": "anonymous", - "header": 124, - "doc": [ - { - "type": "reference", - "argument": "result", - "category": "full", - "description": " Reslut of web action completion" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "MapValue" - }, - "id": 1, - "name": "result" - } - ] - }, - "doc": [ - "Complete started web action", - { - "type": "reference", - "argument": "actionHash", - "category": "danger", - "description": "Identifier of given web action" - }, - { - "type": "reference", - "argument": "completeUri", - "category": "full", - "description": "Final uri of web action" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "actionHash" - }, - { - "type": "string", - "id": 2, - "name": "completeUri" - } - ] - } - } - ] - }, - { +{"type":"rpc","content":{ +"name":"InitWebaction", +"header":116, +"response":{"type":"anonymous","header":117, "doc":[ +{"type":"reference","argument":"uri","category":"full","description":" Web action uri"},{"type":"reference","argument":"regexp","category":"full","description":" Regular expression. Required to match completion of web action"},{"type":"reference","argument":"actionHash","category":"danger","description":" Identifier of current web action. Required to complete it"}] ,"attributes":[{"type":"string","id":1,"name":"uri"} +,{"type":"string","id":2,"name":"regexp"} +,{"type":"string","id":3,"name":"actionHash"} +]}, +"doc":[ +"Initialize start of web action",{"type":"reference","argument":"actionName","category":"full","description":"Name of web action"},{"type":"reference","argument":"params","category":"full","description":"Additional params required to make action's uri"}],"attributes":[ +{"type":"string","id":1,"name":"actionName"} +,{"type":{"type":"struct","childType":"MapValue"},"id":2,"name":"params"} +]}},{"type":"rpc","content":{ +"name":"CompleteWebaction", +"header":123, +"response":{"type":"anonymous","header":124, "doc":[ +{"type":"reference","argument":"result","category":"full","description":" Reslut of web action completion"}] ,"attributes":[{"type":{"type":"struct","childType":"MapValue"},"id":1,"name":"result"} +]}, +"doc":[ +"Complete started web action",{"type":"reference","argument":"actionHash","category":"danger","description":"Identifier of given web action"},{"type":"reference","argument":"completeUri","category":"full","description":"Final uri of web action"}],"attributes":[ +{"type":"string","id":1,"name":"actionHash"} +,{"type":"string","id":2,"name":"completeUri"} +]}}]}, { "title": "Collections", "package": "collections", "doc": [ "Flexible raw collections without structure" ], "items": [ - { - "type": "trait", - "content": { - "isContainer": "true", - "name": "RawValue", - "attributes": [] - } - }, - { - "type": "struct", - "content": { - "name": "StringValue", - "doc": [ - "Text value" - ], - "trait": { - "name": "RawValue", - "key": 1 - }, - "attributes": [ - { - "type": "string", - "id": 1, - "name": "text" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "Int32Value", - "doc": [ - "Int32 value" - ], - "trait": { - "name": "RawValue", - "key": 2 - }, - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "value" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "Int64Value", - "doc": [ - "Int64 value" - ], - "trait": { - "name": "RawValue", - "key": 3 - }, - "attributes": [ - { - "type": "int64", - "id": 1, - "name": "value" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "DoubleValue", - "doc": [ - "Double value" - ], - "trait": { - "name": "RawValue", - "key": 4 - }, - "attributes": [ - { - "type": "double", - "id": 1, - "name": "value" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "ArrayValue", - "doc": [ - "Array value" - ], - "trait": { - "name": "RawValue", - "key": 5 - }, - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "trait", - "childType": "RawValue" - } - }, - "id": 1, - "name": "array" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "MapValueItem", - "doc": [ - "Item of Map" - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "key" - }, - { - "type": { - "type": "trait", - "childType": "RawValue" - }, - "id": 2, - "name": "value" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "MapValue", - "doc": [ - "Map Value" - ], - "trait": { - "name": "RawValue", - "key": 6 - }, - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "MapValueItem" - } - }, - "id": 1, - "name": "items" - } - ] - } - } - ] - } - ] -} \ No newline at end of file +{"type":"trait","content":{ +"isContainer":"true","name":"RawValue","attributes":[ +]}}, { + "type":"struct", + "content": { + "name":"StringValue", +"doc":[ +"Text value"],"trait":{"name":"RawValue","key":1},"attributes":[ +{"type":"string","id":1,"name":"text"} +]}}, { + "type":"struct", + "content": { + "name":"Int32Value", +"doc":[ +"Int32 value"],"trait":{"name":"RawValue","key":2},"attributes":[ +{"type":"int32","id":1,"name":"value"} +]}}, { + "type":"struct", + "content": { + "name":"Int64Value", +"doc":[ +"Int64 value"],"trait":{"name":"RawValue","key":3},"attributes":[ +{"type":"int64","id":1,"name":"value"} +]}}, { + "type":"struct", + "content": { + "name":"DoubleValue", +"doc":[ +"Double value"],"trait":{"name":"RawValue","key":4},"attributes":[ +{"type":"double","id":1,"name":"value"} +]}}, { + "type":"struct", + "content": { + "name":"ArrayValue", +"doc":[ +"Array value"],"trait":{"name":"RawValue","key":5},"attributes":[ +{"type":{"type":"list","childType":{"type":"trait","childType":"RawValue"}},"id":1,"name":"array"} +]}}, { + "type":"struct", + "content": { + "name":"MapValueItem", +"doc":[ +"Item of Map"],"attributes":[ +{"type":"string","id":1,"name":"key"} +,{"type":{"type":"trait","childType":"RawValue"},"id":2,"name":"value"} +]}}, { + "type":"struct", + "content": { + "name":"MapValue", +"doc":[ +"Map Value"],"trait":{"name":"RawValue","key":6},"attributes":[ +{"type":{"type":"list","childType":{"type":"struct","childType":"MapValueItem"}},"id":1,"name":"items"} +]}}]}]} \ No newline at end of file diff --git a/actor-sdk/sdk-api/api-language/.mps/misc.xml b/actor-sdk/sdk-api/api-language/.mps/misc.xml index 1162f43828..8662aa97f9 100644 --- a/actor-sdk/sdk-api/api-language/.mps/misc.xml +++ b/actor-sdk/sdk-api/api-language/.mps/misc.xml @@ -1,5 +1,4 @@ - - + \ No newline at end of file diff --git a/actor-sdk/sdk-api/api-language/solutions/im.actor.api/models/im/actor/api/scheme.mps b/actor-sdk/sdk-api/api-language/solutions/im.actor.api/models/im/actor/api/scheme.mps index dc46e3760b..77cb2877ac 100644 --- a/actor-sdk/sdk-api/api-language/solutions/im.actor.api/models/im/actor/api/scheme.mps +++ b/actor-sdk/sdk-api/api-language/solutions/im.actor.api/models/im/actor/api/scheme.mps @@ -8977,6 +8977,29 @@ + + + + + + + + + + + + + + + + + + + + + + + @@ -18504,17 +18527,6 @@ - - - - - - - - - - - diff --git a/actor-sdk/sdk-core-android/.DS_Store b/actor-sdk/sdk-core-android/.DS_Store new file mode 100644 index 0000000000..589f4e6020 Binary files /dev/null and b/actor-sdk/sdk-core-android/.DS_Store differ diff --git a/actor-sdk/sdk-core-android/android-app/build.gradle b/actor-sdk/sdk-core-android/android-app/build.gradle index 64f4e5c3ce..594fe30839 100644 --- a/actor-sdk/sdk-core-android/android-app/build.gradle +++ b/actor-sdk/sdk-core-android/android-app/build.gradle @@ -1,6 +1,6 @@ buildscript { dependencies { - classpath 'com.android.tools.build:gradle:2.1.3' + classpath 'com.android.tools.build:gradle:2.2.3' classpath 'me.tatarka:gradle-retrolambda:3.2.5' classpath "com.google.gms:google-services:3.0.0" } @@ -9,6 +9,7 @@ buildscript { apply plugin: 'com.android.application' apply plugin: 'me.tatarka.retrolambda' + android { compileSdkVersion 24 buildToolsVersion "24.0.0" diff --git a/actor-sdk/sdk-core-android/android-app/src/main/java/im/actor/Application.java b/actor-sdk/sdk-core-android/android-app/src/main/java/im/actor/Application.java index d737d254b9..653c8e961f 100644 --- a/actor-sdk/sdk-core-android/android-app/src/main/java/im/actor/Application.java +++ b/actor-sdk/sdk-core-android/android-app/src/main/java/im/actor/Application.java @@ -29,6 +29,7 @@ import im.actor.sdk.ActorSDKApplication; import im.actor.sdk.ActorStyle; import im.actor.sdk.BaseActorSDKDelegate; +import im.actor.sdk.controllers.auth.AuthActivity; import im.actor.sdk.controllers.conversation.attach.AbsAttachFragment; import im.actor.sdk.controllers.conversation.messages.BubbleLayouter; import im.actor.sdk.controllers.conversation.messages.DefaultLayouter; @@ -55,26 +56,42 @@ public void onCreate() { @Override public void onConfigureActorSDK() { ActorSDK.sharedActor().setDelegate(new ActorSDKDelegate()); - ActorSDK.sharedActor().setPushId(209133700967L); + ActorSDK.sharedActor().setPushId(43880936595L); + ActorSDK.sharedActor().setActorPushEndpoint(null); ActorSDK.sharedActor().setOnClientPrivacyEnabled(true); - ActorStyle style = ActorSDK.sharedActor().style; style.setDialogsActiveTextColor(0xff5882ac); style.setShowAvatarPrivateInTitle(false); + style.setDialogsActiveTextColor(0xff5882ac); + style.setMainColor(Color.parseColor("#A43436")); + style.setAccentColor(Color.parseColor("#1F3255")); + style.setStatusBarColor(Color.parseColor("#A43436")); + style.setAccentPressedColor(Color.parseColor("#1F3255")); + style.setPrimaryAltColor(Color.parseColor("#A43436")); + style.setToolBarColor(Color.parseColor("#A43436")); + style.setFabColor(Color.parseColor("#A43436")); + ActorSDK.sharedActor().setFastShareEnabled(true); ActorSDK.sharedActor().setCallsEnabled(true); + ActorSDK.sharedActor().setAppName("XLoto Mensageiro"); + ActorSDK.sharedActor().setTosUrl("http://actor.im"); ActorSDK.sharedActor().setPrivacyText("bla bla bla"); - ActorSDK.sharedActor().setVideoCallsEnabled(true); + ActorSDK.sharedActor().setVideoCallsEnabled(false); ActorSDK.sharedActor().setAutoJoinGroups(new String[]{ - "actor_news" + "canalxloto" }); +// ActorSDK.sharedActor().setEndpoints(new String[]{"tcp://192.168.1.3:9070"}); + ActorSDK.sharedActor().setEndpoints(new String[]{"tcp://api-mtproto.im.xloto.com.br:9070"}); + ActorSDK.sharedActor().setAuthType(AuthActivity.AUTH_TYPE_PHONE); + + ActorSDK.sharedActor().setStickersEnabled(false); // ActorSDK.sharedActor().setTwitter(""); // ActorSDK.sharedActor().setHomePage("http://www.foo.com"); @@ -162,46 +179,58 @@ public AbsAttachFragment fragmentForAttachMenu(Peer peer) { @Override public ActorIntentFragmentActivity getSettingsIntent() { - return new BaseActorSettingsActivity() { + + return new BaseActorSettingsActivity(){ @Override public BaseActorSettingsFragment getSettingsFragment() { - return new BaseActorSettingsFragment() { - CheckBox blablaCheckBox; - - @Override - public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { - blablaCheckBox = new CheckBox(getContext()); - return super.onCreateView(inflater, container, savedInstanceState); - } - - @Override - public ActorSettingsCategories getBeforeSettingsCategories() { - return new ActorSettingsCategories() - .addCategory(new ActorSettingsCategory("azaza") - .addField(new ActorSettingsField(R.id.terminateSessions) - .setName("blabla") - .setIconResourceId(R.drawable.ic_edit_black_24dp) - .setRightView(blablaCheckBox) - ) - ); - } - - @Override - public View.OnClickListener getMenuFieldOnClickListener() { - return new View.OnClickListener() { - @Override - public void onClick(View v) { - switch (v.getId()) { - case R.id.terminateSessions: - Toast.makeText(v.getContext(), "hey", Toast.LENGTH_LONG).show(); - blablaCheckBox.toggle(); - break; - } - } - }; - } - - }; + return new MyBaseActorSettingsFragment(); + } + }; + } + } + + + public static class MyBaseActorSettingsActivity extends BaseActorSettingsActivity { + + @Override + public BaseActorSettingsFragment getSettingsFragment() { + return new MyBaseActorSettingsFragment(); + } + } + + + public static class MyBaseActorSettingsFragment extends BaseActorSettingsFragment { + CheckBox blablaCheckBox; + + @Override + public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { + blablaCheckBox = new CheckBox(getContext()); + return super.onCreateView(inflater, container, savedInstanceState); + } + + @Override + public ActorSettingsCategories getBeforeSettingsCategories() { + return new ActorSettingsCategories() + .addCategory(new ActorSettingsCategory("azaza") + .addField(new ActorSettingsField(R.id.terminateSessions) + .setName("blabla") + .setIconResourceId(R.drawable.ic_edit_black_24dp) + .setRightView(blablaCheckBox) + ) + ); + } + + @Override + public View.OnClickListener getMenuFieldOnClickListener() { + return new View.OnClickListener() { + @Override + public void onClick(View v) { + switch (v.getId()) { + case R.id.terminateSessions: + Toast.makeText(v.getContext(), "hey", Toast.LENGTH_LONG).show(); + blablaCheckBox.toggle(); + break; + } } }; } diff --git a/actor-sdk/sdk-core-android/android-google-maps/build.gradle b/actor-sdk/sdk-core-android/android-google-maps/build.gradle index c2ff47223d..42604103d0 100644 --- a/actor-sdk/sdk-core-android/android-google-maps/build.gradle +++ b/actor-sdk/sdk-core-android/android-google-maps/build.gradle @@ -1,6 +1,6 @@ buildscript { dependencies { - classpath 'com.android.tools.build:gradle:2.1.3' + classpath 'com.android.tools.build:gradle:2.2.3' classpath 'com.github.dcendents:android-maven-plugin:1.2' classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.5.3" classpath 'me.tatarka:gradle-retrolambda:3.2.5' @@ -23,7 +23,7 @@ def baseVersion = "3.0" android { compileSdkVersion 24 - buildToolsVersion "24.0.0" + buildToolsVersion "24.0.2" defaultConfig { minSdkVersion 15 @@ -48,7 +48,7 @@ android { } dependencies { - compile 'com.android.support:appcompat-v7:24.0.0' + compile 'com.android.support:appcompat-v7:24.2.1' //compile 'im.actor:android-sdk:0.1.30' compile project(':actor-sdk:sdk-core-android:android-sdk') @@ -132,19 +132,23 @@ project.afterEvaluate { if (isDeployConfigured) { - signing { - sign configurations.archives - } +// signing { +// sign configurations.archives +// } uploadArchives { repositories { mavenDeployer { - beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } +// beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } - repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { + repository(url: "http://104.233.107.117:8081/nexus/content/repositories/snapshots/") { authentication(userName: ossrhUsername, password: ossrhPassword) } +// repository(url: "http://localhost:8081/nexus/content/repositories/snapshots/") { +// authentication(userName: ossrhUsername, password: ossrhPassword) +// } + pom.project { name 'Actor SDK for Android Google Extension' packaging 'aar' diff --git a/actor-sdk/sdk-core-android/android-google-maps/src/main/java/im/actor/map/MapPickerActivity.java b/actor-sdk/sdk-core-android/android-google-maps/src/main/java/im/actor/map/MapPickerActivity.java index 12324ee953..0b4ad958a0 100644 --- a/actor-sdk/sdk-core-android/android-google-maps/src/main/java/im/actor/map/MapPickerActivity.java +++ b/actor-sdk/sdk-core-android/android-google-maps/src/main/java/im/actor/map/MapPickerActivity.java @@ -35,6 +35,7 @@ import com.google.android.gms.maps.CameraUpdateFactory; import com.google.android.gms.maps.GoogleMap; import com.google.android.gms.maps.MapFragment; +import com.google.android.gms.maps.OnMapReadyCallback; import com.google.android.gms.maps.model.BitmapDescriptorFactory; import com.google.android.gms.maps.model.CameraPosition; import com.google.android.gms.maps.model.LatLng; @@ -290,6 +291,7 @@ private void setUpMapIfNeeded() { // Do a null check to confirm that we have not already instantiated the map. if (mMap == null) { // Try to obtain the map from the SupportMapFragment. + ((MapFragment) getFragmentManager().findFragmentById(R.id.map)) .getMapAsync(googleMap -> { mMap = googleMap; diff --git a/actor-sdk/sdk-core-android/android-google-push/build.gradle b/actor-sdk/sdk-core-android/android-google-push/build.gradle index c00020cbcf..fa045126b7 100644 --- a/actor-sdk/sdk-core-android/android-google-push/build.gradle +++ b/actor-sdk/sdk-core-android/android-google-push/build.gradle @@ -1,6 +1,6 @@ buildscript { dependencies { - classpath 'com.android.tools.build:gradle:2.1.3' + classpath 'com.android.tools.build:gradle:2.2.3' classpath 'com.github.dcendents:android-maven-plugin:1.2' classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.5.3" classpath 'me.tatarka:gradle-retrolambda:3.2.5' @@ -21,7 +21,7 @@ def baseVersion = "3.0" android { compileSdkVersion 24 - buildToolsVersion "24.0.0" + buildToolsVersion "24.0.2" defaultConfig { minSdkVersion 15 @@ -46,7 +46,7 @@ android { } dependencies { - compile 'com.android.support:appcompat-v7:24.0.0' + compile 'com.android.support:appcompat-v7:24.2.1' //compile 'im.actor:android-sdk:0.1.30' compile project(':actor-sdk:sdk-core-android:android-sdk') @@ -129,19 +129,23 @@ project.afterEvaluate { if (isDeployConfigured) { - signing { - sign configurations.archives - } +// signing { +// sign configurations.archives +// } uploadArchives { repositories { mavenDeployer { - beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } +// beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } - repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { + repository(url: "http://104.233.107.117:8081/nexus/content/repositories/snapshots/") { authentication(userName: ossrhUsername, password: ossrhPassword) } +// repository(url: "http://localhost:8081/nexus/content/repositories/snapshots/") { +// authentication(userName: ossrhUsername, password: ossrhPassword) +// } + pom.project { name 'Actor SDK for Android Google Extension' packaging 'aar' diff --git a/actor-sdk/sdk-core-android/android-sdk/.DS_Store b/actor-sdk/sdk-core-android/android-sdk/.DS_Store new file mode 100644 index 0000000000..c59013dec1 Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/.DS_Store differ diff --git a/actor-sdk/sdk-core-android/android-sdk/build.gradle b/actor-sdk/sdk-core-android/android-sdk/build.gradle index 787550856c..ad64945767 100644 --- a/actor-sdk/sdk-core-android/android-sdk/build.gradle +++ b/actor-sdk/sdk-core-android/android-sdk/build.gradle @@ -1,6 +1,6 @@ buildscript { dependencies { - classpath 'com.android.tools.build:gradle:2.1.3' + classpath 'com.android.tools.build:gradle:2.2.3' classpath 'com.github.dcendents:android-maven-plugin:1.2' classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.5.3" classpath 'me.tatarka:gradle-retrolambda:3.2.5' @@ -21,7 +21,7 @@ def baseVersion = "3.0" android { compileSdkVersion 24 - buildToolsVersion '24.0.0' + buildToolsVersion '24.0.2' defaultConfig { minSdkVersion 15 @@ -95,13 +95,13 @@ dependencies { compile 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.0.2' // Android Support - compile 'com.android.support:support-v4:24.0.0' - compile 'com.android.support:support-v13:24.0.0' - compile 'com.android.support:appcompat-v7:24.0.0' - compile 'com.android.support:palette-v7:24.0.0' - compile 'com.android.support:recyclerview-v7:24.0.0' - compile 'com.android.support:design:24.0.0' - compile 'com.android.support:customtabs:24.0.0' + compile 'com.android.support:support-v4:24.2.1' + compile 'com.android.support:support-v13:24.2.1' + compile 'com.android.support:appcompat-v7:24.2.1' + compile 'com.android.support:palette-v7:24.2.1' + compile 'com.android.support:recyclerview-v7:24.2.1' + compile 'com.android.support:design:24.2.1' + compile 'com.android.support:customtabs:24.2.1' } // @@ -181,19 +181,23 @@ project.afterEvaluate { if (isDeployConfigured) { - signing { - sign configurations.archives - } +// signing { +// sign configurations.archives +// } uploadArchives { repositories { mavenDeployer { - beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } + // beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } - repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { + repository(url: "http://104.233.107.117:8081/nexus/content/repositories/snapshots/") { authentication(userName: ossrhUsername, password: ossrhPassword) } +// repository(url: "http://localhost:8081/nexus/content/repositories/snapshots/") { +// authentication(userName: ossrhUsername, password: ossrhPassword) +// } + pom.project { name 'Actor SDK for Android' packaging 'aar' diff --git a/actor-sdk/sdk-core-android/android-sdk/src/.DS_Store b/actor-sdk/sdk-core-android/android-sdk/src/.DS_Store new file mode 100644 index 0000000000..b66301d82e Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/.DS_Store differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/.DS_Store b/actor-sdk/sdk-core-android/android-sdk/src/main/.DS_Store new file mode 100644 index 0000000000..a781fd0e79 Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/.DS_Store differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/AndroidManifest.xml b/actor-sdk/sdk-core-android/android-sdk/src/main/AndroidManifest.xml index 16b41d5c31..1baa6bc303 100644 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/AndroidManifest.xml +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/AndroidManifest.xml @@ -23,6 +23,10 @@ + + + + + @@ -336,5 +344,11 @@ + + + + + + \ No newline at end of file diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_0_0.png b/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_0_0.png new file mode 100644 index 0000000000..eab1dd0b04 Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_0_0.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_0_1.png b/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_0_1.png new file mode 100644 index 0000000000..13e30e4d78 Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_0_1.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_0_2.png b/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_0_2.png new file mode 100644 index 0000000000..bab02c9c77 Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_0_2.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_0_3.png b/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_0_3.png new file mode 100644 index 0000000000..6568f97ecd Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_0_3.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_1_0.png b/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_1_0.png new file mode 100644 index 0000000000..089b9c65e2 Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_1_0.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_1_1.png b/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_1_1.png new file mode 100644 index 0000000000..e8d5581a88 Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_1_1.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_1_2.png b/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_1_2.png new file mode 100644 index 0000000000..b3a6e690c3 Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_1_2.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_1_3.png b/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_1_3.png new file mode 100644 index 0000000000..49d952e253 Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_1_3.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_2_0.png b/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_2_0.png new file mode 100644 index 0000000000..3ae8c7eca2 Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_2_0.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_2_1.png b/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_2_1.png new file mode 100644 index 0000000000..85dc9c613c Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_2_1.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_2_2.png b/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_2_2.png new file mode 100644 index 0000000000..b47e6c2ac6 Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_2_2.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_2_3.png b/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_2_3.png new file mode 100644 index 0000000000..a38b090f6d Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_2_3.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_3_0.png b/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_3_0.png new file mode 100644 index 0000000000..65b02f0f58 Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_3_0.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_3_1.png b/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_3_1.png new file mode 100644 index 0000000000..ee579a82be Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_3_1.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_3_2.png b/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_3_2.png new file mode 100644 index 0000000000..eb48658690 Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_3_2.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_3_3.png b/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_3_3.png new file mode 100644 index 0000000000..d1aaaca7d9 Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_3_3.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_4_0.png b/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_4_0.png new file mode 100644 index 0000000000..57b9fafa4f Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_4_0.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_4_1.png b/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_4_1.png new file mode 100644 index 0000000000..9c525df8be Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_4_1.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_4_2.png b/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_4_2.png new file mode 100644 index 0000000000..da27a76d2d Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_4_2.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_4_3.png b/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_4_3.png new file mode 100644 index 0000000000..8108b5de6b Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji/v10_emoji2.0x_4_3.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji_a_15.jpg b/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji_a_15.jpg deleted file mode 100644 index b9d2d15822..0000000000 Binary files a/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji_a_15.jpg and /dev/null differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji_a_2.jpg b/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji_a_2.jpg deleted file mode 100644 index 4a8965e3ef..0000000000 Binary files a/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji_a_2.jpg and /dev/null differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji_c_15.jpg b/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji_c_15.jpg deleted file mode 100644 index 0572a77a15..0000000000 Binary files a/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji_c_15.jpg and /dev/null differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji_c_2.jpg b/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji_c_2.jpg deleted file mode 100644 index 0ecf07fa70..0000000000 Binary files a/actor-sdk/sdk-core-android/android-sdk/src/main/assets/emoji_c_2.jpg and /dev/null differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/ActorSDK.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/ActorSDK.java index d6c6684a37..977939a00b 100644 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/ActorSDK.java +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/ActorSDK.java @@ -46,7 +46,6 @@ import im.actor.sdk.push.ActorPushRegister; import im.actor.sdk.services.KeepAliveService; import im.actor.sdk.util.Devices; -import im.actor.sdk.view.emoji.SmileProcessor; import im.actor.runtime.android.AndroidContext; @@ -113,6 +112,13 @@ public class ActorSDK { * Push Registration Id */ private long pushId = 0; + + /** + * Defines where is the sms code activation + * on the message + */ + private int smsCodePosition = 7; + /** * Actor Push Endpoint */ @@ -197,9 +203,11 @@ public class ActorSDK { private boolean onClientPrivacyEnabled = false; + private boolean stickersEnabled = true; + private String inviteDataUrl = "https://api.actor.im/v1/groups/invites/"; - private ActorSDK() { + protected ActorSDK() { endpoints = new String[]{ "tcp://front1-mtproto-api-rev3.actor.im:443", "tcp://front2-mtproto-api-rev3.actor.im:443", @@ -245,7 +253,6 @@ public void createActor(final Application application) { .build(); Fresco.initialize(application, config); - SmileProcessor emojiProcessor = new SmileProcessor(application); ActorSystem.system().addDispatcher("voice_capture_dispatcher", 1); // @@ -357,11 +364,6 @@ public void createActor(final Application application) { LOAD_LOCK.notifyAll(); } - // - // Loading Emoji - // - - emojiProcessor.loadEmoji(); }); } @@ -708,6 +710,14 @@ public boolean isCallsEnabled() { return callsEnabled; } + public boolean isStickersEnabled() { + return stickersEnabled; + } + + public void setStickersEnabled(boolean stickersEnabled) { + this.stickersEnabled = stickersEnabled; + } + /** * Getting Application Delegate. * @@ -894,6 +904,14 @@ public void startAuthActivity(Context context, Bundle extras) { } } + public int getSmsCodePosition() { + return smsCodePosition; + } + + public void setSmsCodePosition(int smsCodePosition) { + this.smsCodePosition = smsCodePosition; + } + /** * Method is used internally for starting default activity or activity added in delegate * diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/ActorSDKApplication.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/ActorSDKApplication.java index 4e9b3986c9..6102172c0d 100644 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/ActorSDKApplication.java +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/ActorSDKApplication.java @@ -2,8 +2,11 @@ import android.app.ActivityManager; import android.app.Application; +import android.content.res.Configuration; import im.actor.runtime.android.AndroidContext; +import im.actor.sdk.util.AndroidUtils; +import im.actor.sdk.util.Screen; /** * Implementation of Application object that handles everything required for creating and @@ -38,4 +41,14 @@ public void onCreate() { public void onConfigureActorSDK() { } + + @Override + public void onConfigurationChanged(Configuration newConfig) { + super.onConfigurationChanged(newConfig); + try { + Screen.checkDisplaySize(getApplicationContext(), newConfig); + } catch (Exception e) { + e.printStackTrace(); + } + } } \ No newline at end of file diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/ActorSDKDelegate.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/ActorSDKDelegate.java index dc94c1e80e..e69a05707f 100644 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/ActorSDKDelegate.java +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/ActorSDKDelegate.java @@ -1,5 +1,6 @@ package im.actor.sdk; +import android.content.Intent; import android.net.Uri; import android.support.v4.app.Fragment; @@ -212,6 +213,9 @@ public interface ActorSDKDelegate { */ RawUpdatesHandler getRawUpdatesHandler(); + + Class getNotificationIntentClass(); + /** * Override/add new messages view holders * diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/ActorStyle.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/ActorStyle.java index b774c5cc13..1845ec5406 100644 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/ActorStyle.java +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/ActorStyle.java @@ -52,6 +52,8 @@ public void setDefaultAvatarPlaceholders(int[] defaultAvatarPlaceholders) { //main color private int mainColor = 0xff4d74a6; + + public int getMainColor() { return mainColor; } @@ -60,6 +62,17 @@ public void setMainColor(int mainColor) { this.mainColor = mainColor; } + //status bar color + private int statusBarColor = 0xff4d74a6; + + public int getStatusBarColor() { + return statusBarColor; + } + + public void setStatusBarColor(int statusBarColor) { + this.statusBarColor = statusBarColor; + } + // primary alt colors private int primaryAltColor = 0xff4ca665; diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/BaseActorSDKDelegate.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/BaseActorSDKDelegate.java index b4f87298e4..be711f4ba4 100644 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/BaseActorSDKDelegate.java +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/BaseActorSDKDelegate.java @@ -1,5 +1,6 @@ package im.actor.sdk; +import android.content.Intent; import android.net.Uri; import android.provider.Settings; import android.support.v4.app.Fragment; @@ -16,6 +17,7 @@ import im.actor.sdk.controllers.conversation.mentions.AutocompleteFragment; import im.actor.sdk.controllers.conversation.messages.BubbleLayouter; import im.actor.sdk.controllers.conversation.quote.QuoteFragment; +import im.actor.sdk.controllers.root.RootActivity; import im.actor.sdk.controllers.dialogs.DialogsDefaultFragment; import im.actor.sdk.intents.ActorIntent; import im.actor.sdk.intents.ActorIntentFragmentActivity; @@ -152,6 +154,12 @@ public int getNotificationColor() { } @Override + + public Class getNotificationIntentClass() { + return RootActivity.class; + } + + public RawUpdatesHandler getRawUpdatesHandler() { return null; } @@ -165,3 +173,4 @@ public DialogsDefaultFragment fragmentForDialogs() { return null; } } + diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/activation/SMSActivationReceiver.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/activation/SMSActivationReceiver.java new file mode 100644 index 0000000000..f8ecd45110 --- /dev/null +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/activation/SMSActivationReceiver.java @@ -0,0 +1,61 @@ +package im.actor.sdk.activation; + +import android.content.BroadcastReceiver; +import android.content.Context; +import android.content.Intent; +import android.content.SharedPreferences; +import android.os.Build; +import android.os.Bundle; +import android.telephony.SmsMessage; +import android.util.Log; + +import im.actor.sdk.ActorSDK; +import im.actor.sdk.controllers.auth.SMSActivationObservable; + +/** + * Created by diego on 28/01/17. + */ + +public class SMSActivationReceiver extends BroadcastReceiver { + + private SharedPreferences preferences; + + @Override + public void onReceive(Context context, Intent intent) { + if (intent.getAction().equals("android.provider.Telephony.SMS_RECEIVED")) { + Bundle bundle = intent.getExtras(); + SmsMessage[] msgs = null; + + if (bundle != null) { + try { + Object[] pdus = (Object[]) bundle.get("pdus"); + msgs = new SmsMessage[pdus.length]; + + for (int i = 0; i < msgs.length; i++) { + String format = bundle.getString("format"); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { + msgs[i] = SmsMessage.createFromPdu((byte[]) pdus[i], format); + }else{ + msgs[i] = SmsMessage.createFromPdu((byte[]) pdus[i]); + } + + String msgFrom = msgs[i].getOriginatingAddress(); + String msgStr = msgs[i].getMessageBody(); + + String arrAppName[] = msgStr.split(":"); + String arr[] = msgStr.split("\\s+"); + + if(arrAppName[0].equalsIgnoreCase(ActorSDK.sharedActor().getAppName())){ + Integer codigoAtivacao = Integer.parseInt(arr[ActorSDK.sharedActor().getSmsCodePosition()]); + SMSActivationObservable.getInstance().updateValue(codigoAtivacao.toString()); + } + } + } catch (Exception e) { + Log.d("Erro ao receber SMS", e.getMessage()); + } + } + } + } + + +} \ No newline at end of file diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/activity/BaseActivity.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/activity/BaseActivity.java index f1cc93a875..e107f0f65c 100644 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/activity/BaseActivity.java +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/activity/BaseActivity.java @@ -2,11 +2,15 @@ import android.app.ProgressDialog; import android.graphics.drawable.ColorDrawable; +import android.os.Build; import android.os.Bundle; +import android.support.v4.content.ContextCompat; import android.support.v7.app.ActionBar; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.view.View; +import android.view.Window; +import android.view.WindowManager; import android.widget.TextView; import im.actor.core.entity.Avatar; @@ -46,6 +50,18 @@ protected void onCreate(Bundle savedInstanceState) { if (getSupportActionBar() != null && STYLE.getToolBarColor() != 0) { getSupportActionBar().setBackgroundDrawable(new ColorDrawable(STYLE.getToolBarColor())); } + + changeStatusBarColor(); + + } + + public void changeStatusBarColor(){ + Window window = getWindow(); + window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); + window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { + window.setStatusBarColor(STYLE.getStatusBarColor()); + } } @Override diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/activity/BaseFragmentActivity.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/activity/BaseFragmentActivity.java index 5a88b798b2..c318bb791b 100644 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/activity/BaseFragmentActivity.java +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/activity/BaseFragmentActivity.java @@ -1,18 +1,36 @@ package im.actor.sdk.controllers.activity; import android.graphics.drawable.ColorDrawable; +import android.os.Build; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentTransaction; +import android.support.v4.content.ContextCompat; import android.support.v7.app.ActionBar; import android.view.MenuItem; import android.view.ViewGroup; +import android.view.Window; +import android.view.WindowManager; import android.widget.FrameLayout; import im.actor.sdk.R; public class BaseFragmentActivity extends BaseActivity { + public static class CompleteCustonAnimation{ + int enter; + int exit; + int popEnter; + int popExit; + + public CompleteCustonAnimation(int enter, int exit, int popEnter, int popExit) { + this.enter = enter; + this.exit = exit; + this.popEnter = popEnter; + this.popExit = popExit; + } + } + @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); @@ -42,6 +60,17 @@ protected void onCreate(Bundle savedInstanceState) { // Setting Background Color getWindow().setBackgroundDrawable(new ColorDrawable(STYLE.getMainBackgroundColor())); + + changeStatusBarColor(); + } + + public void changeStatusBarColor(){ + Window window = getWindow(); + window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); + window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { + window.setStatusBarColor(STYLE.getStatusBarColor()); + } } public void showFragment(Fragment fragment, boolean addToBackStack) { @@ -62,11 +91,24 @@ public void showNextFragment(Fragment fragment, boolean addToBackStack) { transaction.commit(); } + public void showNextFragment(Fragment fragment, boolean addToBackStack, CompleteCustonAnimation cca) { + FragmentTransaction transaction = getSupportFragmentManager().beginTransaction(); + if(cca != null) + transaction.setCustomAnimations(cca.enter, cca.exit, cca.popEnter, cca.popExit); + + transaction.replace(R.id.content_frame, fragment); + if (addToBackStack) { + transaction.addToBackStack(null); + } + + transaction.commit(); + } + @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: - finish(); + onBackPressed(); return true; } return false; diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/auth/AuthActivity.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/auth/AuthActivity.java index 6058d95483..05886884ef 100644 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/auth/AuthActivity.java +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/auth/AuthActivity.java @@ -1,13 +1,20 @@ package im.actor.sdk.controllers.auth; +import android.Manifest; import android.app.AlertDialog; import android.app.ProgressDialog; import android.content.DialogInterface; import android.content.Intent; +import android.content.pm.PackageManager; import android.os.Bundle; +import android.support.v13.app.ActivityCompat; import android.support.v4.app.Fragment; +import android.support.v4.content.ContextCompat; import android.view.MenuItem; +import java.util.Observable; +import java.util.Observer; + import im.actor.core.AuthState; import im.actor.core.entity.AuthCodeRes; import im.actor.core.entity.AuthRes; @@ -31,7 +38,9 @@ import static im.actor.sdk.util.ActorSDKMessenger.messenger; -public class AuthActivity extends BaseFragmentActivity { +public class AuthActivity extends BaseFragmentActivity implements Observer{ + + private static final int PERMISSIONS_REQUEST_READ_SMS = 1; public static final String AUTH_TYPE_KEY = "auth_type"; public static final String SIGN_TYPE_KEY = "sign_type"; @@ -80,6 +89,8 @@ public Actor create() { String savedState = preferences.getString("auth_state"); state = Enum.valueOf(AuthState.class, savedState != null ? savedState : "AUTH_START"); updateState(state, true); + + SMSActivationObservable.getInstance().addObserver(this); } @@ -146,6 +157,13 @@ private void updateState(AuthState state, boolean force) { break; case CODE_VALIDATION_PHONE: case CODE_VALIDATION_EMAIL: + + if (ContextCompat.checkSelfPermission(this, android.Manifest.permission.READ_SMS) != PackageManager.PERMISSION_GRANTED) { + ActivityCompat.requestPermissions(this, + new String[]{Manifest.permission.READ_SMS}, + PERMISSIONS_REQUEST_READ_SMS); + } + Fragment signInFragment = new ValidateCodeFragment(); Bundle args = new Bundle(); @@ -477,6 +495,13 @@ public String getCurrentCode() { public String getTransactionHash() { return transactionHash; } + + @Override + public void update(Observable o, Object data) { + if(data instanceof String){ + validateCode(messenger().doValidateCode(data.toString(), getTransactionHash()), data.toString()); + } + } } diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/auth/BaseAuthFragment.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/auth/BaseAuthFragment.java index def1393158..9a862c9e45 100644 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/auth/BaseAuthFragment.java +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/auth/BaseAuthFragment.java @@ -249,40 +249,40 @@ public boolean onOptionsItemSelected(MenuItem item) { } else if (i == R.id.sign_up) { startSignUp(); return true; - } else if (i == R.id.change_endpoint) { - AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); - builder.setTitle(R.string.auth_change_endpoint); - - final EditText input = new EditText(getActivity()); - input.setText("tcp://"); - input.setSelection(input.getText().length()); - - int padding = Screen.dp(25); - FrameLayout inputContainer = new FrameLayout(getActivity()); - FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); - params.setMargins(padding, padding, padding, 0); - inputContainer.addView(input, params); - builder.setView(inputContainer); - - builder.setPositiveButton(R.string.dialog_ok, (dialog, which) -> { - try { - messenger().changeEndpoint(input.getText().toString()); - } catch (ConnectionEndpointArray.UnknownSchemeException e) { - Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show(); - } - }); - builder.setNegativeButton(R.string.auth_reset_default_endpoint, (dialog, which) -> { - try { - messenger().changeEndpoint(null); - } catch (ConnectionEndpointArray.UnknownSchemeException e) { - e.printStackTrace(); - } - }); - - builder.show(); - input.requestFocus(); - - return true; +// } else if (i == R.id.change_endpoint) { +// AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); +// builder.setTitle(R.string.auth_change_endpoint); +// +// final EditText input = new EditText(getActivity()); +// input.setText("tcp://"); +// input.setSelection(input.getText().length()); +// +// int padding = Screen.dp(25); +// FrameLayout inputContainer = new FrameLayout(getActivity()); +// FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); +// params.setMargins(padding, padding, padding, 0); +// inputContainer.addView(input, params); +// builder.setView(inputContainer); +// +// builder.setPositiveButton(R.string.dialog_ok, (dialog, which) -> { +// try { +// messenger().changeEndpoint(input.getText().toString()); +// } catch (ConnectionEndpointArray.UnknownSchemeException e) { +// Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show(); +// } +// }); +// builder.setNegativeButton(R.string.auth_reset_default_endpoint, (dialog, which) -> { +// try { +// messenger().changeEndpoint(null); +// } catch (ConnectionEndpointArray.UnknownSchemeException e) { +// e.printStackTrace(); +// } +// }); +// +// builder.show(); +// input.requestFocus(); +// +// return true; } else { return super.onOptionsItemSelected(item); } diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/auth/SMSActivationObservable.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/auth/SMSActivationObservable.java new file mode 100644 index 0000000000..e853067e39 --- /dev/null +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/auth/SMSActivationObservable.java @@ -0,0 +1,23 @@ +package im.actor.sdk.controllers.auth; + +import java.util.Observable; + +/** + * Created by 98379720172 on 25/10/16. + */ + +public class SMSActivationObservable extends Observable { + + private static SMSActivationObservable instance = new SMSActivationObservable(); + + public static SMSActivationObservable getInstance(){ + return instance; + } + + public void updateValue(Object data){ + synchronized (this){ + setChanged(); + notifyObservers(data); + } + } +} diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/auth/SignInFragment.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/auth/SignInFragment.java index bef363fbc0..6200e15296 100644 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/auth/SignInFragment.java +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/auth/SignInFragment.java @@ -3,6 +3,8 @@ import android.app.AlertDialog; import android.graphics.drawable.StateListDrawable; import android.os.Bundle; +import android.telephony.PhoneNumberFormattingTextWatcher; +import android.text.TextWatcher; import android.view.KeyEvent; import android.view.LayoutInflater; import android.view.Menu; @@ -20,6 +22,7 @@ import im.actor.sdk.R; import im.actor.sdk.util.Fonts; import im.actor.sdk.util.KeyboardHelper; +import im.actor.sdk.util.Mask; import im.actor.sdk.view.SelectorFactory; import static im.actor.sdk.util.ActorSDKMessenger.messenger; @@ -45,33 +48,6 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa initView(v); -// Get domain logo - -// logoActor = ActorSystem.system().actorOf(Props.create(LogoActor.class, new ActorCreator() { -// @Override -// public LogoActor create() { -// return new LogoActor(); -// } -// }), "actor/logo_actor"); -// -// logoActor.send(new LogoActor.AddCallback(new LogoActor.LogoCallBack() { -// @Override -// public void onDownloaded(final Drawable logoDrawable) { -// getActivity().runOnUiThread(new Runnable() { -// @Override -// public void run() { -// if (logoDrawable != null) { -// logo.setImageDrawable(logoDrawable); -// logo.measure(0, 0); -// expand(logo, logo.getMeasuredHeight()); -// } else { -// expand(logo, 0); -// } -// } -// }); -// } -// })); - return v; } @@ -122,6 +98,7 @@ public boolean onEditorAction(TextView textView, int id, KeyEvent keyEvent) { hint.setText(getString(R.string.sign_in_hint_phone_only)); signIdEditText.setHint(getString(R.string.sign_in_edit_text_hint_phone_only)); signIdEditText.setInputType(EditorInfo.TYPE_CLASS_PHONE); + signIdEditText.addTextChangedListener(Mask.telephoneMask(signIdEditText)); } else if ((availableAuthType & AuthActivity.AUTH_TYPE_EMAIL) == AuthActivity.AUTH_TYPE_EMAIL) { hint.setText(getString(R.string.sign_in_hint_email_only)); signIdEditText.setHint(getString(R.string.sign_in_edit_text_hint_email_only)); @@ -130,7 +107,6 @@ public boolean onEditorAction(TextView textView, int id, KeyEvent keyEvent) { } } - Button singUp = (Button) v.findViewById(R.id.button_sign_up); singUp.setTextColor(style.getTextSecondaryColor()); onClick(singUp, new View.OnClickListener() { @@ -165,7 +141,12 @@ private void requestCode() { startEmailAuth(rawId); } else { try { - startPhoneAuth(Long.parseLong(rawId.replace("+", ""))); + String numero = "55"+rawId.replaceAll("[^0-9]*", ""); + if(numero.length() < 12){ + throw new Exception("Numero invalido"); + }else{ + startPhoneAuth(Long.parseLong(numero)); + } } catch (Exception e) { new AlertDialog.Builder(getActivity()) .setMessage(message) @@ -180,11 +161,11 @@ private void requestCode() { public void onPrepareOptionsMenu(Menu menu) { super.onPrepareOptionsMenu(menu); menu.clear(); - getActivity().getMenuInflater().inflate(R.menu.sign_in, menu); - MenuItem item = menu.findItem(R.id.change_endpoint); - if (item != null) { - item.setVisible(ActorSDK.sharedActor().isUseAlternateEndpointsEnabled()); - } + // getActivity().getMenuInflater().inflate(R.menu.sign_in, menu); +// MenuItem item = menu.findItem(R.id.change_endpoint); +// if (item != null) { +// item.setVisible(ActorSDK.sharedActor().isUseAlternateEndpointsEnabled()); +// } } diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/auth/SignPhoneFragment.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/auth/SignPhoneFragment.java index 9f3c1a2625..08093d78ab 100644 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/auth/SignPhoneFragment.java +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/auth/SignPhoneFragment.java @@ -23,6 +23,7 @@ import im.actor.sdk.ActorSDK; import im.actor.sdk.R; import im.actor.sdk.util.Devices; +import im.actor.sdk.util.Mask; import im.actor.sdk.util.country.Country; import im.actor.sdk.util.country.Countries; import im.actor.sdk.util.Fonts; @@ -177,7 +178,10 @@ public void afterTextChanged(Editable s) { phoneNumberEditText = (BackspaceKeyEditText) v.findViewById(R.id.tv_phone_number); phoneNumberEditText.setTextColor(ActorSDK.sharedActor().style.getTextPrimaryColor()); - phoneNumberEditText.addTextChangedListener(new PhoneNumberFormattingTextWatcher()); + //phoneNumberEditText.addTextChangedListener(new PhoneNumberFormattingTextWatcher()); + + phoneNumberEditText.addTextChangedListener(Mask.telephoneMask(phoneNumberEditText)); + phoneNumberEditText.setBackspaceListener(new BackspaceKeyEditText.BackspacePressListener() { @Override public boolean onBackspacePressed() { @@ -273,6 +277,10 @@ public void onClick(View view) { requestCode(); } }); + + + setCountry(Countries.getInstance().getCountryByShortName("BR")); + } private void requestCode() { diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/auth/SignUpFragment.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/auth/SignUpFragment.java index 58342c54e4..091476f205 100644 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/auth/SignUpFragment.java +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/auth/SignUpFragment.java @@ -99,9 +99,9 @@ public void onPrepareOptionsMenu(Menu menu) { super.onPrepareOptionsMenu(menu); menu.clear(); getActivity().getMenuInflater().inflate(R.menu.sign_up, menu); - MenuItem item = menu.findItem(R.id.change_endpoint); - if (item != null) { - item.setVisible(ActorSDK.sharedActor().isUseAlternateEndpointsEnabled()); - } +// MenuItem item = menu.findItem(R.id.change_endpoint); +// if (item != null) { +// item.setVisible(ActorSDK.sharedActor().isUseAlternateEndpointsEnabled()); +// } } } \ No newline at end of file diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/auth/ValidateCodeFragment.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/auth/ValidateCodeFragment.java index 3891c773c6..519b99f2d0 100644 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/auth/ValidateCodeFragment.java +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/auth/ValidateCodeFragment.java @@ -1,9 +1,13 @@ package im.actor.sdk.controllers.auth; +import android.Manifest; import android.app.AlertDialog; import android.content.DialogInterface; +import android.content.pm.PackageManager; import android.graphics.drawable.StateListDrawable; import android.os.Bundle; +import android.support.v13.app.ActivityCompat; +import android.support.v4.content.ContextCompat; import android.text.Editable; import android.text.Html; import android.text.TextWatcher; @@ -29,6 +33,8 @@ public class ValidateCodeFragment extends BaseAuthFragment { + + public static final String AUTH_TYPE_EMAIL = "auth_type_email"; public static final String AUTH_TYPE_PHONE = "auth_type_phone"; public static final String AUTH_TYPE_SIGN = "auth_type_is_sign"; diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/conversation/ChatFragment.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/conversation/ChatFragment.java index dd8ac7f636..efd440d648 100644 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/conversation/ChatFragment.java +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/conversation/ChatFragment.java @@ -128,6 +128,9 @@ public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, if (fragment == null) { fragment = new AttachFragment(peer); } + + fragment.setAttachListener(inputBarFragment); + getFragmentManager().beginTransaction() .add(R.id.overlay, fragment) .commit(); diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/conversation/attach/AbsAttachFragment.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/conversation/attach/AbsAttachFragment.java index 8cbf2ca5bb..efde812cc9 100644 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/conversation/attach/AbsAttachFragment.java +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/conversation/attach/AbsAttachFragment.java @@ -4,10 +4,12 @@ import im.actor.core.entity.Peer; import im.actor.sdk.controllers.BaseFragment; +import im.actor.sdk.controllers.tools.AttachOpenCloseCallback; public abstract class AbsAttachFragment extends BaseFragment { private Peer peer; + protected AttachOpenCloseCallback attachListener; public AbsAttachFragment(Peer peer) { Bundle bundle = new Bundle(); @@ -23,6 +25,10 @@ public Peer getPeer() { return peer; } + public void setAttachListener(AttachOpenCloseCallback attachListener) { + this.attachListener = attachListener; + } + @Override public void onCreate(Bundle saveInstance) { super.onCreate(saveInstance); diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/conversation/attach/AttachFragment.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/conversation/attach/AttachFragment.java index f6142b8b5a..59d6b41879 100644 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/conversation/attach/AttachFragment.java +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/conversation/attach/AttachFragment.java @@ -15,6 +15,8 @@ import android.support.annotation.Nullable; import android.support.v4.content.ContextCompat; import android.support.v7.widget.GridLayoutManager; +import android.support.v7.widget.LinearLayoutCompat; +import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.util.Base64; import android.view.Gravity; @@ -38,6 +40,7 @@ import im.actor.runtime.collections.ManagedList; import im.actor.sdk.ActorSDK; import im.actor.sdk.R; +import im.actor.sdk.controllers.tools.AttachOpenCloseCallback; import im.actor.sdk.controllers.tools.MediaPickerCallback; import im.actor.sdk.controllers.tools.MediaPickerFragment; import im.actor.sdk.util.SDKFeatures; @@ -63,14 +66,17 @@ public class AttachFragment extends AbsAttachFragment implements MediaPickerCall private boolean isLoaded = false; private RecyclerView fastShare; - private View bottomBackground; + private FrameLayout bottomBackground; private boolean isFastShareFullScreen; - private GridLayoutManager layoutManager; + //private GridLayoutManager layoutManager; + private LinearLayoutManager layoutManager; private int shareIconSize; private View hideClone; private int fastShareWidth; private int spanCount; + + public AttachFragment(Peer peer) { super(peer); } @@ -83,16 +89,18 @@ public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); hide(); if (layoutManager != null) { - layoutManager = getGridLayoutManager(); + layoutManager = getLinearLayoutManager(); } root.removeAllViews(); isLoaded = false; } - protected GridLayoutManager getLayoutManager() { + protected LinearLayoutManager getLayoutManager() { return layoutManager; } + + @Nullable @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup fcontainer, @Nullable Bundle savedInstanceState) { @@ -107,10 +115,10 @@ public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup fcontainer @Override protected void onSizeChanged(int w, int h, int oldw, int oldh) { super.onSizeChanged(w, h, oldw, oldh); - if (h != oldh && shareButtons != null) { - shareButtons.getLayoutParams().height = root.getHeight() - Screen.dp(135); - shareButtons.requestLayout(); - } +// if (h != oldh && shareButtons != null) { + // shareButtons.getLayoutParams().height = root.getHeight() - Screen.dp(135); +// shareButtons.requestLayout(); +// } } }; root.setLayoutParams(new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, @@ -133,7 +141,7 @@ private void prepareView() { shareButtons = getLayoutInflater(null).inflate(R.layout.share_menu, root, false); fastShare = new RecyclerView(getActivity()); - fastShare.setOverScrollMode(View.OVER_SCROLL_NEVER); + //fastShare.setOverScrollMode(View.OVER_SCROLL_NEVER); shareButtons.findViewById(R.id.menu_bg).setBackgroundColor(style.getMainBackgroundColor()); shareButtons.findViewById(R.id.cancelField).setOnClickListener(view -> hide()); @@ -142,20 +150,20 @@ private void prepareView() { // Setup appearing hide button // isFastShareFullScreen = false; - fastShare.addOnScrollListener(new RecyclerView.OnScrollListener() { - @Override - public void onScrolled(RecyclerView recyclerView, int dx, int dy) { - boolean visible = layoutManager.findFirstVisibleItemPosition() == 0; - if (isFastShareFullScreen == visible) { - isFastShareFullScreen = !visible; - if (visible) { - hideView(hideClone); - } else { - showView(hideClone); - } - } - } - }); +// fastShare.addOnScrollListener(new RecyclerView.OnScrollListener() { +// @Override +// public void onScrolled(RecyclerView recyclerView, int dx, int dy) { +// boolean visible = layoutManager.findFirstVisibleItemPosition() == 0; +// if (isFastShareFullScreen == visible) { +// isFastShareFullScreen = !visible; +// if (visible) { +// hideView(hideClone); +// } else { +// showView(hideClone); +// } +// } +// } +// }); // // Building Menu Fields @@ -237,16 +245,21 @@ public void onScrolled(RecyclerView recyclerView, int dx, int dy) { fastAttachAdapter = new FastAttachAdapter(getActivity(), () -> fastShareWidth + 1); HeaderViewRecyclerAdapter adapter = new HeaderViewRecyclerAdapter(fastAttachAdapter); - adapter.addHeaderView(shareButtons); - layoutManager = getGridLayoutManager(); + + //adapter.addHeaderView(shareButtons); + //adapter.addFooterView(shareButtons); + // layoutManager = getGridLayoutManager(); + layoutManager = getLinearLayoutManager(); fastShare.setAdapter(adapter); fastShare.setLayoutManager(layoutManager); - layoutManager.setSpanSizeLookup(new GridLayoutManager.SpanSizeLookup() { - @Override - public int getSpanSize(int position) { - return position == 0 ? spanCount : 1; - } - }); +// layoutManager.setSpanSizeLookup(new GridLayoutManager.SpanSizeLookup() { +// @Override +// public int getSpanSize(int position) { +// return position == 0 ? spanCount : 1; +// } +// }); + + StateListDrawable background = ShareMenuButtonFactory.get(style.getMainColor(), getActivity()); final View.OnClickListener finalDefaultSendOcl = defaultSendOcl; @@ -283,24 +296,30 @@ public int getSpanSize(int position) { }); shareButtons.getLayoutParams().height = root.getHeight() - Screen.dp(135); - shareButtons.requestLayout(); - - bottomBackground = new View(getContext()); - FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, Screen.dp(135), Gravity.BOTTOM); + bottomBackground = new FrameLayout(getContext()); bottomBackground.setBackgroundColor(ActorSDK.sharedActor().style.getMainBackgroundColor()); - root.addView(bottomBackground, params); - root.addView(fastShare); - FrameLayout.LayoutParams params2 = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT, Gravity.BOTTOM | Gravity.RIGHT); - params2.setMargins(0, 0, Screen.dp(20), Screen.dp(20)); - root.addView(hideClone, params2); + + FrameLayout.LayoutParams paramsFastShare = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, Screen.dp(90)); + bottomBackground.addView(fastShare, paramsFastShare); + + FrameLayout.LayoutParams paramsShareButtons = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, Screen.dp(180)); + paramsShareButtons.setMargins(0, Screen.dp(90), 0, 0); + bottomBackground.addView(shareButtons, paramsShareButtons); + + FrameLayout.LayoutParams paramsBackground = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, Screen.dp(270), Gravity.BOTTOM | Gravity.RIGHT); + root.addView(bottomBackground, paramsBackground); + //shareButtons.requestLayout(); + //bottomBackground.requestLayout(); +// FrameLayout.LayoutParams params2 = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT, Gravity.BOTTOM | Gravity.RIGHT); +// params2.setMargins(0, 0, Screen.dp(20), Screen.dp(20)); +// root.addView(hideClone, params2); } - @NonNull - private GridLayoutManager getGridLayoutManager() { + private LinearLayoutManager getLinearLayoutManager(){ spanCount = Screen.getWidth() / Screen.dp(88); fastShareWidth = Screen.getWidth() / spanCount; - return new GridLayoutManager(getActivity(), spanCount); + return new LinearLayoutManager(getActivity(), LinearLayoutManager.HORIZONTAL, false); } private View instantiateShareMenuItem(ShareMenuField f) { @@ -343,6 +362,11 @@ private View instantiateShareMenuItem(ShareMenuField f) { @Override public void show() { + + if(attachListener != null){ + attachListener.onAttachOpen(); + } + prepareView(); if (root.getVisibility() == View.INVISIBLE) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { @@ -360,11 +384,13 @@ public void show() { onShown(); messenger().getGalleryScannerActor().send(new GalleryScannerActor.Show()); showView(root); - TranslateAnimation animation = new TranslateAnimation(0, 0, root.getHeight(), 0); - animation.setInterpolator(MaterialInterpolator.getInstance()); - animation.setDuration(200); + +// TranslateAnimation animation = new TranslateAnimation(0, 0, root.getHeight(), 0); +// animation.setInterpolator(MaterialInterpolator.getInstance()); +// animation.setDuration(200); // fastShare.startAnimation(animation); // bottomBackground.startAnimation(animation); + shareButtons.post(new Runnable() { @Override public void run() { @@ -381,11 +407,15 @@ public void run() { } }); + } } @Override public void hide() { + if(attachListener != null){ + attachListener.onAttachHide(); + } if (root != null && root.getVisibility() == View.VISIBLE) { onHidden(); fastAttachAdapter.clearSelected(); @@ -393,44 +423,44 @@ public void hide() { fastShare.scrollToPosition(0); hideView(root); +// if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP && !isFastShareFullScreen) { +// View internal = shareButtons; +// int cx = internal.getWidth() - Screen.dp(56 + 56); +// int cy = internal.getHeight() - Screen.dp(56 / 2); +// float finalRadius = (float) Math.hypot(cx, cy); +// Animator anim = ViewAnimationUtils.createCircularReveal(internal, cx, cy, finalRadius, 0); +// anim.addListener(new Animator.AnimatorListener() { +// @Override +// public void onAnimationStart(Animator animator) { +// internal.setAlpha(1); +// } +// +// @Override +// public void onAnimationEnd(Animator animator) { +// internal.setAlpha(0); +// } +// +// @Override +// public void onAnimationCancel(Animator animator) { +// +// } +// +// @Override +// public void onAnimationRepeat(Animator animator) { +// +// } +// }); +// +// anim.setDuration(200); +// anim.start(); +// } else { +// TranslateAnimation animation = new TranslateAnimation(0, 0, 0, root.getHeight()); +// animation.setInterpolator(MaterialInterpolator.getInstance()); +// animation.setDuration(250); +// fastShare.startAnimation(animation); +// bottomBackground.startAnimation(animation); +// } - if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP && !isFastShareFullScreen) { - View internal = fastShare; - int cx = internal.getWidth() - Screen.dp(56 + 56); - int cy = internal.getHeight() - Screen.dp(56 / 2); - float finalRadius = (float) Math.hypot(cx, cy); - Animator anim = ViewAnimationUtils.createCircularReveal(internal, cx, cy, finalRadius, 0); - anim.addListener(new Animator.AnimatorListener() { - @Override - public void onAnimationStart(Animator animator) { - internal.setAlpha(1); - } - - @Override - public void onAnimationEnd(Animator animator) { - internal.setAlpha(0); - } - - @Override - public void onAnimationCancel(Animator animator) { - - } - - @Override - public void onAnimationRepeat(Animator animator) { - - } - }); - - anim.setDuration(200); - anim.start(); - } else { - TranslateAnimation animation = new TranslateAnimation(0, 0, 0, root.getHeight()); - animation.setInterpolator(MaterialInterpolator.getInstance()); - animation.setDuration(250); - fastShare.startAnimation(animation); - bottomBackground.startAnimation(animation); - } } } diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/conversation/inputbar/InputBarFragment.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/conversation/inputbar/InputBarFragment.java index b4c8df0f88..6cac32ef06 100644 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/conversation/inputbar/InputBarFragment.java +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/conversation/inputbar/InputBarFragment.java @@ -37,21 +37,22 @@ import im.actor.sdk.controllers.BaseFragment; import im.actor.sdk.controllers.conversation.messages.MessagesDefaultFragment; import im.actor.sdk.controllers.conversation.messages.MessagesFragment; +import im.actor.sdk.controllers.tools.AttachOpenCloseCallback; import im.actor.sdk.core.audio.VoiceCaptureActor; import im.actor.sdk.util.KeyboardHelper; import im.actor.sdk.util.Screen; import im.actor.sdk.view.TintImageView; -import im.actor.sdk.view.emoji.SmileProcessor; import im.actor.sdk.view.emoji.keyboard.KeyboardStatusListener; +import im.actor.sdk.view.emoji.keyboard.emoji.Emoji; import im.actor.sdk.view.emoji.keyboard.emoji.EmojiKeyboard; import im.actor.sdk.view.markdown.AndroidMarkdown; import static im.actor.sdk.util.ActorSDKMessenger.messenger; import static im.actor.sdk.util.ViewUtils.zoomInView; import static im.actor.sdk.util.ViewUtils.zoomOutView; -import static im.actor.sdk.view.emoji.SmileProcessor.emoji; -public class InputBarFragment extends BaseFragment implements MessagesDefaultFragment.NewMessageListener { +public class InputBarFragment extends BaseFragment implements MessagesDefaultFragment.NewMessageListener, + AttachOpenCloseCallback { private static final int SLIDE_LIMIT = Screen.dp(180); private static final int PERMISSION_REQUEST_RECORD_AUDIO = 1; @@ -174,7 +175,6 @@ public void afterTextChanged(Editable editable) { } }); - // // Send Button // @@ -198,7 +198,9 @@ public void afterTextChanged(Editable editable) { // Emoji keyboard // emojiButton = (ImageView) res.findViewById(R.id.ib_emoji); - emojiButton.setOnClickListener(v -> emojiKeyboard.toggle()); + emojiButton.setOnClickListener(v -> { + emojiKeyboard.toggle(); + }); emojiKeyboard = getEmojiKeyboard(); emojiKeyboard.setOnStickerClickListener(sticker -> { Fragment parent = getParentFragment(); @@ -292,8 +294,7 @@ public void setText(String text) { public void setText(String text, boolean selectAll) { isTypingDisabled = true; Spannable spantext = AndroidMarkdown.processOnlyLinks(text); - spantext = emoji().processEmojiCompatMutable(spantext, SmileProcessor.CONFIGURATION_BUBBLES); - messageEditText.setText(spantext); + messageEditText.setText(Emoji.replaceEmoji(spantext, messageEditText.getPaint().getFontMetricsInt(), Screen.dp(20), false)); if (selectAll) { messageEditText.setSelection(messageEditText.getText().length()); } @@ -618,7 +619,7 @@ public void onSaveInstanceState(Bundle outState) { @Override public void onDestroyView() { super.onDestroyView(); - emojiKeyboard.release(); + //emojiKeyboard.release(); emojiKeyboard = null; } @@ -645,4 +646,16 @@ public void onNewMessage(Message m) { ((MessagesFragment.NewMessageListener) emojiKeyboard).onNewMessage(m); } } + + @Override + public void onAttachOpen() { + if(emojiKeyboard.isShowing()) { + emojiKeyboard.dismiss(true); + } + } + + @Override + public void onAttachHide() { + + } } \ No newline at end of file diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/conversation/messages/content/TextHolder.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/conversation/messages/content/TextHolder.java index bb38af7ec4..5df51d1024 100644 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/conversation/messages/content/TextHolder.java +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/conversation/messages/content/TextHolder.java @@ -1,6 +1,9 @@ package im.actor.sdk.controllers.conversation.messages.content; +import android.graphics.Paint; import android.text.Spannable; +import android.text.SpannableStringBuilder; +import android.text.TextPaint; import android.text.method.LinkMovementMethod; import android.view.MotionEvent; import android.view.View; @@ -16,7 +19,9 @@ import im.actor.sdk.controllers.conversation.messages.content.preprocessor.PreprocessedData; import im.actor.sdk.controllers.conversation.messages.content.preprocessor.PreprocessedTextData; import im.actor.sdk.util.Fonts; +import im.actor.sdk.util.Screen; import im.actor.sdk.view.TintImageView; +import im.actor.sdk.view.emoji.keyboard.emoji.Emoji; import static im.actor.sdk.util.ActorSDKMessenger.myUid; @@ -25,6 +30,9 @@ public class TextHolder extends MessageHolder { protected ViewGroup mainContainer; protected FrameLayout messageBubble; protected TextView text; + + protected TextPaint emojiTextPaint; + protected TextView time; protected TintImageView status; @@ -43,6 +51,9 @@ public TextHolder(MessagesAdapter adapter, final View itemView, Peer peer) { text.setTextColor(ActorSDK.sharedActor().style.getConvTextColor()); text.setTypeface(Fonts.regular()); + emojiTextPaint = new TextPaint(); + emojiTextPaint.setTextSize(Screen.sp(25)); + time = (TextView) itemView.findViewById(R.id.tv_time); ActorSDK.sharedActor().style.getConvTimeColor(); time.setTypeface(Fonts.regular()); @@ -63,10 +74,11 @@ protected void bindData(final Message message, long readDate, long receiveDate, PreprocessedTextData textData = (PreprocessedTextData) preprocessedData; Spannable reactions = preprocessedData.getReactionsSpannable(); CharSequence text; + if (textData.getSpannableString() != null) { - text = textData.getSpannableString(); + text = Emoji.replaceEmoji(textData.getSpannableString(), emojiTextPaint.getFontMetricsInt(), Screen.dp(40), false); } else { - text = textData.getText(); + text = Emoji.replaceEmoji(new SpannableStringBuilder(textData.getText()), emojiTextPaint.getFontMetricsInt(), Screen.dp(40), false); } bindRawText(text, readDate, receiveDate, reactions, message, false); } diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/conversation/messages/content/preprocessor/ChatListProcessor.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/conversation/messages/content/preprocessor/ChatListProcessor.java index ee473ccdb9..fcefaae465 100644 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/conversation/messages/content/preprocessor/ChatListProcessor.java +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/conversation/messages/content/preprocessor/ChatListProcessor.java @@ -6,6 +6,7 @@ import android.text.SpannableString; import android.text.SpannableStringBuilder; import android.text.Spanned; +import android.text.TextPaint; import android.text.style.ForegroundColorSpan; import android.text.style.URLSpan; import android.text.util.Linkify; @@ -36,11 +37,9 @@ import im.actor.sdk.controllers.conversation.view.MentionSpan; import im.actor.sdk.controllers.conversation.view.ReactionSpan; import im.actor.sdk.view.BaseUrlSpan; -import im.actor.sdk.view.emoji.SmileProcessor; import im.actor.sdk.view.markdown.AndroidMarkdown; import im.actor.runtime.generic.mvvm.ListProcessor; -import static im.actor.sdk.view.emoji.SmileProcessor.emoji; import static im.actor.sdk.util.ActorSDKMessenger.groups; import static im.actor.sdk.util.ActorSDKMessenger.messenger; import static im.actor.sdk.util.ActorSDKMessenger.myUid; @@ -130,7 +129,7 @@ public Object process(@NotNull List items, @Nullable Object previous) { boolean hasSpannable = false; // Wait Emoji to load - emoji().waitForEmoji(); + // Emoji.waitForEmoji(); // Process markdown Spannable markdown = AndroidMarkdown.processText(text.getText()); @@ -181,10 +180,15 @@ public Object process(@NotNull List items, @Nullable Object previous) { } // Process Emoji - if (SmileProcessor.containsEmoji(spannableString)) { - spannableString = emoji().processEmojiCompatMutable(spannableString, SmileProcessor.CONFIGURATION_BUBBLES); - hasSpannable = true; - } +// if (SmileProcessor.containsEmoji(spannableString)) { +// spannableString = emoji().processEmojiCompatMutable(spannableString, SmileProcessor.CONFIGURATION_BUBBLES); +// hasSpannable = true; +// } + + +// spannableString = new SpannableString(Emoji.replaceEmoji(spannableString+"ffff", new TextPaint(Paint.ANTI_ALIAS_FLAG | Paint.SUBPIXEL_TEXT_FLAG).getFontMetricsInt(), Screen.dp(20), false)); +// hasSpannable = true; + updatedTexts.put(msg.getRid(), updatedCounter); preprocessedTexts.put(msg.getRid(), new PreprocessedTextData(reactions, text.getText(), hasSpannable ? spannableString : null)); diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/conversation/view/BubbleContainer.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/conversation/view/BubbleContainer.java index e9e86025ec..d9be1b2f58 100644 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/conversation/view/BubbleContainer.java +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/conversation/view/BubbleContainer.java @@ -105,7 +105,7 @@ private void init() { // AVATAR avatarView = new AvatarViewWithOnline(getContext()); avatarView.init(Screen.dp(42), 18); - addView(avatarView, new MarginLayoutParams(Screen.dp(42), Screen.dp(42))); + addView(avatarView, new MarginLayoutParams(Screen.dp(40), Screen.dp(40))); } public OnAvatarClickListener getOnClickListener() { @@ -241,7 +241,7 @@ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { int topOffset = 0; View messageView = findMessageView(); - int padding = Screen.dp(8); + int padding = Screen.dp(6); if (showAvatar) { padding += Screen.dp(48); } diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/dialogs/view/DialogView.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/dialogs/view/DialogView.java index 146cc812a2..3669f45b62 100644 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/dialogs/view/DialogView.java +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/dialogs/view/DialogView.java @@ -44,10 +44,10 @@ import im.actor.sdk.util.Screen; import im.actor.sdk.view.ListItemBackgroundView; import im.actor.sdk.view.TintDrawable; -import im.actor.sdk.view.emoji.SmileProcessor; +import im.actor.sdk.view.emoji.keyboard.emoji.Emoji; import static im.actor.sdk.util.ActorSDKMessenger.messenger; -import static im.actor.sdk.view.emoji.SmileProcessor.emoji; +import static im.actor.sdk.util.ActorSDKMessenger.users; public class DialogView extends ListItemBackgroundView { @@ -80,7 +80,7 @@ public class DialogView extends ListItemBackgroundView privateTypingListener; private ValueChangedListener groupTypingListener; - private boolean isPrivateTyping; + private boolean isTyping; public DialogView(Context context) { super(context); @@ -176,9 +176,7 @@ protected void onDraw(Canvas canvas) { // // Content // - - // TODO: Implement Group Typing - if (isPrivateTyping) { + if (isTyping) { canvas.drawText(typingText, Screen.dp(72), Screen.dp(54), textActivePaint); } else { if (layout.getTextLayout() != null) { @@ -225,24 +223,28 @@ public void bind(Dialog dialog) { if (dialog.getPeer().getPeerType() == PeerType.PRIVATE) { bindedUid = dialog.getPeer().getPeerId(); - ValueModel typingModel = messenger().getTyping(bindedUid); - privateTypingListener = (val, Value) -> { - isPrivateTyping = val; + typingText = messenger().getFormatter().formatTyping(); + isTyping = val; invalidate(); }; typingModel.subscribe(privateTypingListener, false); - isPrivateTyping = typingModel.get(); + isTyping = typingModel.get(); } else if (dialog.getPeer().getPeerType() == PeerType.GROUP) { bindedGid = dialog.getPeer().getPeerId(); - isPrivateTyping = false; -// groupTypingListener = (val, Value) -> { -// // TODO: Implement Group Typing -// }; -// messenger().getGroupTyping(bindedGid).subscribe(groupTypingListener); + groupTypingListener = (val, Value) -> { + isTyping = val.length > 0; + if (val.length == 1) { + typingText = messenger().getFormatter().formatTyping(users().get(val[0]).getName().get()); + } else if(val.length > 1) { + typingText = messenger().getFormatter().formatTyping(val.length); + } + invalidate(); + }; + messenger().getGroupTyping(bindedGid).subscribe(groupTypingListener); } else { - isPrivateTyping = false; + isTyping = false; } } @@ -278,7 +280,7 @@ public DialogLayout buildLayout(Dialog arg, int width, int height) { avatarBorder.setStrokeWidth(1); avatarTextColor = createTextPaint(Fonts.regular(), 20, Color.WHITE); avatarTextColor.setTextAlign(Paint.Align.CENTER); - typingText = messenger().getFormatter().formatTyping(); + stateSent = new TintDrawable(context.getResources().getDrawable(R.drawable.msg_check_1), style.getDialogsStateSentColor()); @@ -396,7 +398,7 @@ public void onDownloaded(FileSystemReference reference) { if (arg.getPeer().getPeerType() == PeerType.GROUP) { if (messenger().getFormatter().isLargeDialogMessage(arg.getMessageType())) { - res.setTextLayout(singleLineText(handleEmoji(contentText), textActivePaint, maxWidth)); + res.setTextLayout(singleLineText(Emoji.replaceEmoji(contentText, textActivePaint.getFontMetricsInt(), Screen.dp(17), false), textActivePaint, maxWidth)); } else { String senderName = messenger().getFormatter().formatPerformerName(arg.getSenderId()) + ": "; if (arg.getMessageType() == ContentType.TEXT) { @@ -406,15 +408,16 @@ public void onDownloaded(FileSystemReference reference) { builder.append(contentText); res.setTextLayout(singleLineText(builder, textPaint, maxWidth)); } else { - CharSequence contentResult = handleEmoji(senderName, contentText); + CharSequence contentResult = new StringBuilder(Emoji.replaceEmoji(senderName, textActivePaint.getFontMetricsInt(), Screen.dp(17), false)) + .append(Emoji.replaceEmoji(contentText, textActivePaint.getFontMetricsInt(), Screen.dp(17), false)); res.setTextLayout(singleLineText(contentResult, textActivePaint, maxWidth)); } } } else { if (arg.getMessageType() == ContentType.TEXT) { - res.setTextLayout(singleLineText(handleEmoji(contentText), textPaint, maxWidth)); + res.setTextLayout(singleLineText(Emoji.replaceEmoji(contentText, textPaint.getFontMetricsInt(), Screen.dp(17), false), textPaint, maxWidth)); } else { - res.setTextLayout(singleLineText(handleEmoji(contentText), textActivePaint, maxWidth)); + res.setTextLayout(singleLineText(Emoji.replaceEmoji(contentText, textActivePaint.getFontMetricsInt(), Screen.dp(17), false), textActivePaint, maxWidth)); } } } @@ -439,22 +442,6 @@ public void layoutReady(DialogLayout res) { } } - private CharSequence handleEmoji(CharSequence... args) { - StringBuilder builder = new StringBuilder(); - for (CharSequence seq : args) { - if (SmileProcessor.containsEmoji(seq)) { - if (emoji().isLoaded()) { - builder.append(emoji().processEmojiCompatMutable(seq, SmileProcessor.CONFIGURATION_BUBBLES)); - } else { - builder.append(seq); - } - } else { - builder.append(seq); - } - } - return builder; - } - private CharSequence buildShortName(String name) { if (name == null) { name = "?"; @@ -471,8 +458,7 @@ private CharSequence buildShortName(String name) { } } } - - return handleEmoji(name); + return Emoji.replaceEmoji(name, textPaint.getFontMetricsInt(), Screen.dp(20), false); } private AvatarImage getAvatarImage(Avatar avatar) { @@ -486,7 +472,7 @@ public void unbind() { if (privateTypingListener != null) { messenger().getTyping(bindedUid).unsubscribe(privateTypingListener); - isPrivateTyping = false; + isTyping = false; privateTypingListener = null; } diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/tools/AttachOpenCloseCallback.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/tools/AttachOpenCloseCallback.java new file mode 100644 index 0000000000..4b0713e07c --- /dev/null +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/tools/AttachOpenCloseCallback.java @@ -0,0 +1,11 @@ +package im.actor.sdk.controllers.tools; + +/** + * Created by 98379720172 on 17/01/17. + */ + +public interface AttachOpenCloseCallback { + + void onAttachOpen(); + void onAttachHide(); +} diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/core/AndroidNotifications.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/core/AndroidNotifications.java index 0a925c48cc..b3bd4f210d 100644 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/core/AndroidNotifications.java +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/core/AndroidNotifications.java @@ -228,7 +228,10 @@ public void onDownloaded(FileSystemReference reference) { builder.setContentText(messagesCount + context.getString(R.string.notification_multiple_canversations_after_msg_count) + conversationsCount + context.getString(R.string.notifications_multiple_canversations_after_coversations_count)); visiblePeer = null; - intent = new Intent(context, RootActivity.class); + + intent = new Intent(context, ActorSDK.sharedActor().getDelegate().getNotificationIntentClass()); + + intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); builder.setContentIntent(PendingIntent.getActivity(context, 0, intent, diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/AndroidUtils.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/AndroidUtils.java new file mode 100644 index 0000000000..981f0f23a3 --- /dev/null +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/AndroidUtils.java @@ -0,0 +1,64 @@ +package im.actor.sdk.util; + +import android.os.Build; +import android.widget.AbsListView; +import android.widget.EdgeEffect; + +import java.lang.reflect.Field; + +import im.actor.runtime.Log; +import im.actor.runtime.android.AndroidContext; +import im.actor.sdk.ActorSDK; +import im.actor.sdk.R; + +/** + * Created by 98379720172 on 05/01/17. + */ + +public class AndroidUtils { + + private static Boolean isTablet = null; + + private static String TAG = AndroidUtils.class.getName(); + + public static boolean isTablet() { + if (isTablet == null) { + isTablet = AndroidContext.getContext().getResources().getBoolean(R.bool.isTablet); + } + return isTablet; + } + + public static void runOnUIThread(Runnable runnable, long delay) { + if (delay == 0) { + AndroidContext.applicationHandler().post(runnable); + } else { + AndroidContext.applicationHandler().postDelayed(runnable, delay); + } + } + + public static void runOnUIThread(Runnable runnable) { + runOnUIThread(runnable, 0); + } + + public static void setListViewEdgeEffectColor(AbsListView listView, int color) { + if (Build.VERSION.SDK_INT >= 21) { + try { + Field field = AbsListView.class.getDeclaredField("mEdgeGlowTop"); + field.setAccessible(true); + EdgeEffect mEdgeGlowTop = (EdgeEffect) field.get(listView); + if (mEdgeGlowTop != null) { + mEdgeGlowTop.setColor(color); + } + + field = AbsListView.class.getDeclaredField("mEdgeGlowBottom"); + field.setAccessible(true); + EdgeEffect mEdgeGlowBottom = (EdgeEffect) field.get(listView); + if (mEdgeGlowBottom != null) { + mEdgeGlowBottom.setColor(color); + } + } catch (Exception e) { + Log.e(TAG, e); + } + } + } +} diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/DispatchQueue.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/DispatchQueue.java new file mode 100644 index 0000000000..e8f78ec390 --- /dev/null +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/DispatchQueue.java @@ -0,0 +1,83 @@ +package im.actor.sdk.util; + +/** + * Created by 98379720172 on 06/01/17. + */ + + +import android.os.Handler; +import android.os.Looper; +import android.os.Message; + +import java.util.concurrent.CountDownLatch; + +import im.actor.runtime.Log; + +public class DispatchQueue extends Thread { + + private volatile Handler handler = null; + private CountDownLatch syncLatch = new CountDownLatch(1); + + private static String TAG = DispatchQueue.class.getName(); + + public DispatchQueue(final String threadName) { + setName(threadName); + start(); + } + + private void sendMessage(Message msg, int delay) { + try { + syncLatch.await(); + if (delay <= 0) { + handler.sendMessage(msg); + } else { + handler.sendMessageDelayed(msg, delay); + } + } catch (Exception e) { + Log.e(TAG, e); + } + } + + public void cancelRunnable(Runnable runnable) { + try { + syncLatch.await(); + handler.removeCallbacks(runnable); + } catch (Exception e) { + Log.e(TAG, e); + } + } + + public void postRunnable(Runnable runnable) { + postRunnable(runnable, 0); + } + + public void postRunnable(Runnable runnable, long delay) { + try { + syncLatch.await(); + if (delay <= 0) { + handler.post(runnable); + } else { + handler.postDelayed(runnable, delay); + } + } catch (Exception e) { + Log.e(TAG, e); + } + } + + public void cleanupQueue() { + try { + syncLatch.await(); + handler.removeCallbacksAndMessages(null); + } catch (Exception e) { + Log.e(TAG, e); + } + } + + @Override + public void run() { + Looper.prepare(); + handler = new Handler(); + syncLatch.countDown(); + Looper.loop(); + } +} diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/LayoutHelper.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/LayoutHelper.java new file mode 100644 index 0000000000..a2b1e9d30c --- /dev/null +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/LayoutHelper.java @@ -0,0 +1,127 @@ +package im.actor.sdk.util; + +import android.widget.FrameLayout; +import android.widget.LinearLayout; +import android.widget.RelativeLayout; +import android.widget.ScrollView; + +/** + * Created by 98379720172 on 08/01/17. + */ + +public class LayoutHelper { + + public static final int MATCH_PARENT = -1; + public static final int WRAP_CONTENT = -2; + + private static int getSize(float size) { + return (int) (size < 0 ? size : Screen.dp(size)); + } + + public static FrameLayout.LayoutParams createScroll(int width, int height, int gravity) { + return new ScrollView.LayoutParams(getSize(width), getSize(height), gravity); + } + + public static FrameLayout.LayoutParams createFrame(int width, float height, int gravity, float leftMargin, float topMargin, float rightMargin, float bottomMargin) { + FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(getSize(width), getSize(height), gravity); + layoutParams.setMargins(Screen.dp(leftMargin), Screen.dp(topMargin), Screen.dp(rightMargin), Screen.dp(bottomMargin)); + return layoutParams; + } + + public static FrameLayout.LayoutParams createFrame(int width, int height, int gravity) { + return new FrameLayout.LayoutParams(getSize(width), getSize(height), gravity); + } + + public static FrameLayout.LayoutParams createFrame(int width, float height) { + return new FrameLayout.LayoutParams(getSize(width), getSize(height)); + } + + public static RelativeLayout.LayoutParams createRelative(float width, float height, int leftMargin, int topMargin, int rightMargin, int bottomMargin, int alignParent, int alignRelative, int anchorRelative) { + RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(getSize(width), getSize(height)); + if (alignParent >= 0) { + layoutParams.addRule(alignParent); + } + if (alignRelative >= 0 && anchorRelative >= 0) { + layoutParams.addRule(alignRelative, anchorRelative); + } + layoutParams.leftMargin = Screen.dp(leftMargin); + layoutParams.topMargin = Screen.dp(topMargin); + layoutParams.rightMargin = Screen.dp(rightMargin); + layoutParams.bottomMargin = Screen.dp(bottomMargin); + return layoutParams; + } + + public static RelativeLayout.LayoutParams createRelative(int width, int height, int leftMargin, int topMargin, int rightMargin, int bottomMargin) { + return createRelative(width, height, leftMargin, topMargin, rightMargin, bottomMargin, -1, -1, -1); + } + + public static RelativeLayout.LayoutParams createRelative(int width, int height, int leftMargin, int topMargin, int rightMargin, int bottomMargin, int alignParent) { + return createRelative(width, height, leftMargin, topMargin, rightMargin, bottomMargin, alignParent, -1, -1); + } + + public static RelativeLayout.LayoutParams createRelative(float width, float height, int leftMargin, int topMargin, int rightMargin, int bottomMargin, int alignRelative, int anchorRelative) { + return createRelative(width, height, leftMargin, topMargin, rightMargin, bottomMargin, -1, alignRelative, anchorRelative); + } + + public static RelativeLayout.LayoutParams createRelative(int width, int height, int alignParent, int alignRelative, int anchorRelative) { + return createRelative(width, height, 0, 0, 0, 0, alignParent, alignRelative, anchorRelative); + } + + public static RelativeLayout.LayoutParams createRelative(int width, int height) { + return createRelative(width, height, 0, 0, 0, 0, -1, -1, -1); + } + + public static RelativeLayout.LayoutParams createRelative(int width, int height, int alignParent) { + return createRelative(width, height, 0, 0, 0, 0, alignParent, -1, -1); + } + + public static RelativeLayout.LayoutParams createRelative(int width, int height, int alignRelative, int anchorRelative) { + return createRelative(width, height, 0, 0, 0, 0, -1, alignRelative, anchorRelative); + } + + public static LinearLayout.LayoutParams createLinear(int width, int height, float weight, int gravity, int leftMargin, int topMargin, int rightMargin, int bottomMargin) { + LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(getSize(width), getSize(height), weight); + layoutParams.setMargins(Screen.dp(leftMargin), Screen.dp(topMargin), Screen.dp(rightMargin), Screen.dp(bottomMargin)); + layoutParams.gravity = gravity; + return layoutParams; + } + + public static LinearLayout.LayoutParams createLinear(int width, int height, float weight, int leftMargin, int topMargin, int rightMargin, int bottomMargin) { + LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(getSize(width), getSize(height), weight); + layoutParams.setMargins(Screen.dp(leftMargin), Screen.dp(topMargin), Screen.dp(rightMargin), Screen.dp(bottomMargin)); + return layoutParams; + } + + public static LinearLayout.LayoutParams createLinear(int width, int height, int gravity, int leftMargin, int topMargin, int rightMargin, int bottomMargin) { + LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(getSize(width), getSize(height)); + layoutParams.setMargins(Screen.dp(leftMargin), Screen.dp(topMargin), Screen.dp(rightMargin), Screen.dp(bottomMargin)); + layoutParams.gravity = gravity; + return layoutParams; + } + + public static LinearLayout.LayoutParams createLinear(int width, int height, float leftMargin, float topMargin, float rightMargin, float bottomMargin) { + LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(getSize(width), getSize(height)); + layoutParams.setMargins(Screen.dp(leftMargin), Screen.dp(topMargin), Screen.dp(rightMargin), Screen.dp(bottomMargin)); + return layoutParams; + } + + public static LinearLayout.LayoutParams createLinear(int width, int height, float weight, int gravity) { + LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(getSize(width), getSize(height), weight); + layoutParams.gravity = gravity; + return layoutParams; + } + + public static LinearLayout.LayoutParams createLinear(int width, int height, int gravity) { + LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(getSize(width), getSize(height)); + layoutParams.gravity = gravity; + return layoutParams; + } + + public static LinearLayout.LayoutParams createLinear(int width, int height, float weight) { + return new LinearLayout.LayoutParams(getSize(width), getSize(height), weight); + } + + public static LinearLayout.LayoutParams createLinear(int width, int height) { + return new LinearLayout.LayoutParams(getSize(width), getSize(height)); + } +} diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/Mask.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/Mask.java new file mode 100644 index 0000000000..e9a545a31f --- /dev/null +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/Mask.java @@ -0,0 +1,104 @@ +package im.actor.sdk.util; + +import android.text.Editable; +import android.text.InputType; +import android.text.TextWatcher; +import android.text.method.NumberKeyListener; +import android.widget.EditText; + +/** + * Created by 98379720172 on 18/08/2016. + */ +public abstract class Mask { + + private static int positioning[] = { 1, 2, 3, 6, 7, 8, 9, 11, 12, 13, 14, 15 }; + + private final static KeylistenerNumber keylistenerNumber = new KeylistenerNumber(); + + private static class KeylistenerNumber extends NumberKeyListener { + public int getInputType() { + return InputType.TYPE_CLASS_NUMBER + | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS; + + } + @Override + protected char[] getAcceptedChars() { + return new char[] { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' }; + } + } + + public static TextWatcher telephoneMask(final EditText ediTxt) { + + final int maxNumberLength = 11; + + ediTxt.setKeyListener(keylistenerNumber); + ediTxt.setText("(--) ----- ----"); + + ediTxt.postDelayed(()->{ + ediTxt.setSelection(1); + },50); + + return new TextWatcher() { + boolean isUpdating; + String old = ""; + + public void onTextChanged(CharSequence s, int start, int before, + int count) { + } + + public void beforeTextChanged(CharSequence s, int start, int count, + int after) { + } + + public void afterTextChanged(Editable s) { + String current = s.toString(); + + if (isUpdating) { + isUpdating = false; + return; + + } + + String number = current.replaceAll("[^0-9]*", ""); + if (number.length() > 11) + number = number.substring(0, 11); + + int length = number.length(); + + String paddedNumber = padNumber(number, maxNumberLength); + + String ddd = ""; + String part1 = ""; + String part2 = ""; + String phone = ""; + + if(length < 11){ + ddd = paddedNumber.substring(0, 2); + part1 = paddedNumber.substring(2, 6); + part2 = paddedNumber.substring(6, paddedNumber.length()).trim(); + }else{ + ddd = paddedNumber.substring(0, 2); + part1 = paddedNumber.substring(2, 7); + part2 = paddedNumber.substring(7, paddedNumber.length()).trim(); + } + + phone = "(" + ddd + ") " + part1 + " " + part2; + + isUpdating = true; + + ediTxt.setText(phone); + ediTxt.setSelection(positioning[length]); + } + }; + } + + private static String padNumber(String number, int maxLength) { + String padded = new String(number); + for (int i = 0; i < maxLength - number.length(); i++) + padded += "-"; + + return padded; + + } + +} diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/Screen.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/Screen.java index 2cde4c7d73..f9d14a38a7 100644 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/Screen.java +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/Screen.java @@ -1,19 +1,30 @@ package im.actor.sdk.util; +import android.content.Context; +import android.content.res.Configuration; import android.content.res.Resources; +import android.graphics.Point; +import android.util.DisplayMetrics; +import android.view.Display; +import android.view.WindowManager; +import im.actor.runtime.Log; import im.actor.runtime.android.AndroidContext; public class Screen { private static float density; private static float scaledDensity; + public static Point displaySize = new Point(); + public static boolean usingHardwareInput; + public static DisplayMetrics displayMetrics = new DisplayMetrics(); - public static int dp(float dp) { - if (density == 0f) - density = AndroidContext.getContext().getResources().getDisplayMetrics().density; + static { + checkDisplaySize(AndroidContext.getContext(), null); + } - return (int) (dp * density + .5f); + public static int dp(float dp) { + return (int) (dp * getDensity() + .5f); } public static int sp(float sp) { @@ -58,6 +69,54 @@ public static boolean hasNavigationBar() { } public static float getDensity() { + if (density == 0f) + density = AndroidContext.getContext().getResources().getDisplayMetrics().density; + return density; } + + public static void checkDisplaySize(Context context, Configuration newConfiguration) { + try { + density = context.getResources().getDisplayMetrics().density; + Configuration configuration = newConfiguration; + if (configuration == null) { + configuration = context.getResources().getConfiguration(); + } + usingHardwareInput = configuration.keyboard != Configuration.KEYBOARD_NOKEYS && configuration.hardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_NO; + WindowManager manager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE); + if (manager != null) { + Display display = manager.getDefaultDisplay(); + if (display != null) { + display.getMetrics(displayMetrics); + display.getSize(displaySize); + } + } + if (configuration.screenWidthDp != Configuration.SCREEN_WIDTH_DP_UNDEFINED) { + int newSize = (int) Math.ceil(configuration.screenWidthDp * density); + if (Math.abs(displaySize.x - newSize) > 3) { + displaySize.x = newSize; + } + } + if (configuration.screenHeightDp != Configuration.SCREEN_HEIGHT_DP_UNDEFINED) { + int newSize = (int) Math.ceil(configuration.screenHeightDp * density); + if (Math.abs(displaySize.y - newSize) > 3) { + displaySize.y = newSize; + } + } + } catch (Exception e) { + Log.e(Screen.class.getName(), e); + } + } + + public static float dpf2(float value) { + if (value == 0) { + return 0; + } + return getDensity() * value; + } + + public static float getPixelsInCM(float cm, boolean isX) { + return (cm / 2.54f) * (isX ? displayMetrics.xdpi : displayMetrics.ydpi); + } + } \ No newline at end of file diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/Utilities.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/Utilities.java new file mode 100644 index 0000000000..96471417e0 --- /dev/null +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/Utilities.java @@ -0,0 +1,89 @@ +package im.actor.sdk.util; + +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import im.actor.runtime.Log; + +/** + * Created by 98379720172 on 06/01/17. + */ + +public class Utilities { + + private static String TAG = Utilities.class.getName(); + + public static Pattern pattern = Pattern.compile("[\\-0-9]+"); + public static volatile DispatchQueue globalQueue = new DispatchQueue("globalQueue"); + + final protected static char[] hexArray = "0123456789ABCDEF".toCharArray(); + + public static Integer parseInt(String value) { + if (value == null) { + return 0; + } + Integer val = 0; + try { + Matcher matcher = pattern.matcher(value); + if (matcher.find()) { + String num = matcher.group(0); + val = Integer.parseInt(num); + } + } catch (Exception e) { + Log.e(TAG, e); + } + return val; + } + + public static Long parseLong(String value) { + if (value == null) { + return 0L; + } + Long val = 0L; + try { + Matcher matcher = pattern.matcher(value); + if (matcher.find()) { + String num = matcher.group(0); + val = Long.parseLong(num); + } + } catch (Exception e) { + Log.e(TAG, e); + } + return val; + } + + public static String parseIntToString(String value) { + Matcher matcher = pattern.matcher(value); + if (matcher.find()) { + return matcher.group(0); + } + return null; + } + + public static String bytesToHex(byte[] bytes) { + if (bytes == null) { + return ""; + } + char[] hexChars = new char[bytes.length * 2]; + int v; + for (int j = 0; j < bytes.length; j++) { + v = bytes[j] & 0xFF; + hexChars[j * 2] = hexArray[v >>> 4]; + hexChars[j * 2 + 1] = hexArray[v & 0x0F]; + } + return new String(hexChars); + } + + public static byte[] hexToBytes(String hex) { + if (hex == null) { + return null; + } + int len = hex.length(); + byte[] data = new byte[len / 2]; + for (int i = 0; i < len; i += 2) { + data[i / 2] = (byte) ((Character.digit(hex.charAt(i), 16) << 4) + Character.digit(hex.charAt(i + 1), 16)); + } + return data; + } + +} diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/country/Countries.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/country/Countries.java index 1c9fa8226b..f7778b6918 100644 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/country/Countries.java +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/country/Countries.java @@ -51,237 +51,237 @@ public ArrayList getCountries() { static { countries = new ArrayList(); - countries.add(new Country("1", "US", R.string.US)); - countries.add(new Country("1", "CA", R.string.CA)); - countries.add(new Country("1", "DO", R.string.DO)); - countries.add(new Country("1", "PR", R.string.PR)); - countries.add(new Country("7", "RU", R.string.RU)); - countries.add(new Country("7", "KZ", R.string.KZ)); - countries.add(new Country("20", "EG", R.string.EG)); - countries.add(new Country("27", "ZA", R.string.ZA)); - countries.add(new Country("30", "GR", R.string.GR)); - countries.add(new Country("31", "NL", R.string.NL)); - countries.add(new Country("32", "BE", R.string.BE)); - countries.add(new Country("33", "FR", R.string.FR)); - countries.add(new Country("34", "ES", R.string.ES)); - countries.add(new Country("36", "HU", R.string.HU)); - countries.add(new Country("39", "IT", R.string.IT)); - countries.add(new Country("40", "RO", R.string.RO)); - countries.add(new Country("41", "CH", R.string.CH)); - countries.add(new Country("42", "YL", R.string.YL)); - countries.add(new Country("43", "AT", R.string.AT)); - countries.add(new Country("44", "GB", R.string.GB)); - countries.add(new Country("45", "DK", R.string.DK)); - countries.add(new Country("46", "SE", R.string.SE)); - countries.add(new Country("47", "NO", R.string.NO)); - countries.add(new Country("48", "PL", R.string.PL)); - countries.add(new Country("49", "DE", R.string.DE)); - countries.add(new Country("51", "PE", R.string.PE)); - countries.add(new Country("52", "MX", R.string.MX)); - countries.add(new Country("53", "CU", R.string.CU)); - countries.add(new Country("54", "AR", R.string.AR)); +// countries.add(new Country("1", "US", R.string.US)); +// countries.add(new Country("1", "CA", R.string.CA)); +// countries.add(new Country("1", "DO", R.string.DO)); +// countries.add(new Country("1", "PR", R.string.PR)); +// countries.add(new Country("7", "RU", R.string.RU)); +// countries.add(new Country("7", "KZ", R.string.KZ)); +// countries.add(new Country("20", "EG", R.string.EG)); +// countries.add(new Country("27", "ZA", R.string.ZA)); +// countries.add(new Country("30", "GR", R.string.GR)); +// countries.add(new Country("31", "NL", R.string.NL)); +// countries.add(new Country("32", "BE", R.string.BE)); +// countries.add(new Country("33", "FR", R.string.FR)); +// countries.add(new Country("34", "ES", R.string.ES)); +// countries.add(new Country("36", "HU", R.string.HU)); +// countries.add(new Country("39", "IT", R.string.IT)); +// countries.add(new Country("40", "RO", R.string.RO)); +// countries.add(new Country("41", "CH", R.string.CH)); +// countries.add(new Country("42", "YL", R.string.YL)); +// countries.add(new Country("43", "AT", R.string.AT)); +// countries.add(new Country("44", "GB", R.string.GB)); +// countries.add(new Country("45", "DK", R.string.DK)); +// countries.add(new Country("46", "SE", R.string.SE)); +// countries.add(new Country("47", "NO", R.string.NO)); +// countries.add(new Country("48", "PL", R.string.PL)); +// countries.add(new Country("49", "DE", R.string.DE)); +// countries.add(new Country("51", "PE", R.string.PE)); +// countries.add(new Country("52", "MX", R.string.MX)); +// countries.add(new Country("53", "CU", R.string.CU)); +// countries.add(new Country("54", "AR", R.string.AR)); countries.add(new Country("55", "BR", R.string.BR)); - countries.add(new Country("56", "CL", R.string.CL)); - countries.add(new Country("57", "CO", R.string.CO)); - countries.add(new Country("58", "VE", R.string.VE)); - countries.add(new Country("60", "MY", R.string.MY)); - countries.add(new Country("61", "AU", R.string.AU)); - countries.add(new Country("62", "ID", R.string.ID)); - countries.add(new Country("63", "PH", R.string.PH)); - countries.add(new Country("64", "NZ", R.string.NZ)); - countries.add(new Country("65", "SG", R.string.SG)); - countries.add(new Country("66", "TH", R.string.TH)); - countries.add(new Country("81", "JP", R.string.JP)); - countries.add(new Country("82", "KR", R.string.KR)); - countries.add(new Country("84", "VN", R.string.VN)); - countries.add(new Country("86", "CN", R.string.CN)); - countries.add(new Country("90", "TR", R.string.TR)); - countries.add(new Country("91", "IN", R.string.IN)); - countries.add(new Country("92", "PK", R.string.PK)); - countries.add(new Country("93", "AF", R.string.AF)); - countries.add(new Country("94", "LK", R.string.LK)); - countries.add(new Country("95", "MM", R.string.MM)); - countries.add(new Country("98", "IR", R.string.IR)); - countries.add(new Country("211", "SS", R.string.SS)); - countries.add(new Country("212", "MA", R.string.MA)); - countries.add(new Country("213", "DZ", R.string.DZ)); - countries.add(new Country("216", "TN", R.string.TN)); - countries.add(new Country("218", "LY", R.string.LY)); - countries.add(new Country("220", "GM", R.string.GM)); - countries.add(new Country("221", "SN", R.string.SN)); - countries.add(new Country("222", "MR", R.string.MR)); - countries.add(new Country("223", "ML", R.string.ML)); - countries.add(new Country("224", "GN", R.string.GN)); - countries.add(new Country("225", "CI", R.string.CI)); - countries.add(new Country("226", "BF", R.string.BF)); - countries.add(new Country("227", "NE", R.string.NE)); - countries.add(new Country("228", "TG", R.string.TG)); - countries.add(new Country("229", "BJ", R.string.BJ)); - countries.add(new Country("230", "MU", R.string.MU)); - countries.add(new Country("231", "LR", R.string.LR)); - countries.add(new Country("232", "SL", R.string.SL)); - countries.add(new Country("233", "GH", R.string.GH)); - countries.add(new Country("234", "NG", R.string.NG)); - countries.add(new Country("235", "TD", R.string.TD)); - countries.add(new Country("236", "CF", R.string.CF)); - countries.add(new Country("237", "CM", R.string.CM)); - countries.add(new Country("238", "CV", R.string.CV)); - countries.add(new Country("239", "ST", R.string.ST)); - countries.add(new Country("240", "GQ", R.string.GQ)); - countries.add(new Country("241", "GA", R.string.GA)); - countries.add(new Country("242", "CG", R.string.CG)); - countries.add(new Country("243", "CD", R.string.CD)); - countries.add(new Country("244", "AO", R.string.AO)); - countries.add(new Country("245", "GW", R.string.GW)); - countries.add(new Country("246", "IO", R.string.IO)); - countries.add(new Country("247", "SH", R.string.SH)); - countries.add(new Country("248", "SC", R.string.SC)); - countries.add(new Country("249", "SD", R.string.SD)); - countries.add(new Country("250", "RW", R.string.RW)); - countries.add(new Country("251", "ET", R.string.ET)); - countries.add(new Country("252", "SO", R.string.SO)); - countries.add(new Country("253", "DJ", R.string.DJ)); - countries.add(new Country("254", "KE", R.string.KE)); - countries.add(new Country("255", "TZ", R.string.TZ)); - countries.add(new Country("256", "UG", R.string.UG)); - countries.add(new Country("257", "BI", R.string.BI)); - countries.add(new Country("258", "MZ", R.string.MZ)); - countries.add(new Country("260", "ZM", R.string.ZM)); - countries.add(new Country("261", "MG", R.string.MG)); - countries.add(new Country("262", "RE", R.string.RE)); - countries.add(new Country("263", "ZW", R.string.ZW)); - countries.add(new Country("264", "NA", R.string.NA)); - countries.add(new Country("265", "MW", R.string.MW)); - countries.add(new Country("266", "LS", R.string.LS)); - countries.add(new Country("267", "BW", R.string.BW)); - countries.add(new Country("268", "SZ", R.string.SZ)); - countries.add(new Country("269", "KM", R.string.KM)); - countries.add(new Country("290", "SH", R.string.SH)); - countries.add(new Country("291", "ER", R.string.ER)); - countries.add(new Country("297", "AW", R.string.AW)); - countries.add(new Country("298", "FO", R.string.FO)); - countries.add(new Country("299", "GL", R.string.GL)); - countries.add(new Country("350", "GI", R.string.GI)); - countries.add(new Country("351", "PT", R.string.PT)); - countries.add(new Country("352", "LU", R.string.LU)); - countries.add(new Country("353", "IE", R.string.IE)); - countries.add(new Country("354", "IS", R.string.IS)); - countries.add(new Country("355", "AL", R.string.AL)); - countries.add(new Country("356", "MT", R.string.MT)); - countries.add(new Country("357", "CY", R.string.CY)); - countries.add(new Country("358", "FI", R.string.FI)); - countries.add(new Country("359", "BG", R.string.BG)); - countries.add(new Country("370", "LT", R.string.LT)); - countries.add(new Country("371", "LV", R.string.LV)); - countries.add(new Country("372", "EE", R.string.EE)); - countries.add(new Country("373", "MD", R.string.MD)); - countries.add(new Country("374", "AM", R.string.AM)); - countries.add(new Country("375", "BY", R.string.BY)); - countries.add(new Country("376", "AD", R.string.AD)); - countries.add(new Country("377", "MC", R.string.MC)); - countries.add(new Country("378", "SM", R.string.SM)); - countries.add(new Country("380", "UA", R.string.UA)); - countries.add(new Country("381", "RS", R.string.RS)); - countries.add(new Country("382", "ME", R.string.ME)); - countries.add(new Country("385", "HR", R.string.HR)); - countries.add(new Country("386", "SI", R.string.SI)); - countries.add(new Country("387", "BA", R.string.BA)); - countries.add(new Country("389", "MK", R.string.MK)); - countries.add(new Country("420", "CZ", R.string.CZ)); - countries.add(new Country("421", "SK", R.string.SK)); - countries.add(new Country("423", "LI", R.string.LI)); - countries.add(new Country("500", "FK", R.string.FK)); - countries.add(new Country("501", "BZ", R.string.BZ)); - countries.add(new Country("502", "GT", R.string.GT)); - countries.add(new Country("503", "SV", R.string.SV)); - countries.add(new Country("504", "HN", R.string.HN)); - countries.add(new Country("505", "NI", R.string.NI)); - countries.add(new Country("506", "CR", R.string.CR)); - countries.add(new Country("507", "PA", R.string.PA)); - countries.add(new Country("508", "PM", R.string.PM)); - countries.add(new Country("509", "HT", R.string.HT)); - countries.add(new Country("590", "GP", R.string.GP)); - countries.add(new Country("591", "BO", R.string.BO)); - countries.add(new Country("592", "GY", R.string.GY)); - countries.add(new Country("593", "EC", R.string.EC)); - countries.add(new Country("594", "GF", R.string.GF)); - countries.add(new Country("595", "PY", R.string.PY)); - countries.add(new Country("596", "MQ", R.string.MQ)); - countries.add(new Country("597", "SR", R.string.SR)); - countries.add(new Country("598", "UY", R.string.UY)); - countries.add(new Country("599", "CW", R.string.CW)); - countries.add(new Country("599", "BQ", R.string.BQ)); - countries.add(new Country("670", "TL", R.string.TL)); - countries.add(new Country("672", "NF", R.string.NF)); - countries.add(new Country("673", "BN", R.string.BN)); - countries.add(new Country("674", "NR", R.string.NR)); - countries.add(new Country("675", "PG", R.string.PG)); - countries.add(new Country("676", "TO", R.string.TO)); - countries.add(new Country("677", "SB", R.string.SB)); - countries.add(new Country("678", "VU", R.string.VU)); - countries.add(new Country("679", "FJ", R.string.FJ)); - countries.add(new Country("680", "PW", R.string.PW)); - countries.add(new Country("681", "WF", R.string.WF)); - countries.add(new Country("682", "CK", R.string.CK)); - countries.add(new Country("683", "NU", R.string.NU)); - countries.add(new Country("685", "WS", R.string.WS)); - countries.add(new Country("686", "KI", R.string.KI)); - countries.add(new Country("687", "NC", R.string.NC)); - countries.add(new Country("688", "TV", R.string.TV)); - countries.add(new Country("689", "PF", R.string.PF)); - countries.add(new Country("690", "TK", R.string.TK)); - countries.add(new Country("691", "FM", R.string.FM)); - countries.add(new Country("692", "MH", R.string.MH)); - countries.add(new Country("850", "KP", R.string.KP)); - countries.add(new Country("852", "HK", R.string.HK)); - countries.add(new Country("853", "MO", R.string.MO)); - countries.add(new Country("855", "KH", R.string.KH)); - countries.add(new Country("856", "LA", R.string.LA)); - countries.add(new Country("880", "BD", R.string.BD)); - countries.add(new Country("886", "TW", R.string.TW)); - countries.add(new Country("960", "MV", R.string.MV)); - countries.add(new Country("961", "LB", R.string.LB)); - countries.add(new Country("962", "JO", R.string.JO)); - countries.add(new Country("963", "SY", R.string.SY)); - countries.add(new Country("964", "IQ", R.string.IQ)); - countries.add(new Country("965", "KW", R.string.KW)); - countries.add(new Country("966", "SA", R.string.SA)); - countries.add(new Country("967", "YE", R.string.YE)); - countries.add(new Country("968", "OM", R.string.OM)); - countries.add(new Country("970", "PS", R.string.PS)); - countries.add(new Country("971", "AE", R.string.AE)); - countries.add(new Country("972", "IL", R.string.IL)); - countries.add(new Country("973", "BH", R.string.BH)); - countries.add(new Country("974", "QA", R.string.QA)); - countries.add(new Country("975", "BT", R.string.BT)); - countries.add(new Country("976", "MN", R.string.MN)); - countries.add(new Country("977", "NP", R.string.NP)); - countries.add(new Country("992", "TJ", R.string.TJ)); - countries.add(new Country("993", "TM", R.string.TM)); - countries.add(new Country("994", "AZ", R.string.AZ)); - countries.add(new Country("995", "GE", R.string.GE)); - countries.add(new Country("996", "KG", R.string.KG)); - countries.add(new Country("998", "UZ", R.string.UZ)); - countries.add(new Country("1242", "BS", R.string.BS)); - countries.add(new Country("1246", "BB", R.string.BB)); - countries.add(new Country("1264", "AI", R.string.AI)); - countries.add(new Country("1268", "AG", R.string.AG)); - countries.add(new Country("1284", "VG", R.string.VG)); - countries.add(new Country("1340", "VI", R.string.VI)); - countries.add(new Country("1345", "KY", R.string.KY)); - countries.add(new Country("1441", "BM", R.string.BM)); - countries.add(new Country("1473", "GD", R.string.GD)); - countries.add(new Country("1649", "TC", R.string.TC)); - countries.add(new Country("1664", "MS", R.string.MS)); - countries.add(new Country("1670", "MP", R.string.MP)); - countries.add(new Country("1671", "GU", R.string.GU)); - countries.add(new Country("1684", "AS", R.string.AS)); - countries.add(new Country("1721", "SX", R.string.SX)); - countries.add(new Country("1758", "LC", R.string.LC)); - countries.add(new Country("1767", "DM", R.string.DM)); - countries.add(new Country("1784", "VC", R.string.VC)); - countries.add(new Country("1868", "TT", R.string.TT)); - countries.add(new Country("1869", "KN", R.string.KN)); - countries.add(new Country("1876", "JM", R.string.JM)); +// countries.add(new Country("56", "CL", R.string.CL)); +// countries.add(new Country("57", "CO", R.string.CO)); +// countries.add(new Country("58", "VE", R.string.VE)); +// countries.add(new Country("60", "MY", R.string.MY)); +// countries.add(new Country("61", "AU", R.string.AU)); +// countries.add(new Country("62", "ID", R.string.ID)); +// countries.add(new Country("63", "PH", R.string.PH)); +// countries.add(new Country("64", "NZ", R.string.NZ)); +// countries.add(new Country("65", "SG", R.string.SG)); +// countries.add(new Country("66", "TH", R.string.TH)); +// countries.add(new Country("81", "JP", R.string.JP)); +// countries.add(new Country("82", "KR", R.string.KR)); +// countries.add(new Country("84", "VN", R.string.VN)); +// countries.add(new Country("86", "CN", R.string.CN)); +// countries.add(new Country("90", "TR", R.string.TR)); +// countries.add(new Country("91", "IN", R.string.IN)); +// countries.add(new Country("92", "PK", R.string.PK)); +// countries.add(new Country("93", "AF", R.string.AF)); +// countries.add(new Country("94", "LK", R.string.LK)); +// countries.add(new Country("95", "MM", R.string.MM)); +// countries.add(new Country("98", "IR", R.string.IR)); +// countries.add(new Country("211", "SS", R.string.SS)); +// countries.add(new Country("212", "MA", R.string.MA)); +// countries.add(new Country("213", "DZ", R.string.DZ)); +// countries.add(new Country("216", "TN", R.string.TN)); +// countries.add(new Country("218", "LY", R.string.LY)); +// countries.add(new Country("220", "GM", R.string.GM)); +// countries.add(new Country("221", "SN", R.string.SN)); +// countries.add(new Country("222", "MR", R.string.MR)); +// countries.add(new Country("223", "ML", R.string.ML)); +// countries.add(new Country("224", "GN", R.string.GN)); +// countries.add(new Country("225", "CI", R.string.CI)); +// countries.add(new Country("226", "BF", R.string.BF)); +// countries.add(new Country("227", "NE", R.string.NE)); +// countries.add(new Country("228", "TG", R.string.TG)); +// countries.add(new Country("229", "BJ", R.string.BJ)); +// countries.add(new Country("230", "MU", R.string.MU)); +// countries.add(new Country("231", "LR", R.string.LR)); +// countries.add(new Country("232", "SL", R.string.SL)); +// countries.add(new Country("233", "GH", R.string.GH)); +// countries.add(new Country("234", "NG", R.string.NG)); +// countries.add(new Country("235", "TD", R.string.TD)); +// countries.add(new Country("236", "CF", R.string.CF)); +// countries.add(new Country("237", "CM", R.string.CM)); +// countries.add(new Country("238", "CV", R.string.CV)); +// countries.add(new Country("239", "ST", R.string.ST)); +// countries.add(new Country("240", "GQ", R.string.GQ)); +// countries.add(new Country("241", "GA", R.string.GA)); +// countries.add(new Country("242", "CG", R.string.CG)); +// countries.add(new Country("243", "CD", R.string.CD)); +// countries.add(new Country("244", "AO", R.string.AO)); +// countries.add(new Country("245", "GW", R.string.GW)); +// countries.add(new Country("246", "IO", R.string.IO)); +// countries.add(new Country("247", "SH", R.string.SH)); +// countries.add(new Country("248", "SC", R.string.SC)); +// countries.add(new Country("249", "SD", R.string.SD)); +// countries.add(new Country("250", "RW", R.string.RW)); +// countries.add(new Country("251", "ET", R.string.ET)); +// countries.add(new Country("252", "SO", R.string.SO)); +// countries.add(new Country("253", "DJ", R.string.DJ)); +// countries.add(new Country("254", "KE", R.string.KE)); +// countries.add(new Country("255", "TZ", R.string.TZ)); +// countries.add(new Country("256", "UG", R.string.UG)); +// countries.add(new Country("257", "BI", R.string.BI)); +// countries.add(new Country("258", "MZ", R.string.MZ)); +// countries.add(new Country("260", "ZM", R.string.ZM)); +// countries.add(new Country("261", "MG", R.string.MG)); +// countries.add(new Country("262", "RE", R.string.RE)); +// countries.add(new Country("263", "ZW", R.string.ZW)); +// countries.add(new Country("264", "NA", R.string.NA)); +// countries.add(new Country("265", "MW", R.string.MW)); +// countries.add(new Country("266", "LS", R.string.LS)); +// countries.add(new Country("267", "BW", R.string.BW)); +// countries.add(new Country("268", "SZ", R.string.SZ)); +// countries.add(new Country("269", "KM", R.string.KM)); +// countries.add(new Country("290", "SH", R.string.SH)); +// countries.add(new Country("291", "ER", R.string.ER)); +// countries.add(new Country("297", "AW", R.string.AW)); +// countries.add(new Country("298", "FO", R.string.FO)); +// countries.add(new Country("299", "GL", R.string.GL)); +// countries.add(new Country("350", "GI", R.string.GI)); +// countries.add(new Country("351", "PT", R.string.PT)); +// countries.add(new Country("352", "LU", R.string.LU)); +// countries.add(new Country("353", "IE", R.string.IE)); +// countries.add(new Country("354", "IS", R.string.IS)); +// countries.add(new Country("355", "AL", R.string.AL)); +// countries.add(new Country("356", "MT", R.string.MT)); +// countries.add(new Country("357", "CY", R.string.CY)); +// countries.add(new Country("358", "FI", R.string.FI)); +// countries.add(new Country("359", "BG", R.string.BG)); +// countries.add(new Country("370", "LT", R.string.LT)); +// countries.add(new Country("371", "LV", R.string.LV)); +// countries.add(new Country("372", "EE", R.string.EE)); +// countries.add(new Country("373", "MD", R.string.MD)); +// countries.add(new Country("374", "AM", R.string.AM)); +// countries.add(new Country("375", "BY", R.string.BY)); +// countries.add(new Country("376", "AD", R.string.AD)); +// countries.add(new Country("377", "MC", R.string.MC)); +// countries.add(new Country("378", "SM", R.string.SM)); +// countries.add(new Country("380", "UA", R.string.UA)); +// countries.add(new Country("381", "RS", R.string.RS)); +// countries.add(new Country("382", "ME", R.string.ME)); +// countries.add(new Country("385", "HR", R.string.HR)); +// countries.add(new Country("386", "SI", R.string.SI)); +// countries.add(new Country("387", "BA", R.string.BA)); +// countries.add(new Country("389", "MK", R.string.MK)); +// countries.add(new Country("420", "CZ", R.string.CZ)); +// countries.add(new Country("421", "SK", R.string.SK)); +// countries.add(new Country("423", "LI", R.string.LI)); +// countries.add(new Country("500", "FK", R.string.FK)); +// countries.add(new Country("501", "BZ", R.string.BZ)); +// countries.add(new Country("502", "GT", R.string.GT)); +// countries.add(new Country("503", "SV", R.string.SV)); +// countries.add(new Country("504", "HN", R.string.HN)); +// countries.add(new Country("505", "NI", R.string.NI)); +// countries.add(new Country("506", "CR", R.string.CR)); +// countries.add(new Country("507", "PA", R.string.PA)); +// countries.add(new Country("508", "PM", R.string.PM)); +// countries.add(new Country("509", "HT", R.string.HT)); +// countries.add(new Country("590", "GP", R.string.GP)); +// countries.add(new Country("591", "BO", R.string.BO)); +// countries.add(new Country("592", "GY", R.string.GY)); +// countries.add(new Country("593", "EC", R.string.EC)); +// countries.add(new Country("594", "GF", R.string.GF)); +// countries.add(new Country("595", "PY", R.string.PY)); +// countries.add(new Country("596", "MQ", R.string.MQ)); +// countries.add(new Country("597", "SR", R.string.SR)); +// countries.add(new Country("598", "UY", R.string.UY)); +// countries.add(new Country("599", "CW", R.string.CW)); +// countries.add(new Country("599", "BQ", R.string.BQ)); +// countries.add(new Country("670", "TL", R.string.TL)); +// countries.add(new Country("672", "NF", R.string.NF)); +// countries.add(new Country("673", "BN", R.string.BN)); +// countries.add(new Country("674", "NR", R.string.NR)); +// countries.add(new Country("675", "PG", R.string.PG)); +// countries.add(new Country("676", "TO", R.string.TO)); +// countries.add(new Country("677", "SB", R.string.SB)); +// countries.add(new Country("678", "VU", R.string.VU)); +// countries.add(new Country("679", "FJ", R.string.FJ)); +// countries.add(new Country("680", "PW", R.string.PW)); +// countries.add(new Country("681", "WF", R.string.WF)); +// countries.add(new Country("682", "CK", R.string.CK)); +// countries.add(new Country("683", "NU", R.string.NU)); +// countries.add(new Country("685", "WS", R.string.WS)); +// countries.add(new Country("686", "KI", R.string.KI)); +// countries.add(new Country("687", "NC", R.string.NC)); +// countries.add(new Country("688", "TV", R.string.TV)); +// countries.add(new Country("689", "PF", R.string.PF)); +// countries.add(new Country("690", "TK", R.string.TK)); +// countries.add(new Country("691", "FM", R.string.FM)); +// countries.add(new Country("692", "MH", R.string.MH)); +// countries.add(new Country("850", "KP", R.string.KP)); +// countries.add(new Country("852", "HK", R.string.HK)); +// countries.add(new Country("853", "MO", R.string.MO)); +// countries.add(new Country("855", "KH", R.string.KH)); +// countries.add(new Country("856", "LA", R.string.LA)); +// countries.add(new Country("880", "BD", R.string.BD)); +// countries.add(new Country("886", "TW", R.string.TW)); +// countries.add(new Country("960", "MV", R.string.MV)); +// countries.add(new Country("961", "LB", R.string.LB)); +// countries.add(new Country("962", "JO", R.string.JO)); +// countries.add(new Country("963", "SY", R.string.SY)); +// countries.add(new Country("964", "IQ", R.string.IQ)); +// countries.add(new Country("965", "KW", R.string.KW)); +// countries.add(new Country("966", "SA", R.string.SA)); +// countries.add(new Country("967", "YE", R.string.YE)); +// countries.add(new Country("968", "OM", R.string.OM)); +// countries.add(new Country("970", "PS", R.string.PS)); +// countries.add(new Country("971", "AE", R.string.AE)); +// countries.add(new Country("972", "IL", R.string.IL)); +// countries.add(new Country("973", "BH", R.string.BH)); +// countries.add(new Country("974", "QA", R.string.QA)); +// countries.add(new Country("975", "BT", R.string.BT)); +// countries.add(new Country("976", "MN", R.string.MN)); +// countries.add(new Country("977", "NP", R.string.NP)); +// countries.add(new Country("992", "TJ", R.string.TJ)); +// countries.add(new Country("993", "TM", R.string.TM)); +// countries.add(new Country("994", "AZ", R.string.AZ)); +// countries.add(new Country("995", "GE", R.string.GE)); +// countries.add(new Country("996", "KG", R.string.KG)); +// countries.add(new Country("998", "UZ", R.string.UZ)); +// countries.add(new Country("1242", "BS", R.string.BS)); +// countries.add(new Country("1246", "BB", R.string.BB)); +// countries.add(new Country("1264", "AI", R.string.AI)); +// countries.add(new Country("1268", "AG", R.string.AG)); +// countries.add(new Country("1284", "VG", R.string.VG)); +// countries.add(new Country("1340", "VI", R.string.VI)); +// countries.add(new Country("1345", "KY", R.string.KY)); +// countries.add(new Country("1441", "BM", R.string.BM)); +// countries.add(new Country("1473", "GD", R.string.GD)); +// countries.add(new Country("1649", "TC", R.string.TC)); +// countries.add(new Country("1664", "MS", R.string.MS)); +// countries.add(new Country("1670", "MP", R.string.MP)); +// countries.add(new Country("1671", "GU", R.string.GU)); +// countries.add(new Country("1684", "AS", R.string.AS)); +// countries.add(new Country("1721", "SX", R.string.SX)); +// countries.add(new Country("1758", "LC", R.string.LC)); +// countries.add(new Country("1767", "DM", R.string.DM)); +// countries.add(new Country("1784", "VC", R.string.VC)); +// countries.add(new Country("1868", "TT", R.string.TT)); +// countries.add(new Country("1869", "KN", R.string.KN)); +// countries.add(new Country("1876", "JM", R.string.JM)); } } diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/PagerSlidingTabStrip.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/PagerSlidingTabStrip.java index 6cda9a121d..f56e53cc8f 100644 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/PagerSlidingTabStrip.java +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/PagerSlidingTabStrip.java @@ -1,52 +1,35 @@ package im.actor.sdk.view; -import android.annotation.SuppressLint; +/** + * Created by 98379720172 on 08/01/17. + */ + + import android.content.Context; -import android.content.res.TypedArray; import android.graphics.Canvas; -import android.graphics.Color; import android.graphics.Paint; import android.graphics.Paint.Style; -import android.graphics.Typeface; import android.os.Build; -import android.os.Parcel; -import android.os.Parcelable; import android.support.v4.view.ViewPager; import android.support.v4.view.ViewPager.OnPageChangeListener; -import android.util.AttributeSet; -import android.util.DisplayMetrics; -import android.util.TypedValue; -import android.view.Gravity; import android.view.View; import android.view.ViewTreeObserver.OnGlobalLayoutListener; import android.widget.FrameLayout; -import android.widget.ImageButton; +import android.widget.HorizontalScrollView; +import android.widget.ImageView; import android.widget.LinearLayout; -import android.widget.TextView; - -import java.util.Locale; -import im.actor.sdk.R; +import im.actor.sdk.util.LayoutHelper; import im.actor.sdk.util.Screen; -public class PagerSlidingTabStrip extends FrameLayout { - - +public class PagerSlidingTabStrip extends HorizontalScrollView { public interface IconTabProvider { - public int getPageIconResId(int position, Context context); - } - public interface TabProvider { - public View getTab(int position, Context context); + int getPageIconResId(int position); + void customOnDraw(Canvas canvas, int position); } - // @formatter:off - private static final int[] ATTRS = new int[]{ - android.R.attr.textSize, - android.R.attr.textColor - }; - // @formatter:on - private LinearLayout.LayoutParams expandedTabLayoutParams; + private LinearLayout.LayoutParams defaultTabLayoutParams; private final PageListener pageListener = new PageListener(); public OnPageChangeListener delegatePageListener; @@ -60,120 +43,45 @@ public interface TabProvider { private float currentPositionOffset = 0f; private Paint rectPaint; - private Paint dividerPaint; - - private int indicatorColor = 0xFFFFFFFF; - private int underlineColor = 0x1A000000; - private int dividerColor = 0x1A000000; - - private boolean textAllCaps = true; - - private int scrollOffset = 52; - private int indicatorHeight = 8; - private int underlineHeight = 2; - private int dividerPadding = 12; - private int tabPadding = Screen.dp(5); - private int dividerWidth = 1; - - private int tabTextSize = 12; - private int tabTextColor = 0xFFFFFFFF; - private Typeface tabTypeface = null; - private int tabTypefaceStyle = Typeface.BOLD; - private int tabsContainerPaddingLeft = Screen.dp(11); - private int tabsContainerPaddingTop = 0; - private int tabsContainerPaddingRight = 0; - private int tabsContainerPaddingBottom = 0; - private int lastScrollX = 0; + private int indicatorColor = 0xff666666; + private int underlineColor = 0x1a000000; - private int indicatorPadding = 0; + private boolean shouldExpand = false; - private int tabBackgroundResId = R.drawable.background_tab; + private int scrollOffset = Screen.dp(52); + private int indicatorHeight = Screen.dp(8); + private int underlineHeight = Screen.dp(2); + private int dividerPadding = Screen.dp(12); + private int tabPadding = Screen.dp(24); - private Locale locale; + private int lastScrollX = 0; public PagerSlidingTabStrip(Context context) { - this(context, null); - } - - public PagerSlidingTabStrip(Context context, AttributeSet attrs) { - this(context, attrs, 0); - } - - public PagerSlidingTabStrip(Context context, AttributeSet attrs, int defStyle) { - super(context, attrs, defStyle); + super(context); + setFillViewport(true); setWillNotDraw(false); tabsContainer = new LinearLayout(context); tabsContainer.setOrientation(LinearLayout.HORIZONTAL); - tabsContainer.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)); - tabsContainer.setPadding(tabsContainerPaddingLeft, tabsContainerPaddingTop, tabsContainerPaddingRight, tabsContainerPaddingBottom); + tabsContainer.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutHelper.MATCH_PARENT)); addView(tabsContainer); - DisplayMetrics dm = getResources().getDisplayMetrics(); - - scrollOffset = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, scrollOffset, dm); - indicatorHeight = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, indicatorHeight, dm); - underlineHeight = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, underlineHeight, dm); - dividerPadding = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dividerPadding, dm); - tabPadding = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, tabPadding, dm); - dividerWidth = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dividerWidth, dm); - tabTextSize = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, tabTextSize, dm); - - // get system attrs (android:textSize and android:textColor) - - TypedArray a = context.obtainStyledAttributes(attrs, ATTRS); - - tabTextSize = a.getDimensionPixelSize(0, tabTextSize); - tabTextColor = a.getColor(1, tabTextColor); - - a.recycle(); - - // get custom attrs - - a = context.obtainStyledAttributes(attrs, R.styleable.PagerSlidingTabStrip); - - indicatorColor = a.getColor(R.styleable.PagerSlidingTabStrip_pstsIndicatorColor, indicatorColor); - underlineColor = a.getColor(R.styleable.PagerSlidingTabStrip_pstsUnderlineColor, underlineColor); - dividerColor = a.getColor(R.styleable.PagerSlidingTabStrip_pstsDividerColor, dividerColor); - indicatorHeight = a.getDimensionPixelSize(R.styleable.PagerSlidingTabStrip_pstsIndicatorHeight, indicatorHeight); - underlineHeight = a.getDimensionPixelSize(R.styleable.PagerSlidingTabStrip_pstsUnderlineHeight, underlineHeight); - dividerPadding = a.getDimensionPixelSize(R.styleable.PagerSlidingTabStrip_pstsDividerPadding, dividerPadding); - tabPadding = a.getDimensionPixelSize(R.styleable.PagerSlidingTabStrip_pstsTabPaddingLeftRight, tabPadding); - tabBackgroundResId = a.getResourceId(R.styleable.PagerSlidingTabStrip_pstsTabBackground, tabBackgroundResId); - scrollOffset = a.getDimensionPixelSize(R.styleable.PagerSlidingTabStrip_pstsScrollOffset, scrollOffset); - textAllCaps = a.getBoolean(R.styleable.PagerSlidingTabStrip_pstsTextAllCaps, textAllCaps); - - a.recycle(); - rectPaint = new Paint(); rectPaint.setAntiAlias(true); rectPaint.setStyle(Style.FILL); - dividerPaint = new Paint(); - dividerPaint.setAntiAlias(true); - dividerPaint.setStrokeWidth(dividerWidth); - - expandedTabLayoutParams = new LinearLayout.LayoutParams(0, LayoutParams.MATCH_PARENT, 1.0f); - - if (locale == null) { - locale = getResources().getConfiguration().locale; - } + defaultTabLayoutParams = new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutHelper.MATCH_PARENT); } public void setViewPager(ViewPager pager) { this.pager = pager; - if (pager.getAdapter() == null) { throw new IllegalStateException("ViewPager does not have adapter instance."); } - pager.setOnPageChangeListener(pageListener); - notifyDataSetChanged(); - - redrawTabs(pager.getCurrentItem()); } public void setOnPageChangeListener(OnPageChangeListener listener) { @@ -181,102 +89,86 @@ public void setOnPageChangeListener(OnPageChangeListener listener) { } public void notifyDataSetChanged() { - tabsContainer.removeAllViews(); - tabCount = pager.getAdapter().getCount(); - for (int i = 0; i < tabCount; i++) { - if (pager.getAdapter() instanceof IconTabProvider) { - if (((IconTabProvider) pager.getAdapter()).getPageIconResId(i, getContext()) != -1) { - addIconTab(i, ((IconTabProvider) pager.getAdapter()).getPageIconResId(i, getContext())); - } else { - addTextTab(i, pager.getAdapter().getPageTitle(i).toString()); - } - } else if(pager.getAdapter() instanceof TabProvider){ - addTab(i, ((TabProvider)pager.getAdapter()).getTab(i, getContext())); - } else { - addTextTab(i, pager.getAdapter().getPageTitle(i).toString()); + addIconTab(i, ((IconTabProvider) pager.getAdapter()).getPageIconResId(i)); } - } - updateTabStyles(); - getViewTreeObserver().addOnGlobalLayoutListener(new OnGlobalLayoutListener() { - - @SuppressWarnings("deprecation") - @SuppressLint("NewApi") @Override public void onGlobalLayout() { - - if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) { + if (Build.VERSION.SDK_INT < 16) { getViewTreeObserver().removeGlobalOnLayoutListener(this); } else { getViewTreeObserver().removeOnGlobalLayoutListener(this); } - currentPosition = pager.getCurrentItem(); + scrollToChild(currentPosition, 0); } }); - - } - - private void addTextTab(final int position, String title) { - - TextView tab = new TextView(getContext()); - tab.setText(title); - tab.setGravity(Gravity.CENTER); - tab.setSingleLine(); - - addTab(position, tab); } private void addIconTab(final int position, int resId) { - - ImageButton tab = new ImageButton(getContext()); - tab.setImageResource(resId); - - addTab(position, tab); - - } - - private void addTab(final int position, final View tab) { + ImageView tab = new ImageView(getContext()) { + @Override + protected void onDraw(Canvas canvas) { + super.onDraw(canvas); + if (pager.getAdapter() instanceof IconTabProvider) { + ((IconTabProvider) pager.getAdapter()).customOnDraw(canvas, position); + } + } + }; tab.setFocusable(true); + tab.setImageResource(resId); + tab.setScaleType(ImageView.ScaleType.CENTER); tab.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { pager.setCurrentItem(position); } }); - if(tabPadding>0) - tab.setPadding(tabPadding, 0, tabPadding, 0); - tabsContainer.addView(tab, position, expandedTabLayoutParams); + tabsContainer.addView(tab); + tab.setSelected(position == currentPosition); } private void updateTabStyles() { - for (int i = 0; i < tabCount; i++) { - View v = tabsContainer.getChildAt(i); - - v.setBackgroundResource(tabBackgroundResId); - - if (v instanceof TextView) { - - TextView tab = (TextView) v; - tab.setTextSize(TypedValue.COMPLEX_UNIT_PX, tabTextSize); - tab.setTypeface(tabTypeface, tabTypefaceStyle); - tab.setTextColor(tabTextColor); - - // setAllCaps() is only available from API 14, so the upper case is made manually if we are on a - // pre-ICS-build - tab.setAllCaps(true); - + v.setLayoutParams(defaultTabLayoutParams); + if (shouldExpand) { + v.setPadding(0, 0, 0, 0); + v.setLayoutParams(new LinearLayout.LayoutParams(-1, -1, 1.0F)); + } else { + v.setPadding(tabPadding, 0, tabPadding, 0); } } + } + @Override + protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { + super.onMeasure(widthMeasureSpec, heightMeasureSpec); + if (!shouldExpand || MeasureSpec.getMode(widthMeasureSpec) == MeasureSpec.UNSPECIFIED) { + return; + } + int myWidth = getMeasuredWidth(); + tabsContainer.measure(MeasureSpec.EXACTLY | myWidth, heightMeasureSpec); + } + + private void scrollToChild(int position, int offset) { + if (tabCount == 0) { + return; + } + int newScrollX = tabsContainer.getChildAt(position).getLeft() + offset; + if (position > 0 || offset > 0) { + newScrollX -= scrollOffset; + } + if (newScrollX != lastScrollX) { + lastScrollX = newScrollX; + scrollTo(newScrollX, 0); + } } @Override @@ -289,98 +181,39 @@ protected void onDraw(Canvas canvas) { final int height = getHeight(); - // draw indicator line - - rectPaint.setColor(indicatorColor); + // draw underline + rectPaint.setColor(underlineColor); + canvas.drawRect(0, height - underlineHeight, tabsContainer.getWidth(), height, rectPaint); // default: line below current tab View currentTab = tabsContainer.getChildAt(currentPosition); - float lineLeft = currentTab.getLeft() + indicatorPadding; - float lineRight = currentTab.getRight() - indicatorPadding; - int currentTabColor; - int nextTabColor; + float lineLeft = currentTab.getLeft(); + float lineRight = currentTab.getRight(); // if there is an offset, start interpolating left and right coordinates between current and next tab if (currentPositionOffset > 0f && currentPosition < tabCount - 1) { View nextTab = tabsContainer.getChildAt(currentPosition + 1); - final float nextTabLeft = nextTab.getLeft() + indicatorPadding; - final float nextTabRight = nextTab.getRight() - indicatorPadding; + final float nextTabLeft = nextTab.getLeft(); + final float nextTabRight = nextTab.getRight(); lineLeft = (currentPositionOffset * nextTabLeft + (1f - currentPositionOffset) * lineLeft); lineRight = (currentPositionOffset * nextTabRight + (1f - currentPositionOffset) * lineRight); - - currentTabColor = blendColors(tabTextColor, 0x30000000, currentPositionOffset, false); - - nextTabColor = blendColors(tabTextColor, 0x30000000, currentPositionOffset, true); - - if (currentTab instanceof TextView) { - ((TextView) currentTab).setTextColor(currentTabColor); - } else if (currentTab instanceof ImageButton) { - ((ImageButton) currentTab).setAlpha(Color.alpha(currentTabColor)); - } - - if (nextTab instanceof TextView) { - ((TextView) nextTab).setTextColor(nextTabColor); - } else if (nextTab instanceof ImageButton) { - ((ImageButton) nextTab).setAlpha(Color.alpha(nextTabColor)); - } - } else { - for (int i = 0; i < tabCount; i++) { - if (tabsContainer.getChildAt(i) instanceof TextView) { - if (i == currentPosition) { - ((TextView) tabsContainer.getChildAt(i)).setTextColor(blendColors(tabTextColor, 0x30000000, currentPositionOffset, false)); - } else { - ((TextView) tabsContainer.getChildAt(i)).setTextColor(blendColors(tabTextColor, 0x30000000, currentPositionOffset, true)); - } - } else if (tabsContainer.getChildAt(i) instanceof ImageButton) { - if (i == currentPosition) { - ((ImageButton) tabsContainer.getChildAt(i)).setAlpha(Color.alpha(blendColors(tabTextColor, 0x30000000, currentPositionOffset, false))); - } else { - ((ImageButton) tabsContainer.getChildAt(i)).setAlpha(Color.alpha(blendColors(tabTextColor, 0x30000000, currentPositionOffset, true))); - } - } - } } - - // canvas.drawRect(lineLeft, 0, lineRight, indicatorHeight, rectPaint); + // draw indicator line + rectPaint.setColor(indicatorColor); canvas.drawRect(lineLeft, height - indicatorHeight, lineRight, height, rectPaint); - - // draw underline - - rectPaint.setColor(underlineColor); - canvas.drawRect(0, height - underlineHeight, tabsContainer.getWidth(), height, rectPaint); - - // draw divider - - dividerPaint.setColor(dividerColor); - for (int i = 0; i < tabCount - 1; i++) { - View tab = tabsContainer.getChildAt(i); - canvas.drawLine(tab.getRight(), dividerPadding, tab.getRight(), height - dividerPadding, dividerPaint); - } - - } - - private static int blendColors(int color1, int color2, float ratio, boolean inverse) { - final float inverseRation = 1f - ratio; - float a = (Color.alpha(color1)) - (Color.alpha(color2) * (inverse ? inverseRation : ratio)); - float r = (Color.red(color1)) - (Color.red(color2) * (inverse ? inverseRation : ratio)); - float g = (Color.green(color1)) - (Color.green(color2) * (inverse ? inverseRation : ratio)); - float b = (Color.blue(color1)) - (Color.blue(color2) * (inverse ? inverseRation : ratio)); - return Color.argb((int) a, (int) r, (int) g, (int) b); } private class PageListener implements OnPageChangeListener { @Override public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { - currentPosition = position; currentPositionOffset = positionOffset; - + scrollToChild(position, (int) (positionOffset * tabsContainer.getChildAt(position).getWidth())); invalidate(); - if (delegatePageListener != null) { delegatePageListener.onPageScrolled(position, positionOffset, positionOffsetPixels); } @@ -388,7 +221,9 @@ public void onPageScrolled(int position, float positionOffset, int positionOffse @Override public void onPageScrollStateChanged(int state) { - + if (state == ViewPager.SCROLL_STATE_IDLE) { + scrollToChild(pager.getCurrentItem(), 0); + } if (delegatePageListener != null) { delegatePageListener.onPageScrollStateChanged(state); } @@ -396,26 +231,22 @@ public void onPageScrollStateChanged(int state) { @Override public void onPageSelected(int position) { - redrawTabs(position); if (delegatePageListener != null) { delegatePageListener.onPageSelected(position); } + for (int a = 0; a < tabsContainer.getChildCount(); a++) { + tabsContainer.getChildAt(a).setSelected(a == position); + } } - } - public void redrawTabs(int currentPosition) { - try { - for (int i = 0; i < tabsContainer.getChildCount(); ++i) { - View tmp = tabsContainer.getChildAt(i); - if (i == currentPosition) { - tmp.setSelected(true); - } else { - tmp.setSelected(false); + public void onSizeChanged(int paramInt1, int paramInt2, int paramInt3, int paramInt4) { + if (!shouldExpand) { + post(new Runnable() { + public void run() { + PagerSlidingTabStrip.this.notifyDataSetChanged(); } - } - } catch (Exception e) { - //no-op + }); } } @@ -456,20 +287,6 @@ public int getUnderlineColor() { return underlineColor; } - public void setDividerColor(int dividerColor) { - this.dividerColor = dividerColor; - invalidate(); - } - - public void setDividerColorResource(int resId) { - this.dividerColor = getResources().getColor(resId); - invalidate(); - } - - public int getDividerColor() { - return dividerColor; - } - public void setUnderlineHeight(int underlineHeightPx) { this.underlineHeight = underlineHeightPx; invalidate(); @@ -497,49 +314,15 @@ public int getScrollOffset() { return scrollOffset; } - public boolean isTextAllCaps() { - return textAllCaps; - } - - public void setAllCaps(boolean textAllCaps) { - this.textAllCaps = textAllCaps; - } - - public void setTextSize(int textSizePx) { - this.tabTextSize = textSizePx; + public void setShouldExpand(boolean shouldExpand) { + this.shouldExpand = shouldExpand; + tabsContainer.setLayoutParams(new FrameLayout.LayoutParams(-1, -1)); updateTabStyles(); + requestLayout(); } - public int getTextSize() { - return tabTextSize; - } - - public void setTextColor(int textColor) { - this.tabTextColor = textColor; - updateTabStyles(); - } - - public void setTextColorResource(int resId) { - this.tabTextColor = getResources().getColor(resId); - updateTabStyles(); - } - - public int getTextColor() { - return tabTextColor; - } - - public void setTypeface(Typeface typeface, int style) { - this.tabTypeface = typeface; - this.tabTypefaceStyle = style; - updateTabStyles(); - } - - public void setTabBackground(int resId) { - this.tabBackgroundResId = resId; - } - - public int getTabBackground() { - return tabBackgroundResId; + public boolean getShouldExpand() { + return shouldExpand; } public void setTabPaddingLeftRight(int paddingPx) { @@ -550,64 +333,4 @@ public void setTabPaddingLeftRight(int paddingPx) { public int getTabPaddingLeftRight() { return tabPadding; } - - public void setTabLayoutParams(LinearLayout.LayoutParams tabLayoutParams) { - this.expandedTabLayoutParams = tabLayoutParams; - } - - public int getIndicatorPadding() { - return indicatorPadding; - } - - public void setIndicatorPadding(int indicatorPadding) { - this.indicatorPadding = indicatorPadding; - } - - @Override - public void onRestoreInstanceState(Parcelable state) { - SavedState savedState = (SavedState) state; - super.onRestoreInstanceState(savedState.getSuperState()); - currentPosition = savedState.currentPosition; - requestLayout(); - } - - @Override - public Parcelable onSaveInstanceState() { - Parcelable superState = super.onSaveInstanceState(); - SavedState savedState = new SavedState(superState); - savedState.currentPosition = currentPosition; - return savedState; - } - - static class SavedState extends BaseSavedState { - int currentPosition; - - public SavedState(Parcelable superState) { - super(superState); - } - - private SavedState(Parcel in) { - super(in); - currentPosition = in.readInt(); - } - - @Override - public void writeToParcel(Parcel dest, int flags) { - super.writeToParcel(dest, flags); - dest.writeInt(currentPosition); - } - - public static final Creator CREATOR = new Creator() { - @Override - public SavedState createFromParcel(Parcel in) { - return new SavedState(in); - } - - @Override - public SavedState[] newArray(int size) { - return new SavedState[size]; - } - }; - } - -} +} \ No newline at end of file diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/EmojiData.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/EmojiData.java new file mode 100644 index 0000000000..e3c8a43dec --- /dev/null +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/EmojiData.java @@ -0,0 +1,334 @@ +package im.actor.sdk.view.emoji; + +import java.util.HashMap; + +public class EmojiData { + + public static final char[] emojiToFE0F = { + 0x2B50, 0x2600, 0x26C5, 0x2601, 0x26A1, 0x2744, 0x26C4, 0x2614, 0x2708, 0x26F5, + 0x2693, 0x26FD, 0x26F2, 0x26FA, 0x26EA, 0x2615, 0x26BD, 0x26BE, 0x26F3, 0x231A, + 0x260E, 0x231B, 0x2709, 0x2702, 0x2712, 0x270F, 0x2648, 0x2649, 0x264A, 0x264B, + 0x264C, 0x264D, 0x264E, 0x264F, 0x2650, 0x2651, 0x2652, 0x2653, 0x2734, 0x3299, + 0x3297, 0x26D4, 0x2B55, 0x2668, 0x2757, 0x203C, 0x2049, 0x303D, 0x26A0, 0x267B, + 0x2747, 0x2733, 0x24C2, 0x267F, 0x25B6, 0x25C0, 0x27A1, 0x2B05, 0x2B06, 0x2B07, + 0x2197, 0x2198, 0x2199, 0x2196, 0x2195, 0x2194, 0x21AA, 0x21A9, 0x2934, 0x2935, + 0x2139, 0x2714, 0x2716, 0x2611, 0x26AA, 0x26AB, 0x25AA, 0x25AB, 0x2B1B, 0x2B1C, + 0x25FC, 0x25FB, 0x25FE, 0x25FD, 0x2660, 0x2663, 0x2665, 0x2666, 0x263A, 0x2639, + 0x270C, 0x261D, 0x2764 + }; + //0xD83CDE2F, 0xD83CDC04, 0xD83CDE1A, 0xD83CDD7F + + public static final char[] dataChars = { + 0x262E, 0x271D, 0x262A, 0x2638, 0x2721, 0x262F, 0x2626, 0x26CE, 0x2648, 0x2649, + 0x264A, 0x264B, 0x264C, 0x264D, 0x264E, 0x264F, 0x2650, 0x2651, 0x2652, 0x2653, + 0x269B, 0x2622, 0x2623, 0x2734, 0x3299, 0x3297, 0x26D4, 0x274C, 0x2B55, 0x2668, + 0x2757, 0x2755, 0x2753, 0x2754, 0x203C, 0x2049, 0x269C, 0x303D, 0x26A0, 0x267B, + 0x2747, 0x2733, 0x274E, 0x2705, 0x27BF, 0x24C2, 0x267F, 0x25B6, 0x23F8, 0x23EF, + 0x23F9, 0x23FA, 0x23ED, 0x23EE, 0x23E9, 0x23EA, 0x25C0, 0x23EB, 0x23EC, 0x27A1, + 0x2B05, 0x2B06, 0x2B07, 0x2197, 0x2198, 0x2199, 0x2196, 0x2195, 0x2194, 0x21AA, + 0x21A9, 0x2934, 0x2935, 0x2139, 0x3030, 0x27B0, 0x2714, 0x2795, 0x2796, 0x2797, + 0x2716, 0x00A9, 0x00AE, 0x2122, 0x2611, 0x26AA, 0x26AB, 0x25AA, 0x25AB, 0x2B1B, + 0x2B1C, 0x25FC, 0x25FB, 0x25FE, 0x25FD, 0x2660, 0x2663, 0x2665, 0x2666, 0x263A, + 0x2639, 0x270A, 0x270C, 0x270B, 0x261D, 0x270D, 0x26D1, 0x2764, 0x2763, 0x2615, + 0x26BD, 0x26BE, 0x26F3, 0x26F7, 0x26F8, 0x26F9, 0x231A, 0x2328, 0x260E, 0x23F1, + 0x23F2, 0x23F0, 0x23F3, 0x231B, 0x2696, 0x2692, 0x26CF, 0x2699, 0x26D3, 0x2694, + 0x2620, 0x26B0, 0x26B1, 0x2697, 0x26F1, 0x2709, 0x2702, 0x2712, 0x270F, 0x2708, + 0x26F5, 0x26F4, 0x2693, 0x26FD, 0x26F2, 0x26F0, 0x26FA, 0x26EA, 0x26E9, 0x2618, + 0x2B50, 0x2728, 0x2604, 0x2600, 0x26C5, 0x2601, 0x26C8, 0x26A1, 0x2744, 0x2603, + 0x26C4, 0x2602, 0x2614 + }; + + public static final String[] emojiColored = { + "🙌","👏","👍","👎","👊","✊","👋","👈","👉","👆","👇","👌","☝","✌","✋", + "🖐","👐","💪","🙏","🖖","🤘","🖕","✍","💅","👂","👃","👶","👦","👧","👨", + "👩","👱‍♀","👱","👴","👵","👲","👳‍♀","👳","👮‍♀","👮","👷‍♀","👷","💂‍♀","💂", + "🕵‍♀","🕵","🎅","👸","👰","👼","🙇‍♀","🙇","💁","💁‍♂","🙅","🙅‍♂","🙆","🙆‍♂", + "🙋","🙋‍♂","🙎","🙎‍♂","🙍","🙍‍♂","💇","💇‍♂","💆","💆‍♂","💃","🚶‍♀","🚶","🏃‍♀", + "🏃","🏋‍♀","🏋","⛹‍♀","⛹","🏄‍♀","🏄","🏊‍♀","🏊","🚣‍♀","🚣","🚴‍♀","🚴","🚵‍♀", + "🚵","🛀" + }; + + public static final String[][] dataColored = { + new String[]{ + "😀","😬","😁","😂","😃","😄","😅","😆","😇","😉","😊","🙂","🙃","☺", + "😋","😌","😍","😘","😗","😙","😚","😜","😝","😛","🤑","🤓","😎","🤗", + "😏","😶","😐","😑","😒","🙄","🤔","😳","😞","😟","😠","😡","😔","😕", + "🙁","☹","😣","😖","😫","😩","😤","😮","😱","😨","😰","😯","😦","😧", + "😢","😥","😪","😓","😭","😵","😲","🤐","😷","🤒","🤕","😴","💤","💩", + "😈","👿","👹","👺","👻","💀","☠","👽","👾","🤖","😺","😸","😹","😻","😼","😽","🙀","😿","😾", + "🙌", + "👏", + "👍", + "👎", + "👊", + "✊", + "👋", + "👈", + "👉", + "👆", + "👇", + "👌", + "☝", + "✌", + "✋", + "🖐", + "👐", + "💪", + "🙏", + "🖖", + "🤘", + "🖕", + "✍", + "💅", + "👄","👅", + "👂", + "👃", + "👁","👀","🗣","👤","👥", + "👶", + "👦", + "👧", + "👨", + "👩", + "👱‍♀", + "👱", + "👴", + "👵", + "👲", + "👳‍♀", + "👳", + "👮‍♀", + "👮", + "👷‍♀", + "👷", + "💂‍♀", + "💂", + "🕵‍♀", + "🕵", + "🎅", + "👸", + "👰", + "👼", + "🙇‍♀", + "🙇", + "💁", + "💁‍♂", + "🙅", + "🙅‍♂", + "🙆", + "🙆‍♂", + "🙋", + "🙋‍♂", + "🙎", + "🙎‍♂", + "🙍", + "🙍‍♂", + "💇", + "💇‍♂", + "💆", + "💆‍♂", + "💃", + "👯","👯‍♂", + "🚶‍♀", + "🚶", + "🏃‍♀", + "🏃", + "👫","👭","👬","💑","👩‍❤‍👩","👨‍❤‍👨","💏","👩‍❤‍💋‍👩","👨‍❤‍💋‍👨","👪","👨‍👩‍👧", + "👨‍👩‍👧‍👦","👨‍👩‍👦‍👦","👨‍👩‍👧‍👧","👩‍👩‍👦","👩‍👩‍👧","👩‍👩‍👧‍👦","👩‍👩‍👦‍👦", + "👩‍👩‍👧‍👧","👨‍👨‍👦","👨‍👨‍👧","👨‍👨‍👧‍👦","👨‍👨‍👦‍👦","👨‍👨‍👧‍👧","👩‍👦","👩‍👧", + "👩‍👧‍👦","👩‍👦‍👦","👩‍👧‍👧","👨‍👦","👨‍👧","👨‍👧‍👦","👨‍👦‍👦","👨‍👧‍👧","👚","👕", + "👖","👔","👗","👙","👘","💄","💋","👣","👠","👡","👢","👞","👟","👒","🎩","🎓", + "👑","⛑","🎒","👝","👛","👜","💼","👓","🕶","💍","🌂","❤","💛","💚","💙","💜", + "💔","❣","💕","💞","💓","💗","💖","💘","💝" + }, + null, + new String[]{ + "🍏","🍎","🍐","🍊","🍋","🍌","🍉","🍇","🍓","🍈","🍒","🍑","🍍","🍅","🍆", + "🌶","🌽","🍠","🍯","🍞","🧀","🍗","🍖","🍤","🍳","🍔","🍟","🌭","🍕","🍝", + "🌮","🌯","🍜","🍲","🍥","🍣","🍱","🍛","🍙","🍚","🍘","🍢","🍡","🍧","🍨", + "🍦","🍰","🎂","🍮","🍬","🍭","🍫","🍿","🍩","🍪","🍺","🍻","🍷","🍸","🍹", + "🍾","🍶","🍵","☕","🍼","🍴","🍽","⚽","🏀","🏈","⚾","🎾","🏐","🏉","🎱", + "🏓","🏸","🏒","🏑","🏏","🏹","⛳","🎣","⛸","🎿","⛷","🏂", + "🏋‍♀", + "🏋", + "⛹‍♀", + "⛹", + "🏌‍♀","🏌", + "🏄‍♀", + "🏄", + "🏊‍♀", + "🏊", + "🚣‍♀", + "🚣","🏇", + "🚴‍♀", + "🚴", + "🚵‍♀", + "🚵", + "🛀", + "🕴","🎗","🎽","🏅","🎖","🏆","🏵","🎯","🎫","🎟","🎭","🎨","🎪","🎬","🎤","🎧", + "🎼","🎹","🎷","🎺","🎸","🎻","🎮","🎰","🎲","🎳","⌚","📱","📲","💻","⌨","🖥", + "🖨","🖱","🖲","🕹","🗜","💽","💾","💿","📀","📼","📷","📸","📹","🎥","📽","🎞", + "📞","☎","📟","📠","📺","📻","🎙","🎚","🎛","⏱","⏲","⏰","🕰","⏳","⌛","📡", + "🔋","🔌","💡","🔦","🕯","🗑","🛢","💸","💵","💴","💶","💷","💰","💳","💎","⚖", + "🔧","🔨","⚒","🛠","⛏","🔩","⚙","⛓","🔫","💣","🔪","🗡","⚔","🛡","🚬","⚰","⚱", + "🏺","🔮","📿","💈","⚗","🔭","🔬","🕳","💊","💉","🌡","🚽","🚿","🛁","🛎","🔑", + "🗝","🚪","🛋","🛌","🛏","🖼","⛱","🗿","🛍","🎁","🎈","🎏","🎀","🎊","🎉","🎐", + "🏮","🎎","✉","📩","📨","📧","💌","📥","📤","📦","🏷","🔖","📪","📫","📬","📭", + "📮","📯","📜","📃","📄","📑","📊","📈","📉","🗒","🗓","📆","📅","📇","🗃","🗳", + "🗄","📋","📁","📂","🗂","🗞","📰","📓","📔","📒","📕","📗","📘","📙","📚","📖", + "🔗","📎","🖇","📐","📏","✂","📌","📍","🚩","🎌","🏳","🏴","🏁","🏳‍🌈","🖌","🖍", + "🖊","🖋","✒","📝","✏","🔏","🔐","🔒","🔓","🔍","🔎" + }, + null, + null + }; + + public static final String[][] data = { + new String[]{ + "😀","😬","😁","😂","😃","😄","😅","😆","😇","😉","😊","🙂","🙃","☺","😋","😌", + "😍","😘","😗","😙","😚","😜","😝","😛","🤑","🤓","😎","🤗","😏","😶","😐","😑", + "😒","🙄","🤔","😳","😞","😟","😠","😡","😔","😕","🙁","☹","😣","😖","😫","😩", + "😤","😮","😱","😨","😰","😯","😦","😧","😢","😥","😪","😓","😭","😵","😲","🤐", + "😷","🤒","🤕","😴","💤","💩","😈","👿","👹","👺","👻","💀","☠","👽","👾","🤖", + "😺","😸","😹","😻","😼","😽","🙀","😿","😾","🙌","🙌🏻","🙌🏼","🙌🏽","🙌🏾", + "🙌🏿","👏","👏🏻","👏🏼","👏🏽","👏🏾","👏🏿","👍","👍🏻","👍🏼","👍🏽","👍🏾", + "👍🏿","👎","👎🏻","👎🏼","👎🏽","👎🏾","👎🏿","👊","👊🏻","👊🏼","👊🏽","👊🏾", + "👊🏿","✊","✊🏻","✊🏼","✊🏽","✊🏾","✊🏿","👋","👋🏻","👋🏼","👋🏽","👋🏾", + "👋🏿","👈","👈🏻","👈🏼","👈🏽","👈🏾","👈🏿","👉","👉🏻","👉🏼","👉🏽","👉🏾", + "👉🏿","👆","👆🏻","👆🏼","👆🏽","👆🏾","👆🏿","👇","👇🏻","👇🏼","👇🏽","👇🏾", + "👇🏿","👌","👌🏻","👌🏼","👌🏽","👌🏾","👌🏿","☝","☝🏻","☝🏼","☝🏽","☝🏾","☝🏿", + "✌","✌🏻","✌🏼","✌🏽","✌🏾","✌🏿","✋","✋🏻","✋🏼","✋🏽","✋🏾","✋🏿","🖐", + "🖐🏻","🖐🏼","🖐🏽","🖐🏾","🖐🏿","👐","👐🏻","👐🏼","👐🏽","👐🏾","👐🏿","💪", + "💪🏻","💪🏼","💪🏽","💪🏾","💪🏿","🙏","🙏🏻","🙏🏼","🙏🏽","🙏🏾","🙏🏿","🖖", + "🖖🏻","🖖🏼","🖖🏽","🖖🏾","🖖🏿","🤘","🤘🏻","🤘🏼","🤘🏽","🤘🏾","🤘🏿","🖕", + "🖕🏻","🖕🏼","🖕🏽","🖕🏾","🖕🏿","✍","✍🏻","✍🏼","✍🏽","✍🏾","✍🏿","💅","💅🏻", + "💅🏼","💅🏽","💅🏾","💅🏿","👄","👅","👂","👂🏻","👂🏼","👂🏽","👂🏾","👂🏿","👃", + "👃🏻","👃🏼","👃🏽","👃🏾","👃🏿","👁","👀","🗣","👤","👥","👶","👶🏻","👶🏼","👶🏽", + "👶🏾","👶🏿","👦","👦🏻","👦🏼","👦🏽","👦🏾","👦🏿","👧","👧🏻","👧🏼","👧🏽","👧🏾", + "👧🏿","👨","👨🏻","👨🏼","👨🏽","👨🏾","👨🏿","👩","👩🏻","👩🏼","👩🏽","👩🏾","👩🏿", + "👱‍♀","👱🏻‍♀","👱🏼‍♀","👱🏽‍♀","👱🏾‍♀","👱🏿‍♀","👱","👱🏻","👱🏼","👱🏽","👱🏾","👱🏿", + "👴","👴🏻","👴🏼","👴🏽","👴🏾","👴🏿","👵","👵🏻","👵🏼","👵🏽","👵🏾","👵🏿","👲", + "👲🏻","👲🏼","👲🏽","👲🏾","👲🏿","👳‍♀","👳🏻‍♀","👳🏼‍♀","👳🏽‍♀","👳🏾‍♀","👳🏿‍♀", + "👳","👳🏻","👳🏼","👳🏽","👳🏾","👳🏿","👮‍♀","👮🏻‍♀","👮🏼‍♀","👮🏽‍♀","👮🏾‍♀", + "👮🏿‍♀","👮","👮🏻","👮🏼","👮🏽","👮🏾","👮🏿","👷‍♀","👷🏻‍♀","👷🏼‍♀","👷🏽‍♀", + "👷🏾‍♀","👷🏿‍♀","👷","👷🏻","👷🏼","👷🏽","👷🏾","👷🏿","💂‍♀","💂🏻‍♀","💂🏼‍♀", + "💂🏽‍♀","💂🏾‍♀","💂🏿‍♀","💂","💂🏻","💂🏼","💂🏽","💂🏾","💂🏿","🕵‍♀","🕵🏻‍♀", + "🕵🏼‍♀","🕵🏽‍♀","🕵🏾‍♀","🕵🏿‍♀","🕵","🕵🏻","🕵🏼","🕵🏽","🕵🏾","🕵🏿","🎅", + "🎅🏻","🎅🏼","🎅🏽","🎅🏾","🎅🏿","👸","👸🏻","👸🏼","👸🏽","👸🏾","👸🏿","👰", + "👰🏻","👰🏼","👰🏽","👰🏾","👰🏿","👼","👼🏻","👼🏼","👼🏽","👼🏾","👼🏿","🙇‍♀", + "🙇🏻‍♀","🙇🏼‍♀","🙇🏽‍♀","🙇🏾‍♀","🙇🏿‍♀","🙇","🙇🏻","🙇🏼","🙇🏽","🙇🏾","🙇🏿", + "💁","💁🏻","💁🏼","💁🏽","💁🏾","💁🏿","💁‍♂","💁🏻‍♂","💁🏼‍♂","💁🏽‍♂","💁🏾‍♂", + "💁🏿‍♂","🙅","🙅🏻","🙅🏼","🙅🏽","🙅🏾","🙅🏿","🙅‍♂","🙅🏻‍♂","🙅🏼‍♂","🙅🏽‍♂", + "🙅🏾‍♂","🙅🏿‍♂","🙆","🙆🏻","🙆🏼","🙆🏽","🙆🏾","🙆🏿","🙆‍♂","🙆🏻‍♂","🙆🏼‍♂","🙆🏽‍♂", + "🙆🏾‍♂","🙆🏿‍♂","🙋","🙋🏻","🙋🏼","🙋🏽","🙋🏾","🙋🏿","🙋‍♂","🙋🏻‍♂","🙋🏼‍♂","🙋🏽‍♂", + "🙋🏾‍♂","🙋🏿‍♂","🙎","🙎🏻","🙎🏼","🙎🏽","🙎🏾","🙎🏿","🙎‍♂","🙎🏻‍♂","🙎🏼‍♂","🙎🏽‍♂", + "🙎🏾‍♂","🙎🏿‍♂","🙍","🙍🏻","🙍🏼","🙍🏽","🙍🏾","🙍🏿","🙍‍♂","🙍🏻‍♂","🙍🏼‍♂","🙍🏽‍♂", + "🙍🏾‍♂","🙍🏿‍♂","💇","💇🏻","💇🏼","💇🏽","💇🏾","💇🏿","💇‍♂","💇🏻‍♂","💇🏼‍♂","💇🏽‍♂", + "💇🏾‍♂","💇🏿‍♂","💆","💆🏻","💆🏼","💆🏽","💆🏾","💆🏿","💆‍♂","💆🏻‍♂","💆🏼‍♂","💆🏽‍♂", + "💆🏾‍♂","💆🏿‍♂","💃","💃🏻","💃🏼","💃🏽","💃🏾","💃🏿","👯","👯‍♂","🚶‍♀","🚶🏻‍♀","🚶🏼‍♀", + "🚶🏽‍♀","🚶🏾‍♀","🚶🏿‍♀","🚶","🚶🏻","🚶🏼","🚶🏽","🚶🏾","🚶🏿","🏃‍♀","🏃🏻‍♀","🏃🏼‍♀", + "🏃🏽‍♀","🏃🏾‍♀","🏃🏿‍♀","🏃","🏃🏻","🏃🏼","🏃🏽","🏃🏾","🏃🏿","👫","👭","👬","💑","👩‍❤‍👩", + "👨‍❤‍👨","💏","👩‍❤‍💋‍👩","👨‍❤‍💋‍👨","👪","👨‍👩‍👧","👨‍👩‍👧‍👦","👨‍👩‍👦‍👦","👨‍👩‍👧‍👧","👩‍👩‍👦", + "👩‍👩‍👧","👩‍👩‍👧‍👦","👩‍👩‍👦‍👦","👩‍👩‍👧‍👧","👨‍👨‍👦","👨‍👨‍👧","👨‍👨‍👧‍👦","👨‍👨‍👦‍👦","👨‍👨‍👧‍👧", + "👩‍👦","👩‍👧","👩‍👧‍👦","👩‍👦‍👦","👩‍👧‍👧","👨‍👦","👨‍👧","👨‍👧‍👦","👨‍👦‍👦","👨‍👧‍👧","👚","👕", + "👖","👔","👗","👙","👘","💄","💋","👣","👠","👡","👢","👞","👟","👒","🎩","🎓","👑","⛑","🎒", + "👝","👛","👜","💼","👓","🕶","💍","🌂","❤","💛","💚","💙","💜","💔","❣","💕","💞","💓","💗","💖","💘","💝" + }, + new String[]{ + "🐶","🐱","🐭","🐹","🐰","🐻","🐼","🐨","🐯","🦁","🐮","🐷","🐽","🐸","🐙","🐵","🙈","🙉", + "🙊","🐒","🐔","🐧","🐦","🐤","🐣","🐥","🐺","🐗","🐴","🦄","🐝","🐛","🐌","🐞","🐜","🕷", + "🦂","🦀","🐍","🐢","🐠","🐟","🐡","🐬","🐳","🐋","🐊","🐆","🐅","🐃","🐂","🐄","🐪","🐫", + "🐘","🐐","🐏","🐑","🐎","🐖","🐀","🐁","🐓","🦃","🕊","🐕","🐩","🐈","🐇","🐿","🐾","🐉", + "🐲","🌵","🎄","🌲","🌳","🌴","🌱","🌿","☘","🍀","🎍","🎋","🍃","🍂","🍁","🌾","🌺","🌻", + "🌹","🌷","🌼","🌸","💐","🍄","🌰","🎃","🐚","🕸","🌎","🌍","🌏","🌕","🌖","🌗","🌘","🌑", + "🌒","🌓","🌔","🌚","🌝","🌛","🌜","🌞","🌙","⭐","🌟","💫","✨","☄","☀","🌤","⛅","🌥", + "🌦","☁","🌧","⛈","🌩","⚡","🔥","💥","❄","🌨","☃","⛄","🌬","💨","🌪","🌫","☂","☔","💧","💦","🌊" + }, + new String[]{ + "🍏","🍎","🍐","🍊","🍋","🍌","🍉","🍇","🍓","🍈","🍒","🍑","🍍","🍅","🍆","🌶","🌽", + "🍠","🍯","🍞","🧀","🍗","🍖","🍤","🍳","🍔","🍟","🌭","🍕","🍝","🌮","🌯","🍜","🍲", + "🍥","🍣","🍱","🍛","🍙","🍚","🍘","🍢","🍡","🍧","🍨","🍦","🍰","🎂","🍮","🍬","🍭", + "🍫","🍿","🍩","🍪","🍺","🍻","🍷","🍸","🍹","🍾","🍶","🍵","☕","🍼","🍴","🍽","⚽", + "🏀","🏈","⚾","🎾","🏐","🏉","🎱","🏓","🏸","🏒","🏑","🏏","🏹","⛳","🎣","⛸","🎿", + "⛷","🏂","🏋‍♀","🏋🏻‍♀","🏋🏼‍♀","🏋🏽‍♀","🏋🏾‍♀","🏋🏿‍♀","🏋","🏋🏻","🏋🏼","🏋🏽", + "🏋🏾","🏋🏿","⛹‍♀","⛹🏻‍♀","⛹🏼‍♀","⛹🏽‍♀","⛹🏾‍♀","⛹🏿‍♀","⛹","⛹🏻","⛹🏼", + "⛹🏽","⛹🏾","⛹🏿","🏌‍♀","🏌","🏄‍♀","🏄🏻‍♀","🏄🏼‍♀","🏄🏽‍♀","🏄🏾‍♀","🏄🏿‍♀", + "🏄","🏄🏻","🏄🏼","🏄🏽","🏄🏾","🏄🏿","🏊‍♀","🏊🏻‍♀","🏊🏼‍♀","🏊🏽‍♀","🏊🏾‍♀", + "🏊🏿‍♀","🏊","🏊🏻","🏊🏼","🏊🏽","🏊🏾","🏊🏿","🚣‍♀","🚣🏻‍♀","🚣🏼‍♀","🚣🏽‍♀", + "🚣🏾‍♀","🚣🏿‍♀","🚣","🚣🏻","🚣🏼","🚣🏽","🚣🏾","🚣🏿","🏇","🚴‍♀","🚴🏻‍♀","🚴🏼‍♀", + "🚴🏽‍♀","🚴🏾‍♀","🚴🏿‍♀","🚴","🚴🏻","🚴🏼","🚴🏽","🚴🏾","🚴🏿","🚵‍♀","🚵🏻‍♀","🚵🏼‍♀", + "🚵🏽‍♀","🚵🏾‍♀","🚵🏿‍♀","🚵","🚵🏻","🚵🏼","🚵🏽","🚵🏾","🚵🏿","🛀","🛀🏻","🛀🏼", + "🛀🏽","🛀🏾","🛀🏿","🕴","🎗","🎽","🏅","🎖","🏆","🏵","🎯","🎫","🎟","🎭","🎨","🎪", + "🎬","🎤","🎧","🎼","🎹","🎷","🎺","🎸","🎻","🎮","🎰","🎲","🎳","⌚","📱","📲","💻", + "⌨","🖥","🖨","🖱","🖲","🕹","🗜","💽","💾","💿","📀","📼","📷","📸","📹","🎥","📽", + "🎞","📞","☎","📟","📠","📺","📻","🎙","🎚","🎛","⏱","⏲","⏰","🕰","⏳","⌛","📡", + "🔋","🔌","💡","🔦","🕯","🗑","🛢","💸","💵","💴","💶","💷","💰","💳","💎","⚖","🔧", + "🔨","⚒","🛠","⛏","🔩","⚙","⛓","🔫","💣","🔪","🗡","⚔","🛡","🚬","⚰","⚱","🏺","🔮", + "📿","💈","⚗","🔭","🔬","🕳","💊","💉","🌡","🚽","🚿","🛁","🛎","🔑","🗝","🚪","🛋","🛌", + "🛏","🖼","⛱","🗿","🛍","🎁","🎈","🎏","🎀","🎊","🎉","🎐","🏮","🎎","✉","📩","📨","📧", + "💌","📥","📤","📦","🏷","🔖","📪","📫","📬","📭","📮","📯","📜","📃","📄","📑","📊","📈", + "📉","🗒","🗓","📆","📅","📇","🗃","🗳","🗄","📋","📁","📂","🗂","🗞","📰","📓","📔","📒", + "📕","📗","📘","📙","📚","📖","🔗","📎","🖇","📐","📏","✂","📌","📍","🚩","🎌","🏳","🏴", + "🏁","🏳‍🌈","🖌","🖍","🖊","🖋","✒","📝","✏","🔏","🔐","🔒","🔓","🔍","🔎" + }, + new String[]{ + "🚗","🚕","🚙","🚌","🚎","🏎","🚓","🚑","🚒","🚐","🚚","🚛","🚜","🏍","🚲","🚨","🚔","🚍", + "🚘","🚖","🚡","🚠","🚟","🚃","🚋","🚝","🚄","🚅","🚈","🚞","🚂","🚆","🚇","🚊","🚉","🚁", + "🛩","✈","🛫","🛬","⛵","🛥","🚤","⛴","🛳","🚀","🛰","💺","⚓","🚧","⛽","🚏","🚦","🚥", + "🗺","🚢","🎡","🎢","🎠","🏗","🌁","🗼","🏭","⛲","🎑","⛰","🏔","🗻","🌋","🗾","🏕","⛺", + "🏞","🛣","🛤","🌅","🌄","🏜","🏖","🏝","🌇","🌆","🏙","🌃","🌉","🌌","🌠","🎇","🎆","🌈", + "🏘","🏰","🏯","🏟","🗽","🏠","🏡","🏚","🏢","🏬","🏣","🏤","🏥","🏦","🏨","🏪","🏫","🏩", + "💒","🏛","⛪","🕌","🕍","🕋","⛩","🇦🇺","🇦🇹","🇦🇿","🇦🇽","🇦🇱","🇩🇿","🇦🇸","🇦🇮","🇦🇴", + "🇦🇩","🇦🇶","🇦🇬","🇦🇷","🇦🇲","🇦🇼","🇦🇫","🇧🇸","🇧🇩","🇧🇧","🇧🇭","🇧🇾","🇧🇿","🇧🇪", + "🇧🇯","🇧🇲","🇧🇬","🇧🇴","🇧🇶","🇧🇦","🇧🇼","🇧🇷","🇮🇴","🇧🇳","🇧🇫","🇧🇮","🇧🇹","🇻🇺", + "🇻🇦","🇬🇧","🇭🇺","🇻🇪","🇻🇬","🇻🇮","🇹🇱","🇻🇳","🇬🇦","🇭🇹","🇬🇾","🇬🇲","🇬🇭","🇬🇵", + "🇬🇹","🇬🇳","🇬🇼","🇩🇪","🇬🇬","🇬🇮","🇭🇳","🇭🇰","🇬🇩","🇬🇱","🇬🇷","🇬🇪","🇬🇺","🇩🇰", + "🇯🇪","🇩🇯","🇩🇲","🇩🇴","🇪🇺","🇪🇬","🇿🇲","🇪🇭","🇿🇼","🇮🇱","🇮🇳","🇮🇩","🇯🇴","🇮🇶", + "🇮🇷","🇮🇪","🇮🇸","🇪🇸","🇮🇹","🇾🇪","🇨🇻","🇰🇿","🇰🇾","🇰🇭","🇨🇲","🇨🇦","🇮🇨","🇶🇦", + "🇰🇪","🇨🇾","🇰🇬","🇰🇮","🇨🇳","🇰🇵","🇨🇨","🇨🇴","🇰🇲","🇨🇬","🇨🇩","🇽🇰","🇨🇷","🇨🇮", + "🇨🇺","🇰🇼","🇨🇼","🇱🇦","🇱🇻","🇱🇸","🇱🇷","🇱🇧","🇱🇾","🇱🇹","🇱🇮","🇱🇺","🇲🇺","🇲🇷", + "🇲🇬","🇾🇹","🇲🇴","🇲🇰","🇲🇼","🇲🇾","🇲🇱","🇲🇻","🇲🇹","🇲🇦","🇲🇶","🇲🇭","🇲🇽","🇫🇲", + "🇲🇿","🇲🇩","🇲🇨","🇲🇳","🇲🇸","🇲🇲","🇳🇦","🇳🇷","🇳🇵","🇳🇪","🇳🇬","🇳🇱","🇳🇮","🇳🇺", + "🇳🇿","🇳🇨","🇳🇴","🇮🇲","🇳🇫","🇨🇽","🇸🇭","🇨🇰","🇹🇨","🇦🇪","🇴🇲","🇵🇳","🇵🇰","🇵🇼", + "🇵🇸","🇵🇦","🇵🇬","🇵🇾","🇵🇪","🇵🇱","🇵🇹","🇵🇷","🇰🇷","🇷🇪","🇷🇺","🇷🇼","🇷🇴","🇸🇻", + "🇼🇸","🇸🇲","🇸🇹","🇸🇦","🇸🇿","🇲🇵","🇸🇨","🇧🇱","🇵🇲","🇸🇳","🇻🇨","🇰🇳","🇱🇨","🇷🇸", + "🇸🇬","🇸🇽","🇸🇾","🇸🇰","🇸🇮","🇺🇸","🇸🇧","🇸🇴","🇸🇩","🇸🇷","🇸🇱","🇹🇯","🇹🇭","🇹🇼", + "🇹🇿","🇹🇬","🇹🇰","🇹🇴","🇹🇹","🇹🇻","🇹🇳","🇹🇲","🇹🇷","🇺🇬","🇺🇿","🇺🇦","🇼🇫","🇺🇾", + "🇫🇴","🇫🇯","🇵🇭","🇫🇮","🇫🇰","🇫🇷","🇬🇫","🇵🇫","🇹🇫","🇭🇷","🇨🇫","🇹🇩","🇲🇪","🇨🇿", + "🇨🇱","🇨🇭","🇸🇪","🇱🇰","🇪🇨","🇬🇶","🇪🇷","🇪🇪","🇪🇹","🇿🇦","🇬🇸","🇸🇸","🇯🇲","🇯🇵" + }, + new String[]{ + "💟","☮","✝","☪","🕉","☸","✡","🔯","🕎","☯","☦","🛐","⛎","♈","♉","♊","♋","♌","♍","♎","♏", + "♐","♑","♒","♓","🆔","⚛","🈳","🈹","☢","☣","📴","📳","🈶","🈚","🈸","🈺","🈷","✴","🆚","🉑", + "💮","🉐","㊙","㊗","🈴","🈵","🈲","🅰","🅱","🆎","🆑","🅾","🆘","⛔","📛","🚫","❌","⭕","💢", + "♨","🚷","🚯","🚳","🚱","🔞","📵","❗","❕","❓","❔","‼","⁉","💯","🔅","🔆","🔱","⚜","〽","⚠", + "🚸","🔰","♻","🈯","💹","❇","✳","❎","✅","🌐","Ⓜ","💠","🌀","➿","🏧","🈂","🛂","🛃","🛄", + "🛅","♿","🚭","🚾","🅿","🚰","🚹","🚺","🚼","🚻","🚮","🎦","📶","🈁","🔤","🔡","🔠","🔣","ℹ", + "🆖","🆗","🆙","🆒","🆕","🆓","0⃣","1⃣","2⃣","3⃣","4⃣","5⃣","6⃣","7⃣","8⃣","9⃣","🔟","🔢","#⃣","*⃣","▶", + "⏸","⏯","⏹","⏺","⏭","⏮","⏩","⏪","⏫","⏬","◀","🔼","🔽","➡","⬅","⬆","⬇","↗","↘","↙", + "↖","↕","↔","↪","↩","⤴","⤵","🔀","🔁","🔂","🔄","🔃","🎵","🎶","〰","➰","✔","➕","➖","➗", + "✖","💲","💱","™","©","®","🔚","🔙","🔛","🔝","🔜","☑","🔘","⚪","⚫","🔴","🔵","🔺","🔻","🔸", + "🔹","🔶","🔷","🔳","🔲","▪","▫","◾","◽","◼","◻","⬛","⬜","🔇","🔈","🔉","🔊","🔕","🔔","📣", + "📢","👁‍🗨","💬","💭","🗯","🃏","🀄","🎴","♠","♣","♥","♦","🕐","🕑","🕒","🕓","🕔","🕕","🕖", + "🕗","🕘","🕙","🕚","🕛","🕜","🕝","🕞","🕟","🕠","🕡","🕢","🕣","🕤","🕥","🕦","🕧" + } + }; + + public static final HashMap emojiToFE0FMap = new HashMap<>(emojiToFE0F.length); + public static final HashMap dataCharsMap = new HashMap<>(dataChars.length); + public static final HashMap emojiColoredMap = new HashMap<>(emojiColored.length); + + static { + for (int a = 0; a < emojiToFE0F.length; a++) { + emojiToFE0FMap.put(emojiToFE0F[a], true); + } + for (int a = 0; a < dataChars.length; a++) { + dataCharsMap.put(dataChars[a], true); + } + for (int a = 0; a < emojiColored.length; a++) { + emojiColoredMap.put(emojiColored[a], true); + } + dataColored[1] = data[1]; + dataColored[3] = data[3]; + dataColored[4] = data[4]; + } +} diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/SmileProcessor.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/SmileProcessor.java deleted file mode 100644 index 46dc2380b0..0000000000 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/SmileProcessor.java +++ /dev/null @@ -1,908 +0,0 @@ -/* - * Copyright (C) 2015 Actor LLC. - */ - -package im.actor.sdk.view.emoji; - -import android.app.Application; -import android.graphics.Bitmap; -import android.graphics.Canvas; -import android.graphics.Paint; -import android.graphics.Rect; -import android.os.Build; -import android.os.Handler; -import android.os.Looper; -import android.os.Process; -import android.text.Spannable; -import android.text.TextPaint; -import android.text.style.ReplacementSpan; -import android.util.TypedValue; - -import java.io.File; -import java.io.InputStream; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; -import java.util.concurrent.CopyOnWriteArrayList; - -import im.actor.core.utils.IOUtils; -import im.actor.sdk.util.images.common.ImageMetadata; -import im.actor.sdk.util.images.ops.ImageLoading; -import im.actor.sdk.util.images.sources.FileSource; -import im.actor.sdk.view.emoji.smiles.SmilesPack; -import im.actor.sdk.view.emoji.smiles.SmilesRecentListener; -import im.actor.sdk.view.emoji.smiles.SmilesRecentsController; -import im.actor.sdk.view.emoji.smiles.SmileysPack; -import im.actor.sdk.view.emoji.keyboard.emoji.smiles.SmilesListener; -import im.actor.runtime.Log; - - -public class SmileProcessor { - - private static final String TAG = "Emoji"; - - private static final int COUNT_IN_ROW = 32; - private static final int COUNT_IN_COL = 26; - private static final int SECTION_SIDE = 8; - private static final int SECTION_ROW_COUNT = COUNT_IN_ROW / SECTION_SIDE; - private static final int SECTION_COL_COUNT = (int) Math.ceil((float) COUNT_IN_COL / SECTION_SIDE); - - public static final int CONFIGURATION_DIALOGS = 0; - public static final int CONFIGURATION_BUBBLES = 1; - - private static final long[] EMOJI_MAP = {2302179L, 3154147L, 3219683L, 3285219L, 3350755L, 3416291L, 3481827L, 3547363L, 3612899L, 3678435L, 3743971L, 169L, 174L, 8252L, 8265L, 8482L, 8505L, 8596L, 8597L, 8598L, 8599L, 8600L, 8601L, 8617L, 8618L, 8986L, 8987L, 9193L, 9194L, 9195L, 9196L, 9200L, 9203L, 9410L, 9642L, 9643L, 9654L, 9664L, 9723L, 9724L, 9725L, 9726L, 9728L, 9729L, 9742L, 9745L, 9748L, 9749L, 9757L, 9786L, 9800L, 9801L, 9802L, 9803L, 9804L, 9805L, 9806L, 9807L, 9808L, 9809L, 9810L, 9811L, 9824L, 9827L, 9829L, 9830L, 9832L, 9851L, 9855L, 9875L, 9888L, 9889L, 9898L, 9899L, 9917L, 9918L, 9924L, 9925L, 9934L, 9940L, 9962L, 9970L, 9971L, 9973L, 9978L, 9981L, 9986L, 9989L, 9992L, 9993L, 9994L, 9995L, 9996L, 9999L, 10002L, 10004L, 10006L, 10024L, 10035L, 10036L, 10052L, 10055L, 10060L, 10062L, 10067L, 10068L, 10069L, 10071L, 10084L, 10133L, 10134L, 10135L, 10145L, 10160L, 10175L, 10548L, 10549L, 11013L, 11014L, 11015L, 11035L, 11036L, 11088L, 11093L, 12336L, 12349L, 12951L, 12953L, 3627867140L, 3627867343L, 3627867504L, 3627867505L, 3627867518L, 3627867519L, 3627867534L, 3627867537L, 3627867538L, 3627867539L, 3627867540L, 3627867541L, 3627867542L, 3627867543L, 3627867544L, 3627867545L, 3627867546L, -2865171270784459277L, -2865171266489491990L, -2865171262194524680L, -2865171257899557385L, -2865171253604590105L, -2865171245014655495L, -2865171240719688203L, -2865171236424720905L, -2865171206359949830L, -2865171193475047944L, 3627867649L, 3627867650L, 3627867674L, 3627867695L, 3627867699L, 3627867701L, 3627867702L, 3627867703L, 3627867704L, 3627867705L, 3627867706L, 3627867728L, 3627867904L, 3627867905L, 3627867906L, 3627867907L, 3627867908L, 3627867909L, 3627867910L, 3627867911L, 3627867912L, 3627867913L, 3627867914L, 3627867915L, 3627867916L, 3627867917L, 3627867918L, 3627867919L, 3627867920L, 3627867921L, 3627867922L, 3627867923L, 3627867924L, 3627867925L, 3627867926L, 3627867927L, 3627867928L, 3627867929L, 3627867930L, 3627867931L, 3627867932L, 3627867933L, 3627867934L, 3627867935L, 3627867936L, 3627867952L, 3627867953L, 3627867954L, 3627867955L, 3627867956L, 3627867957L, 3627867959L, 3627867960L, 3627867961L, 3627867962L, 3627867963L, 3627867964L, 3627867965L, 3627867966L, 3627867967L, 3627867968L, 3627867969L, 3627867970L, 3627867971L, 3627867972L, 3627867973L, 3627867974L, 3627867975L, 3627867976L, 3627867977L, 3627867978L, 3627867979L, 3627867980L, 3627867981L, 3627867982L, 3627867983L, 3627867984L, 3627867985L, 3627867986L, 3627867987L, 3627867988L, 3627867989L, 3627867990L, 3627867991L, 3627867992L, 3627867993L, 3627867994L, 3627867995L, 3627867996L, 3627867997L, 3627867998L, 3627867999L, 3627868000L, 3627868001L, 3627868002L, 3627868003L, 3627868004L, 3627868005L, 3627868006L, 3627868007L, 3627868008L, 3627868009L, 3627868010L, 3627868011L, 3627868012L, 3627868013L, 3627868014L, 3627868015L, 3627868016L, 3627868017L, 3627868018L, 3627868019L, 3627868020L, 3627868021L, 3627868022L, 3627868023L, 3627868024L, 3627868025L, 3627868026L, 3627868027L, 3627868028L, 3627868032L, 3627868033L, 3627868034L, 3627868035L, 3627868036L, 3627868037L, 3627868038L, 3627868039L, 3627868040L, 3627868041L, 3627868042L, 3627868043L, 3627868044L, 3627868045L, 3627868046L, 3627868047L, 3627868048L, 3627868049L, 3627868050L, 3627868051L, 3627868064L, 3627868065L, 3627868066L, 3627868067L, 3627868068L, 3627868069L, 3627868070L, 3627868071L, 3627868072L, 3627868073L, 3627868074L, 3627868075L, 3627868076L, 3627868077L, 3627868078L, 3627868079L, 3627868080L, 3627868081L, 3627868082L, 3627868083L, 3627868084L, 3627868085L, 3627868086L, 3627868087L, 3627868088L, 3627868089L, 3627868090L, 3627868091L, 3627868092L, 3627868093L, 3627868094L, 3627868095L, 3627868096L, 3627868097L, 3627868098L, 3627868099L, 3627868100L, 3627868102L, 3627868103L, 3627868104L, 3627868105L, 3627868106L, 3627868128L, 3627868129L, 3627868130L, 3627868131L, 3627868132L, 3627868133L, 3627868134L, 3627868135L, 3627868136L, 3627868137L, 3627868138L, 3627868139L, 3627868140L, 3627868141L, 3627868142L, 3627868143L, 3627868144L, 3627932672L, 3627932673L, 3627932674L, 3627932675L, 3627932676L, 3627932677L, 3627932678L, 3627932679L, 3627932680L, 3627932681L, 3627932682L, 3627932683L, 3627932684L, 3627932685L, 3627932686L, 3627932687L, 3627932688L, 3627932689L, 3627932690L, 3627932691L, 3627932692L, 3627932693L, 3627932694L, 3627932695L, 3627932696L, 3627932697L, 3627932698L, 3627932699L, 3627932700L, 3627932701L, 3627932702L, 3627932703L, 3627932704L, 3627932705L, 3627932706L, 3627932707L, 3627932708L, 3627932709L, 3627932710L, 3627932711L, 3627932712L, 3627932713L, 3627932714L, 3627932715L, 3627932716L, 3627932717L, 3627932718L, 3627932719L, 3627932720L, 3627932721L, 3627932722L, 3627932723L, 3627932724L, 3627932725L, 3627932726L, 3627932727L, 3627932728L, 3627932729L, 3627932730L, 3627932731L, 3627932732L, 3627932733L, 3627932734L, 3627932736L, 3627932738L, 3627932739L, 3627932740L, 3627932741L, 3627932742L, 3627932743L, 3627932744L, 3627932745L, 3627932746L, 3627932747L, 3627932748L, 3627932749L, 3627932750L, 3627932751L, 3627932752L, 3627932753L, 3627932754L, 3627932755L, 3627932756L, 3627932757L, 3627932758L, 3627932759L, 3627932760L, 3627932761L, 3627932762L, 3627932763L, 3627932764L, 3627932765L, 3627932766L, 3627932767L, 3627932768L, 3627932769L, 3627932770L, 3627932771L, 3627932772L, 3627932773L, 3627932774L, 3627932775L, 3627932776L, 3627932777L, 3627932778L, 3627932779L, 3627932780L, 3627932781L, 3627932782L, 3627932783L, 3627932784L, 3627932785L, 3627932786L, 3627932787L, 3627932788L, 3627932789L, 3627932790L, 3627932791L, 3627932792L, 3627932793L, 3627932794L, 3627932795L, 3627932796L, 3627932797L, 3627932798L, 3627932799L, 3627932800L, 3627932801L, 3627932802L, 3627932803L, 3627932804L, 3627932805L, 3627932806L, 3627932807L, 3627932808L, 3627932809L, 3627932810L, 3627932811L, 3627932812L, 3627932813L, 3627932814L, 3627932815L, 3627932816L, 3627932817L, 3627932818L, 3627932819L, 3627932820L, 3627932821L, 3627932822L, 3627932823L, 3627932824L, 3627932825L, 3627932826L, 3627932827L, 3627932828L, 3627932829L, 3627932830L, 3627932831L, 3627932832L, 3627932833L, 3627932834L, 3627932835L, 3627932836L, 3627932837L, 3627932838L, 3627932839L, 3627932840L, 3627932841L, 3627932842L, 3627932843L, 3627932844L, 3627932845L, 3627932846L, 3627932847L, 3627932848L, 3627932849L, 3627932850L, 3627932851L, 3627932852L, 3627932853L, 3627932854L, 3627932855L, 3627932856L, 3627932857L, 3627932858L, 3627932859L, 3627932860L, 3627932861L, 3627932862L, 3627932863L, 3627932864L, 3627932865L, 3627932866L, 3627932867L, 3627932868L, 3627932869L, 3627932870L, 3627932871L, 3627932872L, 3627932873L, 3627932874L, 3627932875L, 3627932876L, 3627932877L, 3627932878L, 3627932879L, 3627932880L, 3627932881L, 3627932882L, 3627932883L, 3627932884L, 3627932885L, 3627932886L, 3627932887L, 3627932888L, 3627932889L, 3627932890L, 3627932891L, 3627932892L, 3627932893L, 3627932894L, 3627932895L, 3627932896L, 3627932897L, 3627932898L, 3627932899L, 3627932900L, 3627932901L, 3627932902L, 3627932903L, 3627932904L, 3627932905L, 3627932906L, 3627932907L, 3627932908L, 3627932909L, 3627932910L, 3627932911L, 3627932912L, 3627932913L, 3627932914L, 3627932915L, 3627932916L, 3627932917L, 3627932918L, 3627932919L, 3627932921L, 3627932922L, 3627932923L, 3627932924L, 3627932928L, 3627932929L, 3627932930L, 3627932931L, 3627932932L, 3627932933L, 3627932934L, 3627932935L, 3627932936L, 3627932937L, 3627932938L, 3627932939L, 3627932940L, 3627932941L, 3627932942L, 3627932943L, 3627932944L, 3627932945L, 3627932946L, 3627932947L, 3627932948L, 3627932949L, 3627932950L, 3627932951L, 3627932952L, 3627932953L, 3627932954L, 3627932955L, 3627932956L, 3627932957L, 3627932958L, 3627932959L, 3627932960L, 3627932961L, 3627932962L, 3627932963L, 3627932964L, 3627932965L, 3627932966L, 3627932967L, 3627932968L, 3627932969L, 3627932970L, 3627932971L, 3627932972L, 3627932973L, 3627932974L, 3627932975L, 3627932976L, 3627932977L, 3627932978L, 3627932979L, 3627932980L, 3627932981L, 3627932982L, 3627932983L, 3627932984L, 3627932985L, 3627932986L, 3627932987L, 3627932988L, 3627932989L, 3627933008L, 3627933009L, 3627933010L, 3627933011L, 3627933012L, 3627933013L, 3627933014L, 3627933015L, 3627933016L, 3627933017L, 3627933018L, 3627933019L, 3627933179L, 3627933180L, 3627933181L, 3627933182L, 3627933183L, 3627933184L, 3627933185L, 3627933186L, 3627933187L, 3627933188L, 3627933189L, 3627933190L, 3627933191L, 3627933192L, 3627933193L, 3627933194L, 3627933195L, 3627933196L, 3627933197L, 3627933198L, 3627933199L, 3627933200L, 3627933201L, 3627933202L, 3627933203L, 3627933204L, 3627933205L, 3627933206L, 3627933207L, 3627933208L, 3627933209L, 3627933210L, 3627933211L, 3627933212L, 3627933213L, 3627933214L, 3627933215L, 3627933216L, 3627933217L, 3627933218L, 3627933219L, 3627933220L, 3627933221L, 3627933222L, 3627933223L, 3627933224L, 3627933225L, 3627933226L, 3627933227L, 3627933228L, 3627933229L, 3627933230L, 3627933231L, 3627933232L, 3627933233L, 3627933234L, 3627933235L, 3627933236L, 3627933237L, 3627933238L, 3627933239L, 3627933240L, 3627933241L, 3627933242L, 3627933243L, 3627933244L, 3627933245L, 3627933246L, 3627933247L, 3627933248L, 3627933253L, 3627933254L, 3627933255L, 3627933256L, 3627933257L, 3627933258L, 3627933259L, 3627933260L, 3627933261L, 3627933262L, 3627933263L, 3627933312L, 3627933313L, 3627933314L, 3627933315L, 3627933316L, 3627933317L, 3627933318L, 3627933319L, 3627933320L, 3627933321L, 3627933322L, 3627933323L, 3627933324L, 3627933325L, 3627933326L, 3627933327L, 3627933328L, 3627933329L, 3627933330L, 3627933331L, 3627933332L, 3627933333L, 3627933334L, 3627933335L, 3627933336L, 3627933337L, 3627933338L, 3627933339L, 3627933340L, 3627933341L, 3627933342L, 3627933343L, 3627933344L, 3627933345L, 3627933346L, 3627933347L, 3627933348L, 3627933349L, 3627933350L, 3627933351L, 3627933352L, 3627933353L, 3627933354L, 3627933355L, 3627933356L, 3627933357L, 3627933358L, 3627933359L, 3627933360L, 3627933361L, 3627933362L, 3627933363L, 3627933364L, 3627933365L, 3627933366L, 3627933367L, 3627933368L, 3627933369L, 3627933370L, 3627933371L, 3627933372L, 3627933373L, 3627933374L, 3627933375L, 3627933376L, 3627933377L, 3627933378L, 3627933379L, 3627933380L, 3627933381L}; - private static final long[] EMOJI_SORTED; - private static final long minEmoji1; - private static final long maxEmoji1; - private static final long minEmoji2; - private static final long maxEmoji2; - private static final HashSet EMOJI_SET = new HashSet<>(EMOJI_MAP.length); - - static { - for (int i = 0; i < EMOJI_MAP.length; i++) { - EMOJI_SET.add(EMOJI_MAP[i]); - } - EMOJI_SORTED = new long[EMOJI_MAP.length]; - long min1 = 0xFFFF, max1 = 0; - long min2 = 0xFFFFFFFF, max2 = 0; - for (int i = 0; i < EMOJI_MAP.length; i++) { - EMOJI_SORTED[i] = EMOJI_MAP[i]; - if ((EMOJI_SORTED[i] & 0xffff) == EMOJI_SORTED[i]) { - if (EMOJI_SORTED[i] < min1) { - min1 = EMOJI_SORTED[i]; - } - if (EMOJI_SORTED[i] > max1) { - max1 = EMOJI_SORTED[i]; - } - } else if ((EMOJI_SORTED[i] & 0xffffffff) == EMOJI_SORTED[i]) { - if (EMOJI_SORTED[i] < min2) { - min2 = EMOJI_SORTED[i]; - } - if (EMOJI_SORTED[i] > max2) { - max2 = EMOJI_SORTED[i]; - } - } - } - - minEmoji1 = min1; - maxEmoji1 = max1; - - minEmoji2 = min2; - maxEmoji2 = max2; - Arrays.sort(EMOJI_SORTED); - } - - private static final int LAYOUT_1X = 1; - private static final int LAYOUT_15X_1 = 2; - private static final int LAYOUT_15X_2 = 3; - private static final int LAYOUT_2X_1 = 4; - private static final int LAYOUT_2X_2 = 5; - private static SmileProcessor instance; - private static SmileProcessor processor; - - // protected Bitmap emojiImages; - protected HashMap emojiMap; - - private static final Spannable.Factory spannableFactory = Spannable.Factory.getInstance(); - - private Application application; - private float density; - - private HashMap indexes; - private HashMap originalMetrics; - - private int layoutType = LAYOUT_1X; - - private boolean isLoading = false; - private boolean isLoaded = false; - - private Handler handler = new Handler(Looper.getMainLooper()); - private CopyOnWriteArrayList listeners = new CopyOnWriteArrayList(); - - private int emojiSideSize; - - private int rectSize = 0; - private SmilesRecentListener smilesRecentListener; - private SmilesRecentsController recentController; - - public static final SmileProcessor emoji() { - return processor; - } - - public SmileProcessor(Application application) { - long start = System.currentTimeMillis(); - this.application = application; - processor = this; - density = application.getResources().getDisplayMetrics().density; - - emojiSideSize = (int) (density * 20); - - Log.d(TAG, "Emoji phase 0 in " + (System.currentTimeMillis() - start) + " ms"); - - if (density >= 2 || density == 1) { - if (density >= 2) { - // XHDPI and more - if (SmileysPack.PACK_2) { - layoutType = LAYOUT_2X_1; - } else if (SmileysPack.PACK_15) { - layoutType = LAYOUT_15X_1; - } else if (SmileysPack.PACK_1) { - layoutType = LAYOUT_1X; - } else { - throw new RuntimeException("Unable to find smileys pack"); - } - } else { - // MDPI - if (SmileysPack.PACK_1) { - layoutType = LAYOUT_1X; - } else if (SmileysPack.PACK_15) { - layoutType = LAYOUT_15X_1; - } else if (SmileysPack.PACK_2) { - layoutType = LAYOUT_2X_2; - } else { - throw new RuntimeException("Unable to find smileys pack"); - } - } - } else { - if (density > 1) { // 1.3333 and 1.5 - // HDPI & TVDPI - if (SmileysPack.PACK_15) { - layoutType = LAYOUT_15X_1; - } else if (SmileysPack.PACK_2) { - layoutType = LAYOUT_2X_1; - } else if (SmileysPack.PACK_1) { - layoutType = LAYOUT_1X; - } else { - throw new RuntimeException("Unable to find smileys pack"); - } - } else { // 0.75 - // LDPI - if (SmileysPack.PACK_15) { - layoutType = LAYOUT_15X_2; - } else if (SmileysPack.PACK_1) { - layoutType = LAYOUT_1X; - } else if (SmileysPack.PACK_2) { - layoutType = LAYOUT_2X_2; - } else { - throw new RuntimeException("Unable to find smileys pack"); - } - } - } - - Log.d(TAG, "Emoji phase 1 in " + (System.currentTimeMillis() - start) + " ms"); - start = System.currentTimeMillis(); - - switch (layoutType) { - default: - case LAYOUT_1X: - rectSize = 28; - break; - case LAYOUT_15X_1: - rectSize = 36; - break; - case LAYOUT_15X_2: - rectSize = 18; - break; - case LAYOUT_2X_1: - rectSize = 56; - break; - case LAYOUT_2X_2: - rectSize = 28; - break; - } - - indexes = new HashMap(); - emojiMap = new HashMap(); - originalMetrics = new HashMap(); - - TextPaint bodyPaint = new TextPaint(Paint.ANTI_ALIAS_FLAG | Paint.SUBPIXEL_TEXT_FLAG); - // bodyPaint.setTypeface(FontController.loadTypeface(application, "normal")); - bodyPaint.setTextSize(getSp(16)); - bodyPaint.setColor(0xff000000); - originalMetrics.put(CONFIGURATION_BUBBLES, bodyPaint.getFontMetricsInt()); - - bodyPaint = new TextPaint(TextPaint.ANTI_ALIAS_FLAG | Paint.SUBPIXEL_TEXT_FLAG); - // bodyPaint.setTypeface(FontController.loadTypeface(application, "light")); - bodyPaint.setColor(0xff808080); - bodyPaint.setTextSize(getSp(15.5f)); - originalMetrics.put(CONFIGURATION_DIALOGS, bodyPaint.getFontMetricsInt()); - - Log.d(TAG, "Emoji phase 2 in " + (System.currentTimeMillis() - start) + " ms"); - start = System.currentTimeMillis(); - - for (int i = 0; i < EMOJI_MAP.length; i++) { - indexes.put(EMOJI_MAP[i], i); - } - - Log.d(TAG, "Emoji phase 3 in " + (System.currentTimeMillis() - start) + " ms"); - } - - protected int getSp(float sp) { - return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, sp, application.getResources().getDisplayMetrics()); - } - - public boolean isLoaded() { - return isLoaded; - } - - public void registerListener(SmilesListener listener) { - if (!listeners.contains(listener)) { - listeners.add(listener); - } - } - - public void unregisterListener(SmilesListener listener) { - listeners.remove(listener); - } - - public void loadEmoji() { - if (isLoaded) { - return; - } - if (isLoading) { - return; - } - isLoading = true; - new Thread() { - @Override - public void run() { - Process.setThreadPriority(Process.THREAD_PRIORITY_LOWEST); - long start = System.currentTimeMillis(); - Log.d(TAG, "emoji loading start"); - try { - - boolean useScale = false; - String fileName = null; - String fileNameAlpha = null; - - - switch (layoutType) { - default: - case LAYOUT_1X: - fileName = "emoji_c_1.jpg"; - fileNameAlpha = "emoji_a_1.jpg"; - useScale = false; - break; - case LAYOUT_15X_1: - fileName = "emoji_c_15.jpg"; - fileNameAlpha = "emoji_a_15.jpg"; - useScale = false; - break; - case LAYOUT_15X_2: - fileName = "emoji_c_15.jpg"; - fileNameAlpha = "emoji_a_15.jpg"; - useScale = true; - break; - case LAYOUT_2X_1: - fileName = "emoji_c_2.jpg"; - fileNameAlpha = "emoji_a_2.jpg"; - useScale = false; - break; - case LAYOUT_2X_2: - fileName = "emoji_c_2.jpg"; - fileNameAlpha = "emoji_a_2.jpg"; - useScale = true; - break; - } - - File sourceFile = application.getFileStreamPath(fileName); - if (!sourceFile.exists()) { - InputStream colorsIs = SmileProcessor.this.application.getAssets().open(fileName); - IOUtils.copy(colorsIs, sourceFile); - colorsIs.close(); - } - - File sourceAlphaFile = application.getFileStreamPath(fileNameAlpha); - if (!sourceAlphaFile.exists()) { - InputStream colorsIs = SmileProcessor.this.application.getAssets().open(fileNameAlpha); - IOUtils.copy(colorsIs, sourceAlphaFile); - colorsIs.close(); - } - - ImageMetadata metadata = new FileSource(sourceFile.getAbsolutePath()).getImageMetadata(); - int w = useScale ? metadata.getW() / 2 : metadata.getW(); - int h = useScale ? metadata.getH() / 2 : metadata.getH(); - - Bitmap colorsBitmap; - Bitmap alphaBitmap; - - if (useScale) { - colorsBitmap = ImageLoading.loadBitmap(sourceFile.getAbsolutePath(), 2); - alphaBitmap = ImageLoading.loadBitmap(sourceAlphaFile.getAbsolutePath(), 2); - } else { - colorsBitmap = ImageLoading.loadBitmap(sourceFile.getAbsolutePath(), 1); - alphaBitmap = ImageLoading.loadBitmap(sourceAlphaFile.getAbsolutePath(), 1); - } - - // Bitmap colorsBitmap = Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_8888); - // BitmapDecoderEx.decodeReuseBitmapScaled(sourceFile.getAbsolutePath(), colorsBitmap); - // colorsBitmap.setHasAlpha(true); - - // BitmapDecoderEx.decodeReuseBitmapBlend(sourceAlphaFile.getAbsolutePath(), colorsBitmap, useScale); - - Log.d(TAG, "emoji pre-loaded in " + (System.currentTimeMillis() - start) + " ms"); - - int[] resultColors = new int[rectSize * SECTION_SIDE * rectSize * SECTION_SIDE]; - int[] tmpColors = new int[rectSize * SECTION_SIDE * rectSize * SECTION_SIDE]; - - int[] order = new int[]{8, 9, 10, 11, 4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15}; - int stride = rectSize * SECTION_SIDE; - for (int ordinal : order) { - int col = ordinal % SECTION_COL_COUNT; - int row = ordinal / SECTION_COL_COUNT; - - int leftOffset = col * stride; - int topOffset = row * stride; - int width = stride; - int height = stride; - if (row == SECTION_ROW_COUNT - 1) { - height = colorsBitmap.getHeight() - topOffset; - } - - colorsBitmap.getPixels(tmpColors, 0, stride, leftOffset, topOffset, width, height); - for (int ind = 0; ind < resultColors.length; ind++) { - resultColors[ind] = 0xFFFFFF & tmpColors[ind]; - } - alphaBitmap.getPixels(tmpColors, 0, stride, leftOffset, topOffset, width, height); - for (int ind = 0; ind < resultColors.length; ind++) { - resultColors[ind] = resultColors[ind] | ((tmpColors[ind] & 0xFF) << 24); - } - - Bitmap section = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); - /*Canvas canvas = new Canvas(section); - canvas.drawBitmap(colorsBitmap, new Rect(leftOffset, topOffset, leftOffset + width, topOffset + height), - new Rect(0, 0, width, height), new Paint());*/ - section.setPixels(resultColors, 0, stride, 0, 0, width, height); - emojiMap.put(ordinal, section); - - Log.d(TAG, "emoji region loaded in " + (System.currentTimeMillis() - start) + " ms"); - } - - recentController = SmilesRecentsController.getInstance(application); - - isLoaded = true; - notifyEmojiUpdated(true); - Log.d(TAG, "emoji loaded in " + (System.currentTimeMillis() - start) + " ms"); - } catch (Throwable t) { - t.printStackTrace(); - Log.d(TAG, "emoji loading error"); - isLoaded = false; - isLoading = false; - } - } - }.start(); - } - - private void notifyEmojiUpdated(final boolean completed) { - handler.post(new Runnable() { - @Override - public void run() { - Log.d(TAG, "notify"); - for (SmilesListener listener : listeners) { - listener.onSmilesUpdated(completed); - } - } - }); - } - - public void waitForEmoji() { - if (isLoaded) { - return; - } - - final Object lock = new Object(); - synchronized (lock) { - listeners.add(new SmilesListener() { - @Override - public void onSmilesUpdated(boolean completed) { - synchronized (lock) { - lock.notify(); - } - - } - }); - try { - lock.wait(); - } catch (InterruptedException e) { - e.printStackTrace(); - return; - } - } - } - - private long getId(String val) { - long id = 0; - if (val.length() == 1) { - id = val.charAt(0); - } else { - id = ((long) val.charAt(0) << 16) + (long) val.charAt(1); - } - - return id; - } - - - public Bitmap getBitmap(String emojiString) { - return getSection(emojiString.charAt(0)); - } - - public void upRecent(long smileId) { - SmilesPack.upRecent(smileId); - if (smilesRecentListener != null) { - smilesRecentListener.onSmilesUpdated(); - } - - } - - public void setRecentUpdateListener(SmilesRecentListener smilesRecentListener) { - this.smilesRecentListener = smilesRecentListener; - } - - public SmilesRecentsController getRecentController() { - return recentController; - } - - private class SpanDescription { - - private SpanDescription(long id, int start, int end) { - this.id = id; - this.start = start; - this.end = end; - } - - public long id; - public int start, end; - } - - public String cutEmoji(String s) { - StringBuilder stringBuilder = new StringBuilder(); - - long prev = 0; - long prevLong = 0; - int prevLongCount = 0; - int lastTextPos = 0; - - ArrayList list = new ArrayList(); - - for (int i = 0; i < s.length(); i++) { - long current = s.charAt(i); - - if (prevLongCount == 3) { - long prevId = ((prevLong & 0xFFFFFFFF) << 16) + current; - if (EMOJI_SET.contains(prevId)) { - if (lastTextPos < i - 3) { - stringBuilder.append(s.substring(lastTextPos, i - 3)); - lastTextPos = i - 3; - } - stringBuilder.append(":smile:"); - lastTextPos += 4; - - list.add(new SpanDescription(prevId, i - 3, i + 1)); - - prev = 0; - prevLong = 0; - prevLongCount = 0; - continue; - } - } - - if (prev != 0) { - long prevId = ((prev & 0xFFFF) << 16) + current; - - if (EMOJI_SET.contains(prevId)) { - - if (lastTextPos < i - 1) { - stringBuilder.append(s.substring(lastTextPos, i - 1)); - lastTextPos = i - 1; - } - stringBuilder.append(":smile:"); - lastTextPos += 2; - - list.add(new SpanDescription(prevId, i - 1, i + 1)); - - prev = 0; - prevLong = 0; - prevLongCount = 0; - continue; - } - } - - if (EMOJI_SET.contains(current)) { - - if (lastTextPos < i) { - stringBuilder.append(s.substring(lastTextPos, i)); - lastTextPos = i; - } - stringBuilder.append(":smile:"); - lastTextPos += 1; - - list.add(new SpanDescription(current, i, i + 1)); - - prev = 0; - prevLong = 0; - prevLongCount = 0; - } else { - prev = current; - prevLong = ((prevLong & 0xFFFFFFFF) << 16) + current; - if (prevLongCount < 3) { - prevLongCount++; - } - } - } - - if (lastTextPos < s.length()) { - stringBuilder.append(s.substring(lastTextPos, s.length())); - } - - return stringBuilder.toString(); - } - - public String fixStringCompat(String src) { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { - return src; - } else { - return cutEmoji(src); - } - } - - public Spannable processEmojiCutMutable(String s, int mode) { - StringBuilder stringBuilder = new StringBuilder(); - - long prev = 0; - long prevLong = 0; - int prevLongCount = 0; - int lastTextPos = 0; - - ArrayList list = new ArrayList(); - - for (int i = 0; i < s.length(); i++) { - long current = s.charAt(i); - - if (prevLongCount == 3) { - long prevId = ((prevLong & 0xFFFFFFFF) << 16) + current; - if (EMOJI_SET.contains(prevId)) { - if (lastTextPos < i - 3) { - stringBuilder.append(s.substring(lastTextPos, i - 3)); - lastTextPos = i - 3; - } - stringBuilder.append("++++"); - lastTextPos += 4; - - list.add(new SpanDescription(prevId, i - 3, i + 1)); - - prev = 0; - prevLong = 0; - prevLongCount = 0; - continue; - } - } - - if (prev != 0) { - long prevId = ((prev & 0xFFFF) << 16) + current; - - if (EMOJI_SET.contains(prevId)) { - - if (lastTextPos < i - 1) { - stringBuilder.append(s.substring(lastTextPos, i - 1)); - lastTextPos = i - 1; - } - stringBuilder.append("++"); - lastTextPos += 2; - - list.add(new SpanDescription(prevId, i - 1, i + 1)); - - prev = 0; - prevLong = 0; - prevLongCount = 0; - continue; - } - } - - if (EMOJI_SET.contains(current)) { - - if (lastTextPos < i) { - stringBuilder.append(s.substring(lastTextPos, i)); - lastTextPos = i; - } - stringBuilder.append("+"); - lastTextPos += 1; - - list.add(new SpanDescription(current, i, i + 1)); - /*stringBuilder.setSpan(new ImageSpan(res, isAlignBottom ? ImageSpan.ALIGN_BOTTOM : ImageSpan.ALIGN_BASELINE), - i, i + 1, - Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);*/ - - prev = 0; - prevLong = 0; - prevLongCount = 0; - } else { - prev = current; - prevLong = ((prevLong & 0xFFFFFFFF) << 16) + current; - if (prevLongCount < 3) { - prevLongCount++; - } - } - } - - if (lastTextPos < s.length()) { - stringBuilder.append(s.substring(lastTextPos, s.length())); - } - - Spannable spannable = spannableFactory.newSpannable(stringBuilder.toString()); - for (SpanDescription description : list) { - spannable.setSpan(new EmojiSpan(this, indexes.get(description.id), emojiSideSize, originalMetrics.get(mode)), description.start, description.end, - Spannable.SPAN_INCLUSIVE_EXCLUSIVE); - } - return spannable; - } - - public Spannable processEmojiMutable(CharSequence s, int mode) { - - long prev = 0; - long prevLong = 0; - int prevLongCount = 0; - - ArrayList list = new ArrayList(); - - for (int i = 0; i < s.length(); i++) { - long current = s.charAt(i); - - if (prevLongCount == 3) { - long prevId = ((prevLong & 0xFFFFFFFF) << 16) + current; - if (Arrays.binarySearch(EMOJI_SORTED, prevId) >= 0) { - list.add(new SpanDescription(prevId, i - 3, i + 1)); - prev = 0; - prevLong = 0; - prevLongCount = 0; - continue; - } - } - - if (prev != 0) { - long prevId = ((prev & 0xFFFF) << 16) + current; - if (Arrays.binarySearch(EMOJI_SORTED, prevId) >= 0) { - list.add(new SpanDescription(prevId, i - 1, i + 1)); - prev = 0; - prevLong = 0; - prevLongCount = 0; - continue; - } - } - - if (Arrays.binarySearch(EMOJI_SORTED, current) >= 0) { - list.add(new SpanDescription(current, i, i + 1)); - prev = 0; - prevLong = 0; - prevLongCount = 0; - } else { - prev = current; - prevLong = ((prevLong & 0xFFFFFFFF) << 16) + current; - if (prevLongCount < 3) { - prevLongCount++; - } - } - } - - Spannable spannable = spannableFactory.newSpannable(s); - for (SpanDescription description : list) { - spannable.setSpan(new EmojiSpan(this, indexes.get(description.id), - emojiSideSize, originalMetrics.get(mode)), description.start, description.end, - Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); - } - return spannable; - } - - public Spannable processEmojiCompatMutable(CharSequence s, int mode) { - return processEmojiMutable(s, mode); - } - - public static long[] findFirstUniqEmoji(String s, int count) { - long prev = 0; - long prevLong = 0; - int prevLongCount = 0; - - long[] res = new long[count]; - int index = 0; - HashSet founded = new HashSet(); - - for (int i = 0; i < s.length(); i++) { - long current = s.charAt(i); - - if (prevLongCount == 3) { - long prevId = ((prevLong & 0xFFFFFFFF) << 16) + current; - if (EMOJI_SET.contains(prevId) && !founded.contains(prevId)) { - founded.add(prevId); - res[index++] = prevId; - if (index >= count) - break; - } - } - - if (prev != 0) { - long prevId = ((prev & 0xFFFF) << 16) + current; - - if (EMOJI_SET.contains(prevId) && !founded.contains(prevId)) { - founded.add(prevId); - res[index++] = prevId; - if (index >= count) - break; - } - } - - if (EMOJI_SET.contains(current) && !founded.contains(current)) { - founded.add(current); - res[index++] = current; - if (index >= count) - break; - } else { - prev = current; - prevLong = ((prevLong & 0xFFFFFFFF) << 16) + current; - if (prevLongCount < 3) { - prevLongCount++; - } - } - } - - if (index == count) { - return res; - } else { - long[] res2 = new long[index]; - for (int i = 0; i < index; i++) { - res2[i] = res[i]; - } - return res2; - } - } - - public static boolean containsEmoji(CharSequence s) { - if (s == null) { - return false; - } - long prev = 0; - long prevLong = 0; - int prevLongCount = 0; - - for (int i = 0; i < s.length(); i++) { - long current = s.charAt(i); - -// if (prevLongCount == 3) { -// long prevId = ((prevLong & 0xFFFFFFFF) << 16) + current; -// if (Arrays.binarySearch(EMOJI_SORTED, prevId) > 0) { -// return true; -// } -// } - - if (prev != 0) { - long prevId = ((prev & 0xFFFF) << 16) + current; - - if ((current >= minEmoji2) && (current <= maxEmoji2) && Arrays.binarySearch(EMOJI_SORTED, prevId) > 0) { - return true; - } - } - - if ((current >= minEmoji1) && (current <= maxEmoji1) && Arrays.binarySearch(EMOJI_SORTED, current) > 0) { - return true; - } else { - prev = current; - prevLong = ((prevLong & 0xFFFFFFFF) << 16) + current; - if (prevLongCount < 3) { - prevLongCount++; - } - } - } - - return false; - } - - public int getRectSize() { - return rectSize; - } - - public int getSectionIndex(long emoji) { - int globalIndex = indexes.get(emoji); - int x = globalIndex / COUNT_IN_ROW; - int y = globalIndex % COUNT_IN_ROW; - - return (y / SECTION_SIDE) + (x / SECTION_SIDE) * SECTION_ROW_COUNT; - } - - public int getSectionX(long emoji) { - int globalIndex = indexes.get(emoji); - return (globalIndex % COUNT_IN_ROW) % SECTION_SIDE; - } - - public int getSectionY(long emoji) { - int globalIndex = indexes.get(emoji); - return (globalIndex / COUNT_IN_ROW) % SECTION_SIDE; - } - - public Bitmap getSection(int index) { - return emojiMap.get(index); - } - - private static Paint bitmapPaint = new Paint(); - - static { - bitmapPaint.setAntiAlias(true); - bitmapPaint.setFlags(Paint.FILTER_BITMAP_FLAG); - } - - private static Rect bitmapRect = new Rect(); - private static Rect srcRect = new Rect(); - - private class EmojiSpan extends ReplacementSpan { - - private SmileProcessor processor; - private int offset; - private int size; - private int padding; - private int section; - private int sectionX; - private int sectionY; - private Paint.FontMetricsInt originalMetrics; - - public EmojiSpan(SmileProcessor processor, int index, int size, Paint.FontMetricsInt original) { - this.processor = processor; - this.size = size; - this.originalMetrics = original; - - int x = index / COUNT_IN_ROW; - int y = index % COUNT_IN_ROW; - - section = (y / SECTION_SIDE) + (x / SECTION_SIDE) * SECTION_ROW_COUNT; - sectionX = y % SECTION_SIDE; - sectionY = x % SECTION_SIDE; - } - - @Override - public int getSize(Paint paint, CharSequence charSequence, int start, int end, Paint.FontMetricsInt fm) { - padding = (int) paint.measureText(" ") / 3; - - if (fm != null) { - fm.ascent = originalMetrics.ascent; - fm.descent = originalMetrics.descent; - - fm.top = originalMetrics.top; - fm.bottom = originalMetrics.bottom; - } - return size + padding * 2; - } - - @Override - public void draw(Canvas canvas, CharSequence text, int start, int end, - float x, int top, int y, int bottom, Paint paint) { - Bitmap srcEmoji = processor.emojiMap.get(section); - if (srcEmoji != null) { - if (paint.getFontMetrics() != null) { - offset = (int) (paint.getFontMetrics().descent); - } - x += padding; - bitmapRect.set((int) x, y - size + offset, (int) (x + size), y + offset); - srcRect.set(sectionX * rectSize, sectionY * rectSize, (sectionX + 1) * rectSize, (sectionY + 1) * rectSize); - canvas.drawBitmap(srcEmoji, srcRect, bitmapRect, bitmapPaint); - } - } - } -} \ No newline at end of file diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/keyboard/BaseKeyboard.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/keyboard/BaseKeyboard.java index 1466964b30..600b4996ab 100644 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/keyboard/BaseKeyboard.java +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/keyboard/BaseKeyboard.java @@ -22,11 +22,12 @@ import im.actor.sdk.R; import im.actor.runtime.Log; import im.actor.sdk.controllers.conversation.KeyboardLayout; +import im.actor.sdk.controllers.tools.AttachOpenCloseCallback; import im.actor.sdk.util.KeyboardHelper; import im.actor.sdk.util.Screen; public class BaseKeyboard implements - ViewTreeObserver.OnGlobalLayoutListener { + ViewTreeObserver.OnGlobalLayoutListener{ private static final String TAG = "BaseKeyboard"; @@ -144,8 +145,6 @@ private void update() { PixelFormat.TRANSLUCENT); params.gravity = Gravity.BOTTOM | Gravity.CENTER_HORIZONTAL; windowManager.updateViewLayout(emojiKeyboardView, params); - } else { - } } @@ -215,7 +214,6 @@ public boolean isShowing() { public void destroy() { dismiss(true); - if (keyboardStatusListener != null) { keyboardStatusListener.onDismiss(); } @@ -294,16 +292,12 @@ public void onGlobalLayout() { // FIXME verify root view applied new padding after keyboard state change // workaround for [some of android versions] bug, when keyboard closing not causing relayout, or causing it with delay if (changed && root != null) { - root.postDelayed(() -> { if (!root.isSync()) { root.requestLayout(); } }, 30); } - - - } public Activity getActivity() { @@ -341,29 +335,30 @@ public boolean onBackPressed() { } public static int getViewInset(View view, int statusBarHeight) { - if (view == null || view.getRootView() == null) { - return 0; - } - - view = view.getRootView(); - - if (Build.VERSION.SDK_INT < 21 || view.getHeight() == Screen.getHeight() || view.getHeight() == Screen.getHeight() - statusBarHeight) { - return 0; - } - - try { - Field mAttachInfoField = View.class.getDeclaredField("mAttachInfo"); - mAttachInfoField.setAccessible(true); - Object mAttachInfo = mAttachInfoField.get(view); - if (mAttachInfo != null) { - Field mStableInsetsField = mAttachInfo.getClass().getDeclaredField("mStableInsets"); - mStableInsetsField.setAccessible(true); - Rect insets = (Rect) mStableInsetsField.get(mAttachInfo); - return insets.bottom; - } - } catch (Exception e) { - e.printStackTrace(); - } +// if (view == null || view.getRootView() == null) { +// return 0; +// } +// +// view = view.getRootView(); +// +// if (Build.VERSION.SDK_INT < 21 || view.getHeight() == Screen.getHeight() || view.getHeight() == Screen.getHeight() - statusBarHeight) { +// return 0; +// } +// +// try { +// Field mAttachInfoField = View.class.getDeclaredField("mAttachInfo"); +// mAttachInfoField.setAccessible(true); +// Object mAttachInfo = mAttachInfoField.get(view); +// if (mAttachInfo != null) { +// Field mStableInsetsField = mAttachInfo.getClass().getDeclaredField("mStableInsets"); +// mStableInsetsField.setAccessible(true); +// Rect insets = (Rect) mStableInsetsField.get(mAttachInfo); +// return insets.bottom; +// } +// } catch (Exception e) { +// e.printStackTrace(); +// } return 0; } + } diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/keyboard/emoji/Emoji.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/keyboard/emoji/Emoji.java new file mode 100644 index 0000000000..dc7d67b8a3 --- /dev/null +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/keyboard/emoji/Emoji.java @@ -0,0 +1,594 @@ +package im.actor.sdk.view.emoji.keyboard.emoji; + +/** + * Created by 98379720172 on 05/01/17. + */ + + +import java.io.File; +import java.io.InputStream; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Locale; +import java.util.Map; +import java.util.concurrent.CopyOnWriteArrayList; + +import android.graphics.Bitmap; +import android.graphics.BitmapFactory; +import android.graphics.Canvas; +import android.graphics.ColorFilter; +import android.graphics.Paint; +import android.graphics.PixelFormat; +import android.graphics.Rect; +import android.graphics.drawable.Drawable; +import android.os.Build; +import android.os.Handler; +import android.os.Looper; +import android.os.Process; +import android.text.Spannable; +import android.text.Spanned; +import android.text.TextPaint; +import android.text.style.DynamicDrawableSpan; +import android.text.style.ImageSpan; +import android.view.View; +import android.view.ViewGroup; +import android.widget.TextView; + +import im.actor.runtime.Log; +import im.actor.runtime.android.AndroidContext; +import im.actor.sdk.util.AndroidUtils; +import im.actor.sdk.util.Screen; +import im.actor.sdk.util.Utilities; +import im.actor.sdk.view.emoji.keyboard.emoji.smiles.SmilesListener; + +public class Emoji { + + private static final String TAG = Emoji.class.getName(); + + private static HashMap rects = new HashMap<>(); + private static int drawImgSize; + private static int bigImgSize; + private static boolean inited = false; + private static Paint placeholderPaint; + private static final int splitCount = 4; + private static Bitmap emojiBmp[][] = new Bitmap[5][splitCount]; + private static boolean loadingEmoji[][] = new boolean[5][splitCount]; + + private static boolean isLoading = false; + private static boolean isLoaded = false; + + private static CopyOnWriteArrayList listeners = new CopyOnWriteArrayList(); + private static Handler handler = new Handler(Looper.getMainLooper()); + + private static final int[][] cols = { + {12, 12, 12, 12}, + {6, 6, 6, 6}, + {9, 9, 9, 9}, + {9, 9, 9, 9}, + {8, 8, 8, 7} + }; + + static { + int emojiFullSize; + int add = 2; + if (Screen.getDensity() <= 1.0f) { + emojiFullSize = 32; + add = 1; + } else if (Screen.getDensity() <= 1.5f) { + emojiFullSize = 64; + } else if (Screen.getDensity() <= 2.0f) { + emojiFullSize = 64; + } else { + emojiFullSize = 64; + } + drawImgSize = Screen.dp(20); + bigImgSize = Screen.dp(AndroidUtils.isTablet() ? 40 : 32); + + for (int j = 0; j < EmojiData.data.length; j++) { + int count2 = (int) Math.ceil(EmojiData.data[j].length / (float) splitCount); + int position; + for (int i = 0; i < EmojiData.data[j].length; i++) { + int page = i / count2; + position = i - page * count2; + int row = position % cols[j][page]; + int col = position / cols[j][page]; + Rect rect = new Rect(row * emojiFullSize + row * add, col * emojiFullSize + col * add, (row + 1) * emojiFullSize + row * add, (col + 1) * emojiFullSize + col * add); + rects.put(EmojiData.data[j][i], new DrawableInfo(rect, (byte) j, (byte) page, i)); + } + } + placeholderPaint = new Paint(); + placeholderPaint.setColor(0x00000000); + + loadAllEmojis(); + } + + public static void loadAllEmojis(){ + + if (isLoaded) { + return; + } + if (isLoading) { + return; + } + + isLoading = true; + + new Thread() { + @Override + public void run() { + Process.setThreadPriority(Process.THREAD_PRIORITY_LOWEST); + + long start = System.currentTimeMillis(); + Log.d(TAG, "emoji loading start"); + + Iterator> entry = rects.entrySet().iterator(); + while (entry.hasNext()) { + DrawableInfo info = entry.next().getValue(); + if(!loadingEmoji[info.page][info.page2] + && (emojiBmp[info.page][info.page2] == null)) { + loadEmoji(info.page, info.page2); + } + } + isLoaded = true; + isLoading = false; + + notifyEmojiUpdated(true); + Log.d(TAG, "Emoji loaded in " + (System.currentTimeMillis() - start) + " ms"); + } + }.start(); + } + + public static void waitForEmoji() { + if (isLoaded) { + return; + } + + final Object lock = new Object(); + synchronized (lock) { + listeners.add(new SmilesListener() { + @Override + public void onSmilesUpdated(boolean completed) { + synchronized (lock) { + lock.notify(); + } + } + }); + try { + lock.wait(); + } catch (InterruptedException e) { + Log.e(Emoji.class.getName(), e); + return; + } + } + } + + private static void notifyEmojiUpdated(final boolean completed) { + handler.post(new Runnable() { + @Override + public void run() { + Log.d(TAG, "notify"); + for (SmilesListener listener : listeners) { + listener.onSmilesUpdated(completed); + } + } + }); + } + + private static void loadEmoji(final int page, final int page2) { + loadingEmoji[page][page2] = true; + try { + float scale; + int imageResize = 1; + if (Screen.getDensity() <= 1.0f) { + scale = 2.0f; + imageResize = 2; + } else if (Screen.getDensity() <= 1.5f) { + //scale = 3.0f; + //imageResize = 2; + scale = 2.0f; + } else if (Screen.getDensity() <= 2.0f) { + scale = 2.0f; + } else { + scale = 2.0f; + } + + String imageName; + File imageFile; + + try { + for (int a = 4; a < 7; a++) { + imageName = String.format(Locale.US, "v%d_emoji%.01fx_%d.jpg", a, scale, page); + imageFile = AndroidContext.getContext().getFileStreamPath(imageName); + if (imageFile.exists()) { + imageFile.delete(); + } + imageName = String.format(Locale.US, "v%d_emoji%.01fx_a_%d.jpg", a, scale, page); + imageFile = AndroidContext.getContext().getFileStreamPath(imageName); + if (imageFile.exists()) { + imageFile.delete(); + } + } + for (int a = 8; a < 10; a++) { + imageName = String.format(Locale.US, "v%d_emoji%.01fx_%d.png", a, scale, page); + imageFile = AndroidContext.getContext().getFileStreamPath(imageName); + if (imageFile.exists()) { + imageFile.delete(); + } + } + } catch (Exception e) { + Log.e(Emoji.class.getName(), e); + } + Bitmap bitmap = null; + try { + InputStream is = AndroidContext.getContext().getAssets().open("emoji/" + String.format(Locale.US, "v10_emoji%.01fx_%d_%d.png", scale, page, page2)); + BitmapFactory.Options opts = new BitmapFactory.Options(); + opts.inJustDecodeBounds = false; + opts.inSampleSize = imageResize; + bitmap = BitmapFactory.decodeStream(is, null, opts); + is.close(); + } catch (Throwable e) { + Log.e(Emoji.class.getName(), e); + } + + final Bitmap finalBitmap = bitmap; + emojiBmp[page][page2] = finalBitmap; + loadingEmoji[page][page2] = false; + + } catch (Throwable x) { + Log.e(Emoji.class.getName(), x); + } + } + + public static void invalidateAll(View view) { + if (view instanceof ViewGroup) { + ViewGroup g = (ViewGroup) view; + for (int i = 0; i < g.getChildCount(); i++) { + invalidateAll(g.getChildAt(i)); + } + } else if (view instanceof TextView) { + view.invalidate(); + } + } + + public static String fixEmoji(String emoji) { + char ch; + int lenght = emoji.length(); + for (int a = 0; a < lenght; a++) { + ch = emoji.charAt(a); + if (ch >= 0xD83C && ch <= 0xD83E) { + if (ch == 0xD83C && a < lenght - 1) { + ch = emoji.charAt(a + 1); + if (ch == 0xDE2F || ch == 0xDC04 || ch == 0xDE1A || ch == 0xDD7F) { + emoji = emoji.substring(0, a + 2) + "\uFE0F" + emoji.substring(a + 2); + lenght++; + a += 2; + } else { + a++; + } + } else { + a++; + } + } else if (ch == 0x20E3) { + return emoji; + } else if (ch >= 0x203C && ch <= 0x3299) { + if (EmojiData.emojiToFE0FMap.containsKey(ch)) { + emoji = emoji.substring(0, a + 1) + "\uFE0F" + emoji.substring(a + 1); + lenght++; + a++; + } + } + } + return emoji; + } + + public static EmojiDrawable getEmojiDrawable(CharSequence code) { + DrawableInfo info = rects.get(code); + if (info == null) { + Log.e(Emoji.class.getName(), new Throwable("No drawable for emoji " + code)); + return null; + } + EmojiDrawable ed = new EmojiDrawable(info); + ed.setBounds(0, 0, drawImgSize, drawImgSize); + return ed; + } + + public static Drawable getEmojiBigDrawable(String code) { + EmojiDrawable ed = getEmojiDrawable(code); + if (ed == null) { + return null; + } + ed.setBounds(0, 0, bigImgSize, bigImgSize); + ed.fullSize = true; + return ed; + } + + public static class EmojiDrawable extends Drawable { + private DrawableInfo info; + private boolean fullSize = false; + private static Paint paint = new Paint(Paint.FILTER_BITMAP_FLAG); + private static Rect rect = new Rect(); + private static TextPaint textPaint = new TextPaint(Paint.ANTI_ALIAS_FLAG); + + public EmojiDrawable(DrawableInfo i) { + info = i; + } + + public DrawableInfo getDrawableInfo() { + return info; + } + + public Rect getDrawRect() { + Rect original = getBounds(); + int cX = original.centerX(), cY = original.centerY(); + rect.left = cX - (fullSize ? bigImgSize : drawImgSize) / 2; + rect.right = cX + (fullSize ? bigImgSize : drawImgSize) / 2; + rect.top = cY - (fullSize ? bigImgSize : drawImgSize) / 2; + rect.bottom = cY + (fullSize ? bigImgSize : drawImgSize) / 2; + return rect; + } + + @Override + public void draw(Canvas canvas) { + if (emojiBmp[info.page][info.page2] == null) { + if (loadingEmoji[info.page][info.page2]) { + return; + } +// loadingEmoji[info.page][info.page2] = true; +// Utilities.globalQueue.postRunnable(new Runnable() { +// @Override +// public void run() { +// // loadEmoji(info.page, info.page2); +// loadingEmoji[info.page][info.page2] = false; +// } +// }); + + //canvas.drawRect(getBounds(), placeholderPaint); + //return; + + loadEmoji(info.page, info.page2); +// loadingEmoji[info.page][info.page2] = false; + } + + Rect b; + if (fullSize) { + b = getDrawRect(); + } else { + b = getBounds(); + } + + canvas.drawBitmap(emojiBmp[info.page][info.page2], info.rect, b, paint); + } + + @Override + public int getOpacity() { + return PixelFormat.TRANSPARENT; + } + + @Override + public void setAlpha(int alpha) { + + } + + @Override + public void setColorFilter(ColorFilter cf) { + + } + } + + private static class DrawableInfo { + public Rect rect; + public byte page; + public byte page2; + public int emojiIndex; + + public DrawableInfo(Rect r, byte p, byte p2, int index) { + rect = r; + page = p; + page2 = p2; + emojiIndex = index; + } + } + + private static boolean inArray(char c, char[] a) { + for (char cc : a) { + if (cc == c) { + return true; + } + } + return false; + } + + public static CharSequence replaceEmoji(CharSequence cs, Paint.FontMetricsInt fontMetrics, int size, boolean createNew) { + return replaceEmoji(cs, fontMetrics, size, createNew, null); + } + + public static CharSequence replaceEmoji(CharSequence cs, Paint.FontMetricsInt fontMetrics, int size, boolean createNew, int[] emojiOnly) { + if (cs == null || cs.length() == 0) { + return cs; + } + //SpannableStringLight.isFieldsAvailable(); + //SpannableStringLight s = new SpannableStringLight(cs.toString()); + Spannable s; + if (!createNew && cs instanceof Spannable) { + s = (Spannable) cs; + } else { + s = Spannable.Factory.getInstance().newSpannable(cs.toString()); + } + long buf = 0; + int emojiCount = 0; + char c; + int startIndex = -1; + int startLength = 0; + int previousGoodIndex = 0; + StringBuilder emojiCode = new StringBuilder(16); + boolean nextIsSkinTone; + EmojiDrawable drawable; + EmojiSpan span; + int length = cs.length(); + boolean doneEmoji = false; + //s.setSpansCount(emojiCount); + + try { + for (int i = 0; i < length; i++) { + c = cs.charAt(i); + if (c >= 0xD83C && c <= 0xD83E || (buf != 0 && (buf & 0xFFFFFFFF00000000L) == 0 && (buf & 0xFFFF) == 0xD83C && (c >= 0xDDE6 && c <= 0xDDFF))) { + if (startIndex == -1) { + startIndex = i; + } + emojiCode.append(c); + startLength++; + buf <<= 16; + buf |= c; + } else if (emojiCode.length() > 0 && (c == 0x2640 || c == 0x2642)) { + emojiCode.append(c); + startLength++; + buf = 0; + doneEmoji = true; + } else if (buf > 0 && (c & 0xF000) == 0xD000) { + emojiCode.append(c); + startLength++; + buf = 0; + doneEmoji = true; + } else if (c == 0x20E3) { + if (i > 0) { + char c2 = cs.charAt(previousGoodIndex); + if ((c2 >= '0' && c2 <= '9') || c2 == '#' || c2 == '*') { + startIndex = previousGoodIndex; + startLength = i - previousGoodIndex + 1; + emojiCode.append(c2); + emojiCode.append(c); + doneEmoji = true; + } + } + } else if ((c == 0x00A9 || c == 0x00AE || c >= 0x203C && c <= 0x3299) && EmojiData.dataCharsMap.containsKey(c)) { + if (startIndex == -1) { + startIndex = i; + } + startLength++; + emojiCode.append(c); + doneEmoji = true; + } else if (startIndex != -1) { + emojiCode.setLength(0); + startIndex = -1; + startLength = 0; + doneEmoji = false; + } else if (c != 0xfe0f) { + if (emojiOnly != null) { + emojiOnly[0] = 0; + emojiOnly = null; + } + } + previousGoodIndex = i; + for (int a = 0; a < 3; a++) { + if (i + 1 < length) { + c = cs.charAt(i + 1); + if (a == 1) { + if (c == 0x200D && emojiCode.length() > 0) { + emojiCode.append(c); + i++; + startLength++; + doneEmoji = false; + } + } else { + if (c >= 0xFE00 && c <= 0xFE0F) { + i++; + startLength++; + } + } + } + } + if (doneEmoji) { + if (emojiOnly != null) { + emojiOnly[0]++; + } + if (i + 2 < length) { + if (cs.charAt(i + 1) == 0xD83C && cs.charAt(i + 2) >= 0xDFFB && cs.charAt(i + 2) <= 0xDFFF) { + emojiCode.append(cs.subSequence(i + 1, i + 3)); + startLength += 2; + i += 2; + } + } + if (i + 2 < length) { + if (cs.charAt(i + 1) == 0x200D && (cs.charAt(i + 2) == 0x2640 || cs.charAt(i + 2) == 0x2642)) { + emojiCode.append(cs.subSequence(i + 1, i + 3)); + startLength += 2; + i += 2; + } + } + drawable = Emoji.getEmojiDrawable(emojiCode.subSequence(0, emojiCode.length())); + if (drawable != null) { + + span = new EmojiSpan(drawable, DynamicDrawableSpan.ALIGN_BOTTOM, size, fontMetrics); + s.setSpan(span, startIndex, startIndex + startLength, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); + emojiCount++; + } + startLength = 0; + startIndex = -1; + emojiCode.setLength(0); + doneEmoji = false; + } + if (Build.VERSION.SDK_INT < 23 && emojiCount >= 50) { + break; + } + } + } catch (Exception e) { + Log.e(Emoji.class.getName(), e); + return cs; + } + return s; + } + + public static class EmojiSpan extends ImageSpan { + private Paint.FontMetricsInt fontMetrics = null; + private int size = Screen.dp(20); + + public EmojiSpan(EmojiDrawable d, int verticalAlignment, int s, Paint.FontMetricsInt original) { + super(d, verticalAlignment); + fontMetrics = original; + if (original != null) { + size = Math.abs(fontMetrics.descent) + Math.abs(fontMetrics.ascent); + if (size == 0) { + size = Screen.dp(20); + } + } + } + + public void replaceFontMetrics(Paint.FontMetricsInt newMetrics, int newSize) { + fontMetrics = newMetrics; + size = newSize; + } + + @Override + public int getSize(Paint paint, CharSequence text, int start, int end, Paint.FontMetricsInt fm) { + if (fm == null) { + fm = new Paint.FontMetricsInt(); + } + + if (fontMetrics == null) { + int sz = super.getSize(paint, text, start, end, fm); + + int offset = Screen.dp(8); + int w = Screen.dp(10); + fm.top = -w - offset; + fm.bottom = w - offset; + fm.ascent = -w - offset; + fm.leading = 0; + fm.descent = w - offset; + + return sz; + } else { + if (fm != null) { + fm.ascent = fontMetrics.ascent; + fm.descent = fontMetrics.descent; + + fm.top = fontMetrics.top; + fm.bottom = fontMetrics.bottom; + } + if (getDrawable() != null) { + getDrawable().setBounds(0, 0, size, size); + } + return size; + } + } + } +} \ No newline at end of file diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/keyboard/emoji/EmojiData.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/keyboard/emoji/EmojiData.java new file mode 100644 index 0000000000..bf6703ae7e --- /dev/null +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/keyboard/emoji/EmojiData.java @@ -0,0 +1,339 @@ +package im.actor.sdk.view.emoji.keyboard.emoji; + +/** + * Created by 98379720172 on 05/01/17. + */ + + +import java.util.HashMap; + +public class EmojiData { + + public static final char[] emojiToFE0F = { + 0x2B50, 0x2600, 0x26C5, 0x2601, 0x26A1, 0x2744, 0x26C4, 0x2614, 0x2708, 0x26F5, + 0x2693, 0x26FD, 0x26F2, 0x26FA, 0x26EA, 0x2615, 0x26BD, 0x26BE, 0x26F3, 0x231A, + 0x260E, 0x231B, 0x2709, 0x2702, 0x2712, 0x270F, 0x2648, 0x2649, 0x264A, 0x264B, + 0x264C, 0x264D, 0x264E, 0x264F, 0x2650, 0x2651, 0x2652, 0x2653, 0x2734, 0x3299, + 0x3297, 0x26D4, 0x2B55, 0x2668, 0x2757, 0x203C, 0x2049, 0x303D, 0x26A0, 0x267B, + 0x2747, 0x2733, 0x24C2, 0x267F, 0x25B6, 0x25C0, 0x27A1, 0x2B05, 0x2B06, 0x2B07, + 0x2197, 0x2198, 0x2199, 0x2196, 0x2195, 0x2194, 0x21AA, 0x21A9, 0x2934, 0x2935, + 0x2139, 0x2714, 0x2716, 0x2611, 0x26AA, 0x26AB, 0x25AA, 0x25AB, 0x2B1B, 0x2B1C, + 0x25FC, 0x25FB, 0x25FE, 0x25FD, 0x2660, 0x2663, 0x2665, 0x2666, 0x263A, 0x2639, + 0x270C, 0x261D, 0x2764 + }; + //0xD83CDE2F, 0xD83CDC04, 0xD83CDE1A, 0xD83CDD7F + + public static final char[] dataChars = { + 0x262E, 0x271D, 0x262A, 0x2638, 0x2721, 0x262F, 0x2626, 0x26CE, 0x2648, 0x2649, + 0x264A, 0x264B, 0x264C, 0x264D, 0x264E, 0x264F, 0x2650, 0x2651, 0x2652, 0x2653, + 0x269B, 0x2622, 0x2623, 0x2734, 0x3299, 0x3297, 0x26D4, 0x274C, 0x2B55, 0x2668, + 0x2757, 0x2755, 0x2753, 0x2754, 0x203C, 0x2049, 0x269C, 0x303D, 0x26A0, 0x267B, + 0x2747, 0x2733, 0x274E, 0x2705, 0x27BF, 0x24C2, 0x267F, 0x25B6, 0x23F8, 0x23EF, + 0x23F9, 0x23FA, 0x23ED, 0x23EE, 0x23E9, 0x23EA, 0x25C0, 0x23EB, 0x23EC, 0x27A1, + 0x2B05, 0x2B06, 0x2B07, 0x2197, 0x2198, 0x2199, 0x2196, 0x2195, 0x2194, 0x21AA, + 0x21A9, 0x2934, 0x2935, 0x2139, 0x3030, 0x27B0, 0x2714, 0x2795, 0x2796, 0x2797, + 0x2716, 0x00A9, 0x00AE, 0x2122, 0x2611, 0x26AA, 0x26AB, 0x25AA, 0x25AB, 0x2B1B, + 0x2B1C, 0x25FC, 0x25FB, 0x25FE, 0x25FD, 0x2660, 0x2663, 0x2665, 0x2666, 0x263A, + 0x2639, 0x270A, 0x270C, 0x270B, 0x261D, 0x270D, 0x26D1, 0x2764, 0x2763, 0x2615, + 0x26BD, 0x26BE, 0x26F3, 0x26F7, 0x26F8, 0x26F9, 0x231A, 0x2328, 0x260E, 0x23F1, + 0x23F2, 0x23F0, 0x23F3, 0x231B, 0x2696, 0x2692, 0x26CF, 0x2699, 0x26D3, 0x2694, + 0x2620, 0x26B0, 0x26B1, 0x2697, 0x26F1, 0x2709, 0x2702, 0x2712, 0x270F, 0x2708, + 0x26F5, 0x26F4, 0x2693, 0x26FD, 0x26F2, 0x26F0, 0x26FA, 0x26EA, 0x26E9, 0x2618, + 0x2B50, 0x2728, 0x2604, 0x2600, 0x26C5, 0x2601, 0x26C8, 0x26A1, 0x2744, 0x2603, + 0x26C4, 0x2602, 0x2614 + }; + + public static final String[] emojiColored = { + "🙌","👏","👍","👎","👊","✊","👋","👈","👉","👆","👇","👌","☝","✌","✋", + "🖐","👐","💪","🙏","🖖","🤘","🖕","✍","💅","👂","👃","👶","👦","👧","👨", + "👩","👱‍♀","👱","👴","👵","👲","👳‍♀","👳","👮‍♀","👮","👷‍♀","👷","💂‍♀","💂", + "🕵‍♀","🕵","🎅","👸","👰","👼","🙇‍♀","🙇","💁","💁‍♂","🙅","🙅‍♂","🙆","🙆‍♂", + "🙋","🙋‍♂","🙎","🙎‍♂","🙍","🙍‍♂","💇","💇‍♂","💆","💆‍♂","💃","🚶‍♀","🚶","🏃‍♀", + "🏃","🏋‍♀","🏋","⛹‍♀","⛹","🏄‍♀","🏄","🏊‍♀","🏊","🚣‍♀","🚣","🚴‍♀","🚴","🚵‍♀", + "🚵","🛀" + }; + + public static final String[][] dataColored = { + new String[]{ + "😀","😬","😁","😂","😃","😄","😅","😆","😇","😉","😊","🙂","🙃","☺", + "😋","😌","😍","😘","😗","😙","😚","😜","😝","😛","🤑","🤓","😎","🤗", + "😏","😶","😐","😑","😒","🙄","🤔","😳","😞","😟","😠","😡","😔","😕", + "🙁","☹","😣","😖","😫","😩","😤","😮","😱","😨","😰","😯","😦","😧", + "😢","😥","😪","😓","😭","😵","😲","🤐","😷","🤒","🤕","😴","💤","💩", + "😈","👿","👹","👺","👻","💀","☠","👽","👾","🤖","😺","😸","😹","😻","😼","😽","🙀","😿","😾", + "🙌", + "👏", + "👍", + "👎", + "👊", + "✊", + "👋", + "👈", + "👉", + "👆", + "👇", + "👌", + "☝", + "✌", + "✋", + "🖐", + "👐", + "💪", + "🙏", + "🖖", + "🤘", + "🖕", + "✍", + "💅", + "👄","👅", + "👂", + "👃", + "👁","👀","🗣","👤","👥", + "👶", + "👦", + "👧", + "👨", + "👩", + "👱‍♀", + "👱", + "👴", + "👵", + "👲", + "👳‍♀", + "👳", + "👮‍♀", + "👮", + "👷‍♀", + "👷", + "💂‍♀", + "💂", + "🕵‍♀", + "🕵", + "🎅", + "👸", + "👰", + "👼", + "🙇‍♀", + "🙇", + "💁", + "💁‍♂", + "🙅", + "🙅‍♂", + "🙆", + "🙆‍♂", + "🙋", + "🙋‍♂", + "🙎", + "🙎‍♂", + "🙍", + "🙍‍♂", + "💇", + "💇‍♂", + "💆", + "💆‍♂", + "💃", + "👯","👯‍♂", + "🚶‍♀", + "🚶", + "🏃‍♀", + "🏃", + "👫","👭","👬","💑","👩‍❤‍👩","👨‍❤‍👨","💏","👩‍❤‍💋‍👩","👨‍❤‍💋‍👨","👪","👨‍👩‍👧", + "👨‍👩‍👧‍👦","👨‍👩‍👦‍👦","👨‍👩‍👧‍👧","👩‍👩‍👦","👩‍👩‍👧","👩‍👩‍👧‍👦","👩‍👩‍👦‍👦", + "👩‍👩‍👧‍👧","👨‍👨‍👦","👨‍👨‍👧","👨‍👨‍👧‍👦","👨‍👨‍👦‍👦","👨‍👨‍👧‍👧","👩‍👦","👩‍👧", + "👩‍👧‍👦","👩‍👦‍👦","👩‍👧‍👧","👨‍👦","👨‍👧","👨‍👧‍👦","👨‍👦‍👦","👨‍👧‍👧","👚","👕", + "👖","👔","👗","👙","👘","💄","💋","👣","👠","👡","👢","👞","👟","👒","🎩","🎓", + "👑","⛑","🎒","👝","👛","👜","💼","👓","🕶","💍","🌂","❤","💛","💚","💙","💜", + "💔","❣","💕","💞","💓","💗","💖","💘","💝" + }, + null, + new String[]{ + "🍏","🍎","🍐","🍊","🍋","🍌","🍉","🍇","🍓","🍈","🍒","🍑","🍍","🍅","🍆", + "🌶","🌽","🍠","🍯","🍞","🧀","🍗","🍖","🍤","🍳","🍔","🍟","🌭","🍕","🍝", + "🌮","🌯","🍜","🍲","🍥","🍣","🍱","🍛","🍙","🍚","🍘","🍢","🍡","🍧","🍨", + "🍦","🍰","🎂","🍮","🍬","🍭","🍫","🍿","🍩","🍪","🍺","🍻","🍷","🍸","🍹", + "🍾","🍶","🍵","☕","🍼","🍴","🍽","⚽","🏀","🏈","⚾","🎾","🏐","🏉","🎱", + "🏓","🏸","🏒","🏑","🏏","🏹","⛳","🎣","⛸","🎿","⛷","🏂", + "🏋‍♀", + "🏋", + "⛹‍♀", + "⛹", + "🏌‍♀","🏌", + "🏄‍♀", + "🏄", + "🏊‍♀", + "🏊", + "🚣‍♀", + "🚣","🏇", + "🚴‍♀", + "🚴", + "🚵‍♀", + "🚵", + "🛀", + "🕴","🎗","🎽","🏅","🎖","🏆","🏵","🎯","🎫","🎟","🎭","🎨","🎪","🎬","🎤","🎧", + "🎼","🎹","🎷","🎺","🎸","🎻","🎮","🎰","🎲","🎳","⌚","📱","📲","💻","⌨","🖥", + "🖨","🖱","🖲","🕹","🗜","💽","💾","💿","📀","📼","📷","📸","📹","🎥","📽","🎞", + "📞","☎","📟","📠","📺","📻","🎙","🎚","🎛","⏱","⏲","⏰","🕰","⏳","⌛","📡", + "🔋","🔌","💡","🔦","🕯","🗑","🛢","💸","💵","💴","💶","💷","💰","💳","💎","⚖", + "🔧","🔨","⚒","🛠","⛏","🔩","⚙","⛓","🔫","💣","🔪","🗡","⚔","🛡","🚬","⚰","⚱", + "🏺","🔮","📿","💈","⚗","🔭","🔬","🕳","💊","💉","🌡","🚽","🚿","🛁","🛎","🔑", + "🗝","🚪","🛋","🛌","🛏","🖼","⛱","🗿","🛍","🎁","🎈","🎏","🎀","🎊","🎉","🎐", + "🏮","🎎","✉","📩","📨","📧","💌","📥","📤","📦","🏷","🔖","📪","📫","📬","📭", + "📮","📯","📜","📃","📄","📑","📊","📈","📉","🗒","🗓","📆","📅","📇","🗃","🗳", + "🗄","📋","📁","📂","🗂","🗞","📰","📓","📔","📒","📕","📗","📘","📙","📚","📖", + "🔗","📎","🖇","📐","📏","✂","📌","📍","🚩","🎌","🏳","🏴","🏁","🏳‍🌈","🖌","🖍", + "🖊","🖋","✒","📝","✏","🔏","🔐","🔒","🔓","🔍","🔎" + }, + null, + null + }; + + public static final String[][] data = { + new String[]{ + "😀","😬","😁","😂","😃","😄","😅","😆","😇","😉","😊","🙂","🙃","☺","😋","😌", + "😍","😘","😗","😙","😚","😜","😝","😛","🤑","🤓","😎","🤗","😏","😶","😐","😑", + "😒","🙄","🤔","😳","😞","😟","😠","😡","😔","😕","🙁","☹","😣","😖","😫","😩", + "😤","😮","😱","😨","😰","😯","😦","😧","😢","😥","😪","😓","😭","😵","😲","🤐", + "😷","🤒","🤕","😴","💤","💩","😈","👿","👹","👺","👻","💀","☠","👽","👾","🤖", + "😺","😸","😹","😻","😼","😽","🙀","😿","😾","🙌","🙌🏻","🙌🏼","🙌🏽","🙌🏾", + "🙌🏿","👏","👏🏻","👏🏼","👏🏽","👏🏾","👏🏿","👍","👍🏻","👍🏼","👍🏽","👍🏾", + "👍🏿","👎","👎🏻","👎🏼","👎🏽","👎🏾","👎🏿","👊","👊🏻","👊🏼","👊🏽","👊🏾", + "👊🏿","✊","✊🏻","✊🏼","✊🏽","✊🏾","✊🏿","👋","👋🏻","👋🏼","👋🏽","👋🏾", + "👋🏿","👈","👈🏻","👈🏼","👈🏽","👈🏾","👈🏿","👉","👉🏻","👉🏼","👉🏽","👉🏾", + "👉🏿","👆","👆🏻","👆🏼","👆🏽","👆🏾","👆🏿","👇","👇🏻","👇🏼","👇🏽","👇🏾", + "👇🏿","👌","👌🏻","👌🏼","👌🏽","👌🏾","👌🏿","☝","☝🏻","☝🏼","☝🏽","☝🏾","☝🏿", + "✌","✌🏻","✌🏼","✌🏽","✌🏾","✌🏿","✋","✋🏻","✋🏼","✋🏽","✋🏾","✋🏿","🖐", + "🖐🏻","🖐🏼","🖐🏽","🖐🏾","🖐🏿","👐","👐🏻","👐🏼","👐🏽","👐🏾","👐🏿","💪", + "💪🏻","💪🏼","💪🏽","💪🏾","💪🏿","🙏","🙏🏻","🙏🏼","🙏🏽","🙏🏾","🙏🏿","🖖", + "🖖🏻","🖖🏼","🖖🏽","🖖🏾","🖖🏿","🤘","🤘🏻","🤘🏼","🤘🏽","🤘🏾","🤘🏿","🖕", + "🖕🏻","🖕🏼","🖕🏽","🖕🏾","🖕🏿","✍","✍🏻","✍🏼","✍🏽","✍🏾","✍🏿","💅","💅🏻", + "💅🏼","💅🏽","💅🏾","💅🏿","👄","👅","👂","👂🏻","👂🏼","👂🏽","👂🏾","👂🏿","👃", + "👃🏻","👃🏼","👃🏽","👃🏾","👃🏿","👁","👀","🗣","👤","👥","👶","👶🏻","👶🏼","👶🏽", + "👶🏾","👶🏿","👦","👦🏻","👦🏼","👦🏽","👦🏾","👦🏿","👧","👧🏻","👧🏼","👧🏽","👧🏾", + "👧🏿","👨","👨🏻","👨🏼","👨🏽","👨🏾","👨🏿","👩","👩🏻","👩🏼","👩🏽","👩🏾","👩🏿", + "👱‍♀","👱🏻‍♀","👱🏼‍♀","👱🏽‍♀","👱🏾‍♀","👱🏿‍♀","👱","👱🏻","👱🏼","👱🏽","👱🏾","👱🏿", + "👴","👴🏻","👴🏼","👴🏽","👴🏾","👴🏿","👵","👵🏻","👵🏼","👵🏽","👵🏾","👵🏿","👲", + "👲🏻","👲🏼","👲🏽","👲🏾","👲🏿","👳‍♀","👳🏻‍♀","👳🏼‍♀","👳🏽‍♀","👳🏾‍♀","👳🏿‍♀", + "👳","👳🏻","👳🏼","👳🏽","👳🏾","👳🏿","👮‍♀","👮🏻‍♀","👮🏼‍♀","👮🏽‍♀","👮🏾‍♀", + "👮🏿‍♀","👮","👮🏻","👮🏼","👮🏽","👮🏾","👮🏿","👷‍♀","👷🏻‍♀","👷🏼‍♀","👷🏽‍♀", + "👷🏾‍♀","👷🏿‍♀","👷","👷🏻","👷🏼","👷🏽","👷🏾","👷🏿","💂‍♀","💂🏻‍♀","💂🏼‍♀", + "💂🏽‍♀","💂🏾‍♀","💂🏿‍♀","💂","💂🏻","💂🏼","💂🏽","💂🏾","💂🏿","🕵‍♀","🕵🏻‍♀", + "🕵🏼‍♀","🕵🏽‍♀","🕵🏾‍♀","🕵🏿‍♀","🕵","🕵🏻","🕵🏼","🕵🏽","🕵🏾","🕵🏿","🎅", + "🎅🏻","🎅🏼","🎅🏽","🎅🏾","🎅🏿","👸","👸🏻","👸🏼","👸🏽","👸🏾","👸🏿","👰", + "👰🏻","👰🏼","👰🏽","👰🏾","👰🏿","👼","👼🏻","👼🏼","👼🏽","👼🏾","👼🏿","🙇‍♀", + "🙇🏻‍♀","🙇🏼‍♀","🙇🏽‍♀","🙇🏾‍♀","🙇🏿‍♀","🙇","🙇🏻","🙇🏼","🙇🏽","🙇🏾","🙇🏿", + "💁","💁🏻","💁🏼","💁🏽","💁🏾","💁🏿","💁‍♂","💁🏻‍♂","💁🏼‍♂","💁🏽‍♂","💁🏾‍♂", + "💁🏿‍♂","🙅","🙅🏻","🙅🏼","🙅🏽","🙅🏾","🙅🏿","🙅‍♂","🙅🏻‍♂","🙅🏼‍♂","🙅🏽‍♂", + "🙅🏾‍♂","🙅🏿‍♂","🙆","🙆🏻","🙆🏼","🙆🏽","🙆🏾","🙆🏿","🙆‍♂","🙆🏻‍♂","🙆🏼‍♂","🙆🏽‍♂", + "🙆🏾‍♂","🙆🏿‍♂","🙋","🙋🏻","🙋🏼","🙋🏽","🙋🏾","🙋🏿","🙋‍♂","🙋🏻‍♂","🙋🏼‍♂","🙋🏽‍♂", + "🙋🏾‍♂","🙋🏿‍♂","🙎","🙎🏻","🙎🏼","🙎🏽","🙎🏾","🙎🏿","🙎‍♂","🙎🏻‍♂","🙎🏼‍♂","🙎🏽‍♂", + "🙎🏾‍♂","🙎🏿‍♂","🙍","🙍🏻","🙍🏼","🙍🏽","🙍🏾","🙍🏿","🙍‍♂","🙍🏻‍♂","🙍🏼‍♂","🙍🏽‍♂", + "🙍🏾‍♂","🙍🏿‍♂","💇","💇🏻","💇🏼","💇🏽","💇🏾","💇🏿","💇‍♂","💇🏻‍♂","💇🏼‍♂","💇🏽‍♂", + "💇🏾‍♂","💇🏿‍♂","💆","💆🏻","💆🏼","💆🏽","💆🏾","💆🏿","💆‍♂","💆🏻‍♂","💆🏼‍♂","💆🏽‍♂", + "💆🏾‍♂","💆🏿‍♂","💃","💃🏻","💃🏼","💃🏽","💃🏾","💃🏿","👯","👯‍♂","🚶‍♀","🚶🏻‍♀","🚶🏼‍♀", + "🚶🏽‍♀","🚶🏾‍♀","🚶🏿‍♀","🚶","🚶🏻","🚶🏼","🚶🏽","🚶🏾","🚶🏿","🏃‍♀","🏃🏻‍♀","🏃🏼‍♀", + "🏃🏽‍♀","🏃🏾‍♀","🏃🏿‍♀","🏃","🏃🏻","🏃🏼","🏃🏽","🏃🏾","🏃🏿","👫","👭","👬","💑","👩‍❤‍👩", + "👨‍❤‍👨","💏","👩‍❤‍💋‍👩","👨‍❤‍💋‍👨","👪","👨‍👩‍👧","👨‍👩‍👧‍👦","👨‍👩‍👦‍👦","👨‍👩‍👧‍👧","👩‍👩‍👦", + "👩‍👩‍👧","👩‍👩‍👧‍👦","👩‍👩‍👦‍👦","👩‍👩‍👧‍👧","👨‍👨‍👦","👨‍👨‍👧","👨‍👨‍👧‍👦","👨‍👨‍👦‍👦","👨‍👨‍👧‍👧", + "👩‍👦","👩‍👧","👩‍👧‍👦","👩‍👦‍👦","👩‍👧‍👧","👨‍👦","👨‍👧","👨‍👧‍👦","👨‍👦‍👦","👨‍👧‍👧","👚","👕", + "👖","👔","👗","👙","👘","💄","💋","👣","👠","👡","👢","👞","👟","👒","🎩","🎓","👑","⛑","🎒", + "👝","👛","👜","💼","👓","🕶","💍","🌂","❤","💛","💚","💙","💜","💔","❣","💕","💞","💓","💗","💖","💘","💝" + }, + new String[]{ + "🐶","🐱","🐭","🐹","🐰","🐻","🐼","🐨","🐯","🦁","🐮","🐷","🐽","🐸","🐙","🐵","🙈","🙉", + "🙊","🐒","🐔","🐧","🐦","🐤","🐣","🐥","🐺","🐗","🐴","🦄","🐝","🐛","🐌","🐞","🐜","🕷", + "🦂","🦀","🐍","🐢","🐠","🐟","🐡","🐬","🐳","🐋","🐊","🐆","🐅","🐃","🐂","🐄","🐪","🐫", + "🐘","🐐","🐏","🐑","🐎","🐖","🐀","🐁","🐓","🦃","🕊","🐕","🐩","🐈","🐇","🐿","🐾","🐉", + "🐲","🌵","🎄","🌲","🌳","🌴","🌱","🌿","☘","🍀","🎍","🎋","🍃","🍂","🍁","🌾","🌺","🌻", + "🌹","🌷","🌼","🌸","💐","🍄","🌰","🎃","🐚","🕸","🌎","🌍","🌏","🌕","🌖","🌗","🌘","🌑", + "🌒","🌓","🌔","🌚","🌝","🌛","🌜","🌞","🌙","⭐","🌟","💫","✨","☄","☀","🌤","⛅","🌥", + "🌦","☁","🌧","⛈","🌩","⚡","🔥","💥","❄","🌨","☃","⛄","🌬","💨","🌪","🌫","☂","☔","💧","💦","🌊" + }, + new String[]{ + "🍏","🍎","🍐","🍊","🍋","🍌","🍉","🍇","🍓","🍈","🍒","🍑","🍍","🍅","🍆","🌶","🌽", + "🍠","🍯","🍞","🧀","🍗","🍖","🍤","🍳","🍔","🍟","🌭","🍕","🍝","🌮","🌯","🍜","🍲", + "🍥","🍣","🍱","🍛","🍙","🍚","🍘","🍢","🍡","🍧","🍨","🍦","🍰","🎂","🍮","🍬","🍭", + "🍫","🍿","🍩","🍪","🍺","🍻","🍷","🍸","🍹","🍾","🍶","🍵","☕","🍼","🍴","🍽","⚽", + "🏀","🏈","⚾","🎾","🏐","🏉","🎱","🏓","🏸","🏒","🏑","🏏","🏹","⛳","🎣","⛸","🎿", + "⛷","🏂","🏋‍♀","🏋🏻‍♀","🏋🏼‍♀","🏋🏽‍♀","🏋🏾‍♀","🏋🏿‍♀","🏋","🏋🏻","🏋🏼","🏋🏽", + "🏋🏾","🏋🏿","⛹‍♀","⛹🏻‍♀","⛹🏼‍♀","⛹🏽‍♀","⛹🏾‍♀","⛹🏿‍♀","⛹","⛹🏻","⛹🏼", + "⛹🏽","⛹🏾","⛹🏿","🏌‍♀","🏌","🏄‍♀","🏄🏻‍♀","🏄🏼‍♀","🏄🏽‍♀","🏄🏾‍♀","🏄🏿‍♀", + "🏄","🏄🏻","🏄🏼","🏄🏽","🏄🏾","🏄🏿","🏊‍♀","🏊🏻‍♀","🏊🏼‍♀","🏊🏽‍♀","🏊🏾‍♀", + "🏊🏿‍♀","🏊","🏊🏻","🏊🏼","🏊🏽","🏊🏾","🏊🏿","🚣‍♀","🚣🏻‍♀","🚣🏼‍♀","🚣🏽‍♀", + "🚣🏾‍♀","🚣🏿‍♀","🚣","🚣🏻","🚣🏼","🚣🏽","🚣🏾","🚣🏿","🏇","🚴‍♀","🚴🏻‍♀","🚴🏼‍♀", + "🚴🏽‍♀","🚴🏾‍♀","🚴🏿‍♀","🚴","🚴🏻","🚴🏼","🚴🏽","🚴🏾","🚴🏿","🚵‍♀","🚵🏻‍♀","🚵🏼‍♀", + "🚵🏽‍♀","🚵🏾‍♀","🚵🏿‍♀","🚵","🚵🏻","🚵🏼","🚵🏽","🚵🏾","🚵🏿","🛀","🛀🏻","🛀🏼", + "🛀🏽","🛀🏾","🛀🏿","🕴","🎗","🎽","🏅","🎖","🏆","🏵","🎯","🎫","🎟","🎭","🎨","🎪", + "🎬","🎤","🎧","🎼","🎹","🎷","🎺","🎸","🎻","🎮","🎰","🎲","🎳","⌚","📱","📲","💻", + "⌨","🖥","🖨","🖱","🖲","🕹","🗜","💽","💾","💿","📀","📼","📷","📸","📹","🎥","📽", + "🎞","📞","☎","📟","📠","📺","📻","🎙","🎚","🎛","⏱","⏲","⏰","🕰","⏳","⌛","📡", + "🔋","🔌","💡","🔦","🕯","🗑","🛢","💸","💵","💴","💶","💷","💰","💳","💎","⚖","🔧", + "🔨","⚒","🛠","⛏","🔩","⚙","⛓","🔫","💣","🔪","🗡","⚔","🛡","🚬","⚰","⚱","🏺","🔮", + "📿","💈","⚗","🔭","🔬","🕳","💊","💉","🌡","🚽","🚿","🛁","🛎","🔑","🗝","🚪","🛋","🛌", + "🛏","🖼","⛱","🗿","🛍","🎁","🎈","🎏","🎀","🎊","🎉","🎐","🏮","🎎","✉","📩","📨","📧", + "💌","📥","📤","📦","🏷","🔖","📪","📫","📬","📭","📮","📯","📜","📃","📄","📑","📊","📈", + "📉","🗒","🗓","📆","📅","📇","🗃","🗳","🗄","📋","📁","📂","🗂","🗞","📰","📓","📔","📒", + "📕","📗","📘","📙","📚","📖","🔗","📎","🖇","📐","📏","✂","📌","📍","🚩","🎌","🏳","🏴", + "🏁","🏳‍🌈","🖌","🖍","🖊","🖋","✒","📝","✏","🔏","🔐","🔒","🔓","🔍","🔎" + }, + new String[]{ + "🚗","🚕","🚙","🚌","🚎","🏎","🚓","🚑","🚒","🚐","🚚","🚛","🚜","🏍","🚲","🚨","🚔","🚍", + "🚘","🚖","🚡","🚠","🚟","🚃","🚋","🚝","🚄","🚅","🚈","🚞","🚂","🚆","🚇","🚊","🚉","🚁", + "🛩","✈","🛫","🛬","⛵","🛥","🚤","⛴","🛳","🚀","🛰","💺","⚓","🚧","⛽","🚏","🚦","🚥", + "🗺","🚢","🎡","🎢","🎠","🏗","🌁","🗼","🏭","⛲","🎑","⛰","🏔","🗻","🌋","🗾","🏕","⛺", + "🏞","🛣","🛤","🌅","🌄","🏜","🏖","🏝","🌇","🌆","🏙","🌃","🌉","🌌","🌠","🎇","🎆","🌈", + "🏘","🏰","🏯","🏟","🗽","🏠","🏡","🏚","🏢","🏬","🏣","🏤","🏥","🏦","🏨","🏪","🏫","🏩", + "💒","🏛","⛪","🕌","🕍","🕋","⛩","🇦🇺","🇦🇹","🇦🇿","🇦🇽","🇦🇱","🇩🇿","🇦🇸","🇦🇮","🇦🇴", + "🇦🇩","🇦🇶","🇦🇬","🇦🇷","🇦🇲","🇦🇼","🇦🇫","🇧🇸","🇧🇩","🇧🇧","🇧🇭","🇧🇾","🇧🇿","🇧🇪", + "🇧🇯","🇧🇲","🇧🇬","🇧🇴","🇧🇶","🇧🇦","🇧🇼","🇧🇷","🇮🇴","🇧🇳","🇧🇫","🇧🇮","🇧🇹","🇻🇺", + "🇻🇦","🇬🇧","🇭🇺","🇻🇪","🇻🇬","🇻🇮","🇹🇱","🇻🇳","🇬🇦","🇭🇹","🇬🇾","🇬🇲","🇬🇭","🇬🇵", + "🇬🇹","🇬🇳","🇬🇼","🇩🇪","🇬🇬","🇬🇮","🇭🇳","🇭🇰","🇬🇩","🇬🇱","🇬🇷","🇬🇪","🇬🇺","🇩🇰", + "🇯🇪","🇩🇯","🇩🇲","🇩🇴","🇪🇺","🇪🇬","🇿🇲","🇪🇭","🇿🇼","🇮🇱","🇮🇳","🇮🇩","🇯🇴","🇮🇶", + "🇮🇷","🇮🇪","🇮🇸","🇪🇸","🇮🇹","🇾🇪","🇨🇻","🇰🇿","🇰🇾","🇰🇭","🇨🇲","🇨🇦","🇮🇨","🇶🇦", + "🇰🇪","🇨🇾","🇰🇬","🇰🇮","🇨🇳","🇰🇵","🇨🇨","🇨🇴","🇰🇲","🇨🇬","🇨🇩","🇽🇰","🇨🇷","🇨🇮", + "🇨🇺","🇰🇼","🇨🇼","🇱🇦","🇱🇻","🇱🇸","🇱🇷","🇱🇧","🇱🇾","🇱🇹","🇱🇮","🇱🇺","🇲🇺","🇲🇷", + "🇲🇬","🇾🇹","🇲🇴","🇲🇰","🇲🇼","🇲🇾","🇲🇱","🇲🇻","🇲🇹","🇲🇦","🇲🇶","🇲🇭","🇲🇽","🇫🇲", + "🇲🇿","🇲🇩","🇲🇨","🇲🇳","🇲🇸","🇲🇲","🇳🇦","🇳🇷","🇳🇵","🇳🇪","🇳🇬","🇳🇱","🇳🇮","🇳🇺", + "🇳🇿","🇳🇨","🇳🇴","🇮🇲","🇳🇫","🇨🇽","🇸🇭","🇨🇰","🇹🇨","🇦🇪","🇴🇲","🇵🇳","🇵🇰","🇵🇼", + "🇵🇸","🇵🇦","🇵🇬","🇵🇾","🇵🇪","🇵🇱","🇵🇹","🇵🇷","🇰🇷","🇷🇪","🇷🇺","🇷🇼","🇷🇴","🇸🇻", + "🇼🇸","🇸🇲","🇸🇹","🇸🇦","🇸🇿","🇲🇵","🇸🇨","🇧🇱","🇵🇲","🇸🇳","🇻🇨","🇰🇳","🇱🇨","🇷🇸", + "🇸🇬","🇸🇽","🇸🇾","🇸🇰","🇸🇮","🇺🇸","🇸🇧","🇸🇴","🇸🇩","🇸🇷","🇸🇱","🇹🇯","🇹🇭","🇹🇼", + "🇹🇿","🇹🇬","🇹🇰","🇹🇴","🇹🇹","🇹🇻","🇹🇳","🇹🇲","🇹🇷","🇺🇬","🇺🇿","🇺🇦","🇼🇫","🇺🇾", + "🇫🇴","🇫🇯","🇵🇭","🇫🇮","🇫🇰","🇫🇷","🇬🇫","🇵🇫","🇹🇫","🇭🇷","🇨🇫","🇹🇩","🇲🇪","🇨🇿", + "🇨🇱","🇨🇭","🇸🇪","🇱🇰","🇪🇨","🇬🇶","🇪🇷","🇪🇪","🇪🇹","🇿🇦","🇬🇸","🇸🇸","🇯🇲","🇯🇵" + }, + new String[]{ + "💟","☮","✝","☪","🕉","☸","✡","🔯","🕎","☯","☦","🛐","⛎","♈","♉","♊","♋","♌","♍","♎","♏", + "♐","♑","♒","♓","🆔","⚛","🈳","🈹","☢","☣","📴","📳","🈶","🈚","🈸","🈺","🈷","✴","🆚","🉑", + "💮","🉐","㊙","㊗","🈴","🈵","🈲","🅰","🅱","🆎","🆑","🅾","🆘","⛔","📛","🚫","❌","⭕","💢", + "♨","🚷","🚯","🚳","🚱","🔞","📵","❗","❕","❓","❔","‼","⁉","💯","🔅","🔆","🔱","⚜","〽","⚠", + "🚸","🔰","♻","🈯","💹","❇","✳","❎","✅","🌐","Ⓜ","💠","🌀","➿","🏧","🈂","🛂","🛃","🛄", + "🛅","♿","🚭","🚾","🅿","🚰","🚹","🚺","🚼","🚻","🚮","🎦","📶","🈁","🔤","🔡","🔠","🔣","ℹ", + "🆖","🆗","🆙","🆒","🆕","🆓","0⃣","1⃣","2⃣","3⃣","4⃣","5⃣","6⃣","7⃣","8⃣","9⃣","🔟","🔢","#⃣","*⃣","▶", + "⏸","⏯","⏹","⏺","⏭","⏮","⏩","⏪","⏫","⏬","◀","🔼","🔽","➡","⬅","⬆","⬇","↗","↘","↙", + "↖","↕","↔","↪","↩","⤴","⤵","🔀","🔁","🔂","🔄","🔃","🎵","🎶","〰","➰","✔","➕","➖","➗", + "✖","💲","💱","™","©","®","🔚","🔙","🔛","🔝","🔜","☑","🔘","⚪","⚫","🔴","🔵","🔺","🔻","🔸", + "🔹","🔶","🔷","🔳","🔲","▪","▫","◾","◽","◼","◻","⬛","⬜","🔇","🔈","🔉","🔊","🔕","🔔","📣", + "📢","👁‍🗨","💬","💭","🗯","🃏","🀄","🎴","♠","♣","♥","♦","🕐","🕑","🕒","🕓","🕔","🕕","🕖", + "🕗","🕘","🕙","🕚","🕛","🕜","🕝","🕞","🕟","🕠","🕡","🕢","🕣","🕤","🕥","🕦","🕧" + } + }; + + public static final HashMap emojiToFE0FMap = new HashMap<>(emojiToFE0F.length); + public static final HashMap dataCharsMap = new HashMap<>(dataChars.length); + public static final HashMap emojiColoredMap = new HashMap<>(emojiColored.length); + + static { + for (int a = 0; a < emojiToFE0F.length; a++) { + emojiToFE0FMap.put(emojiToFE0F[a], true); + } + for (int a = 0; a < dataChars.length; a++) { + dataCharsMap.put(dataChars[a], true); + } + for (int a = 0; a < emojiColored.length; a++) { + emojiColoredMap.put(emojiColored[a], true); + } + dataColored[1] = data[1]; + dataColored[3] = data[3]; + dataColored[4] = data[4]; + } +} diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/keyboard/emoji/EmojiKeyboard.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/keyboard/emoji/EmojiKeyboard.java index ccfb642faf..3e6b6dab1f 100644 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/keyboard/emoji/EmojiKeyboard.java +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/keyboard/emoji/EmojiKeyboard.java @@ -16,181 +16,87 @@ package im.actor.sdk.view.emoji.keyboard.emoji; -import android.animation.ObjectAnimator; import android.app.Activity; -import android.support.v4.view.ViewPager; +import android.app.AlertDialog; import android.view.KeyEvent; -import android.view.LayoutInflater; import android.view.View; -import android.view.View.OnClickListener; import android.widget.EditText; -import android.widget.FrameLayout; -import android.widget.LinearLayout; -import im.actor.core.entity.Peer; import im.actor.core.entity.Sticker; -import im.actor.sdk.R; -import im.actor.sdk.view.emoji.SmileProcessor; -import im.actor.sdk.view.emoji.keyboard.BaseKeyboard; -import im.actor.sdk.view.emoji.keyboard.emoji.smiles.OnBackspaceClickListener; -import im.actor.sdk.view.emoji.keyboard.emoji.smiles.OnSmileClickListener; -import im.actor.sdk.view.emoji.keyboard.emoji.smiles.RepeatListener; -import im.actor.sdk.view.emoji.keyboard.emoji.smiles.SmilePagerAdapter; +import im.actor.sdk.ActorSDK; import im.actor.sdk.util.Screen; import im.actor.sdk.view.MaterialInterpolator; -import im.actor.sdk.view.PagerSlidingTabStrip; -import im.actor.sdk.view.emoji.smiles.SmilesPack; - -import static im.actor.sdk.util.ActorSDKMessenger.messenger; +import im.actor.sdk.view.emoji.keyboard.BaseKeyboard; -public class EmojiKeyboard extends BaseKeyboard implements OnSmileClickListener, - OnBackspaceClickListener { +public class EmojiKeyboard extends BaseKeyboard { private static final String TAG = "EmojiKeyboard"; - - private static final long BINDING_DELAY = 150; private OnStickerClickListener onStickerClickListener; - private View stickerIndicatorContainer; - private View stickerSwitchContainer; - private SmilePagerAdapter mEmojisAdapter; + private static final long BINDING_DELAY = 150; public EmojiKeyboard(Activity activity, EditText messageBody) { super(activity, messageBody); } - @Override - public void onEmojiClicked(String smile) { - if (messageBody == null) { - return; - } - int selectionEnd = messageBody.getSelectionEnd(); - if (selectionEnd < 0) { - selectionEnd = messageBody.getText().length(); - } - CharSequence appendString = SmileProcessor.emoji().processEmojiMutable(smile, - SmileProcessor.CONFIGURATION_BUBBLES); - - messageBody.getText().insert(selectionEnd, appendString); - } - - @Override - public void onBackspaceClick(View v) { - if (messageBody == null) { - return; - } - KeyEvent event = new KeyEvent(0, 0, 0, KeyEvent.KEYCODE_DEL, 0, 0, 0, 0, KeyEvent.KEYCODE_ENDCALL); - messageBody.dispatchKeyEvent(event); - } @Override protected View createView() { - final View emojiPagerView = LayoutInflater.from(activity).inflate(R.layout.emoji_smiles_pager, null); - - final ViewPager emojiPager = (ViewPager) emojiPagerView.findViewById(R.id.emoji_pager); - - final PagerSlidingTabStrip emojiPagerIndicator = (PagerSlidingTabStrip) emojiPagerView.findViewById(R.id.emoji_pager_indicator); - View backspace = emojiPagerView.findViewById(R.id.backspace); - final View backToSmiles = emojiPagerView.findViewById(R.id.back_to_smiles); - final View indicatorContainer = emojiPagerView.findViewById(R.id.indicator_container); - stickerIndicatorContainer = emojiPagerView.findViewById(R.id.sticker_indicator_container); - stickerSwitchContainer = emojiPagerView.findViewById(R.id.sticker_switch_container); - emojiPagerIndicator.setTabBackground(R.drawable.clickable_background); - emojiPagerIndicator.setIndicatorColorResource(R.color.primary); - emojiPagerIndicator.setIndicatorHeight(Screen.dp(2)); - emojiPagerIndicator.setDividerColor(0x00000000); - emojiPagerIndicator.setUnderlineHeight(0); - emojiPagerIndicator.setTabLayoutParams(new LinearLayout.LayoutParams(Screen.dp(48), Screen.dp(48))); + EmojiView emojiView = new EmojiView(ActorSDK.sharedActor().isStickersEnabled(), getActivity()); + emojiView.setVisibility(View.VISIBLE); - backspace.setOnTouchListener(new RepeatListener(500, 100, new OnClickListener() { - @Override - public void onClick(View v) { - onBackspaceClick(v); + emojiView.setListener(new EmojiView.Listener() { + public boolean onBackspace() { + if (messageBody == null) { + return true; + } + KeyEvent event = new KeyEvent(0, 0, 0, KeyEvent.KEYCODE_DEL, 0, 0, 0, 0, KeyEvent.KEYCODE_ENDCALL); + messageBody.dispatchKeyEvent(event); + return true; } - })); - mEmojisAdapter = new SmilePagerAdapter(this); - mEmojisAdapter.setTabs(emojiPagerIndicator); - emojiPager.setAdapter(mEmojisAdapter); - emojiPagerIndicator.setViewPager(emojiPager); - - backToSmiles.setOnClickListener(new OnClickListener() { - @Override - public void onClick(View v) { - emojiPager.setCurrentItem(3, false); - - ObjectAnimator oa = ObjectAnimator.ofFloat(indicatorContainer, "translationX", 0, 0); - oa.setDuration(0); - oa.start(); - if (stickerIndicatorContainer.getVisibility() == View.INVISIBLE) { - stickerIndicatorContainer.setVisibility(View.VISIBLE); + public void onEmojiSelected(String symbol) { + if (messageBody == null) { + return; } - ObjectAnimator oas = ObjectAnimator.ofFloat(stickerIndicatorContainer, "translationX", Screen.getWidth(), Screen.getWidth()); - oas.setDuration(0); - oas.start(); - - emojiPager.setCurrentItem(1, true); - - + int selectionEnd = messageBody.getSelectionEnd(); + if (selectionEnd < 0) { + selectionEnd = messageBody.getText().length(); + } + CharSequence localCharSequence = Emoji.replaceEmoji(symbol, messageBody.getPaint().getFontMetricsInt(), Screen.dp(20), false); + messageBody.getText().insert(selectionEnd, localCharSequence); } - }); - - final FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) stickerIndicatorContainer.getLayoutParams(); - emojiPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() { @Override - public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { - if (position == 4) { - - ObjectAnimator oa = ObjectAnimator.ofFloat(indicatorContainer, "translationX", indicatorContainer.getX(), -positionOffsetPixels); - oa.setDuration(0); - oa.start(); - if (stickerIndicatorContainer.getVisibility() == View.INVISIBLE) { - stickerIndicatorContainer.setVisibility(View.VISIBLE); - } - ObjectAnimator oas = ObjectAnimator.ofFloat(stickerIndicatorContainer, "translationX", stickerIndicatorContainer.getX() + Screen.getWidth(), -positionOffsetPixels + Screen.getWidth()); - oas.setDuration(0); - oas.start(); - + public void onClearEmojiRecent() { + if (getActivity() == null) { + return; } + AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); + builder.setTitle(ActorSDK.sharedActor().getAppName()); + builder.setMessage("Remover emojis recentes"); + builder.setPositiveButton("Confirmar", (dialogInterface, i)-> { + emojiView.clearRecentEmoji(); + }); + builder.setNegativeButton("Cancelar", null); + builder.create().show(); } @Override - public void onPageSelected(int position) { - - } - - @Override - public void onPageScrollStateChanged(int state) { - + public void onStickerSelected(Sticker sticker) { + if(getOnStickerClickListener() != null){ + getOnStickerClickListener().onStickerClicked(sticker); + } } }); - - //emojiPagerIndicator.setLayoutParams(new RelativeLayout.LayoutParams(Screen.dp(58 * mEmojisAdapter.getCount()), Screen.dp(48))); -// emojiPager.postDelayed(new Runnable() { -// @Override -// public void run() { -// emojiPager.setAlpha(0f); -// emojiPagerIndicator.setAlpha(0f); -// animateView(emojiPager); -// animateView(emojiPagerIndicator); -// emojiPager.setAdapter(mEmojisAdapter); -// emojiPagerIndicator.setViewPager(emojiPager); -// } -// }, BINDING_DELAY); - - if (SmilesPack.getRecent().size() == 0) { - emojiPager.setCurrentItem(1); - } - - return emojiPagerView; + return emojiView; } @Override protected void onDismiss() { - SmileProcessor.emoji().getRecentController().saveRecents(); + messageBody.requestFocus(); } void animateView(View view) { @@ -201,13 +107,6 @@ void animateView(View view) { .start(); } - - public void onStickerClicked(Sticker sticker) { - if (onStickerClickListener != null) { - onStickerClickListener.onStickerClicked(sticker); - } - } - public OnStickerClickListener getOnStickerClickListener() { return onStickerClickListener; } @@ -215,15 +114,4 @@ public OnStickerClickListener getOnStickerClickListener() { public void setOnStickerClickListener(OnStickerClickListener onStickerClickListener) { this.onStickerClickListener = onStickerClickListener; } - - public LinearLayout getStickerIndicatorContainer() { - return (LinearLayout) stickerSwitchContainer; - } - - public void release() { - if (mEmojisAdapter != null) { - mEmojisAdapter.release(); - } - } - } \ No newline at end of file diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/keyboard/emoji/EmojiView.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/keyboard/emoji/EmojiView.java new file mode 100644 index 0000000000..c3ed5740bd --- /dev/null +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/keyboard/emoji/EmojiView.java @@ -0,0 +1,1160 @@ +package im.actor.sdk.view.emoji.keyboard.emoji; + +import android.annotation.TargetApi; +import android.app.Activity; +import android.content.Context; +import android.content.SharedPreferences; +import android.database.DataSetObserver; +import android.graphics.Canvas; +import android.graphics.Outline; +import android.graphics.Paint; +import android.graphics.RectF; +import android.graphics.drawable.Drawable; +import android.os.Build; +import android.support.v4.view.PagerAdapter; +import android.support.v4.view.ViewPager; +import android.support.v7.widget.RecyclerView; +import android.view.Gravity; +import android.view.HapticFeedbackConstants; +import android.view.KeyEvent; +import android.view.MotionEvent; +import android.view.View; +import android.view.ViewGroup; +import android.view.ViewOutlineProvider; +import android.view.ViewTreeObserver; +import android.view.WindowManager; +import android.widget.BaseAdapter; +import android.widget.FrameLayout; +import android.widget.GridView; +import android.widget.ImageView; +import android.widget.LinearLayout; +import android.widget.PopupWindow; +import android.widget.TextView; + +import java.lang.reflect.Field; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashMap; + +import im.actor.core.entity.Sticker; +import im.actor.runtime.Log; +import im.actor.sdk.R; +import im.actor.sdk.util.AndroidUtils; +import im.actor.sdk.util.LayoutHelper; +import im.actor.sdk.util.Screen; +import im.actor.sdk.util.Utilities; +import im.actor.sdk.view.PagerSlidingTabStrip; +import im.actor.sdk.view.emoji.EmojiData; +import im.actor.sdk.view.emoji.stickers.StickersView; + +/** + * Created by 98379720172 on 03/01/17. + */ + +public class EmojiView extends FrameLayout { + + private static String TAG = EmojiView.class.getName(); + + public interface Listener { + boolean onBackspace(); + void onEmojiSelected(String emoji); + void onClearEmojiRecent(); + void onStickerSelected(Sticker sticker); + } + + private static final Field superListenerField; + static { + Field f = null; + try { + f = PopupWindow.class.getDeclaredField("mOnScrollChangedListener"); + f.setAccessible(true); + } catch (NoSuchFieldException e) { + /* ignored */ + } + superListenerField = f; + } + + private static final ViewTreeObserver.OnScrollChangedListener NOP = new ViewTreeObserver.OnScrollChangedListener() { + @Override + public void onScrollChanged() { + /* do nothing */ + } + }; + + private static String addColorToCode(String code, String color) { + String end = null; + if (code.endsWith("\u200D\u2640") || code.endsWith("\u200D\u2642")) { + end = code.substring(code.length() - 2); + code = code.substring(0, code.length() - 2); + } + code += color; + if (end != null) { + code += end; + } + return code; + } + + private class ImageViewEmoji extends ImageView { + + private boolean touched; + private float lastX; + private float lastY; + private float touchedX; + private float touchedY; + + public ImageViewEmoji(Context context) { + super(context); + setOnClickListener(new OnClickListener() { + @Override + public void onClick(View v) { + sendEmoji(null); + } + }); + setOnLongClickListener(new OnLongClickListener() { + @Override + public boolean onLongClick(View view) { + String code = (String) view.getTag(); + if (EmojiData.emojiColoredMap.containsKey(code)) { + touched = true; + touchedX = lastX; + touchedY = lastY; + + String color = emojiColor.get(code); + if (color != null) { + switch (color) { + case "\uD83C\uDFFB": + pickerView.setSelection(1); + break; + case "\uD83C\uDFFC": + pickerView.setSelection(2); + break; + case "\uD83C\uDFFD": + pickerView.setSelection(3); + break; + case "\uD83C\uDFFE": + pickerView.setSelection(4); + break; + case "\uD83C\uDFFF": + pickerView.setSelection(5); + break; + } + } else { + pickerView.setSelection(0); + } + view.getLocationOnScreen(location); + + int x = emojiSize * pickerView.getSelection() + Screen.dp(4 * pickerView.getSelection() - (AndroidUtils.isTablet() ? 5 : 1)); + if (location[0] - x < Screen.dp(5)) { + x += (location[0] - x) - Screen.dp(5); + } else if (location[0] - x + popupWidth > Screen.displaySize.x - Screen.dp(5)) { + x += (location[0] - x + popupWidth) - (Screen.displaySize.x - Screen.dp(5)); + } + int xOffset = -x; + int yOffset = view.getTop() < 0 ? view.getTop() : 0; + + pickerView.setEmoji(code, Screen.dp(AndroidUtils.isTablet() ? 30 : 22) - xOffset + (int) Screen.dpf2(0.5f)); + + pickerViewPopup.setFocusable(true); + pickerViewPopup.showAsDropDown(view, xOffset, -view.getMeasuredHeight() - popupHeight + (view.getMeasuredHeight() - emojiSize) / 2 - yOffset); + view.getParent().requestDisallowInterceptTouchEvent(true); + return true; + } else if (pager.getCurrentItem() == 0) { + listener.onClearEmojiRecent(); + } + return false; + } + }); + setBackgroundResource(R.drawable.list_selector); + setScaleType(ImageView.ScaleType.CENTER); + } + + private void sendEmoji(String override) { + String code = override != null ? override : (String) getTag(); + if (override == null) { + if (pager.getCurrentItem() != 0) { + String color = emojiColor.get(code); + if (color != null) { + code = addColorToCode(code, color); + } + } + Integer count = emojiUseHistory.get(code); + if (count == null) { + count = 0; + } + if (count == 0 && emojiUseHistory.size() > 50) { + for (int a = recentEmoji.size() - 1; a >= 0; a--) { + String emoji = recentEmoji.get(a); + emojiUseHistory.remove(emoji); + recentEmoji.remove(a); + if (emojiUseHistory.size() <= 50) { + break; + } + } + } + emojiUseHistory.put(code, ++count); + if (pager.getCurrentItem() != 0) { + sortEmoji(); + } + saveRecentEmoji(); + adapters.get(0).notifyDataSetChanged(); + if (listener != null) { + listener.onEmojiSelected(Emoji.fixEmoji(code)); + } + } else { + if (listener != null) { + listener.onEmojiSelected(Emoji.fixEmoji(override)); + } + } + } + + @Override + public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { + setMeasuredDimension(View.MeasureSpec.getSize(widthMeasureSpec), View.MeasureSpec.getSize(widthMeasureSpec)); + } + + @Override + public boolean onTouchEvent(MotionEvent event) { + if (touched) { + if (event.getAction() == MotionEvent.ACTION_UP || event.getAction() == MotionEvent.ACTION_CANCEL) { + if (pickerViewPopup != null && pickerViewPopup.isShowing()) { + pickerViewPopup.dismiss(); + + String color = null; + switch (pickerView.getSelection()) { + case 1: + color = "\uD83C\uDFFB"; + break; + case 2: + color = "\uD83C\uDFFC"; + break; + case 3: + color = "\uD83C\uDFFD"; + break; + case 4: + color = "\uD83C\uDFFE"; + break; + case 5: + color = "\uD83C\uDFFF"; + break; + } + String code = (String) getTag(); + if (pager.getCurrentItem() != 0) { + if (color != null) { + emojiColor.put(code, color); + code = addColorToCode(code, color); + } else { + emojiColor.remove(code); + } + setImageDrawable(Emoji.getEmojiBigDrawable(code)); + sendEmoji(null); + saveEmojiColors(); + } else { + sendEmoji(code + (color != null ? color : "")); + } + } + touched = false; + touchedX = -10000; + touchedY = -10000; + } else if (event.getAction() == MotionEvent.ACTION_MOVE) { + boolean ignore = false; + if (touchedX != -10000) { + if (Math.abs(touchedX - event.getX()) > Screen.getPixelsInCM(0.2f, true) || Math.abs(touchedY - event.getY()) > Screen.getPixelsInCM(0.2f, false)) { + touchedX = -10000; + touchedY = -10000; + } else { + ignore = true; + } + } + if (!ignore) { + getLocationOnScreen(location); + float x = location[0] + event.getX(); + pickerView.getLocationOnScreen(location); + x -= location[0] + Screen.dp(3); + int position = (int) (x / (emojiSize + Screen.dp(4))); + if (position < 0) { + position = 0; + } else if (position > 5) { + position = 5; + } + pickerView.setSelection(position); + } + } + } + lastX = event.getX(); + lastY = event.getY(); + return super.onTouchEvent(event); + } + } + + + + private class EmojiPopupWindow extends PopupWindow { + + private ViewTreeObserver.OnScrollChangedListener mSuperScrollListener; + private ViewTreeObserver mViewTreeObserver; + + public EmojiPopupWindow() { + super(); + init(); + } + + public EmojiPopupWindow(Context context) { + super(context); + init(); + } + + public EmojiPopupWindow(int width, int height) { + super(width, height); + init(); + } + + public EmojiPopupWindow(View contentView) { + super(contentView); + init(); + } + + public EmojiPopupWindow(View contentView, int width, int height, boolean focusable) { + super(contentView, width, height, focusable); + init(); + } + + public EmojiPopupWindow(View contentView, int width, int height) { + super(contentView, width, height); + init(); + } + + private void init() { + if (superListenerField != null) { + try { + mSuperScrollListener = (ViewTreeObserver.OnScrollChangedListener) superListenerField.get(this); + superListenerField.set(this, NOP); + } catch (Exception e) { + mSuperScrollListener = null; + } + } + } + + private void unregisterListener() { + if (mSuperScrollListener != null && mViewTreeObserver != null) { + if (mViewTreeObserver.isAlive()) { + mViewTreeObserver.removeOnScrollChangedListener(mSuperScrollListener); + } + mViewTreeObserver = null; + } + } + + private void registerListener(View anchor) { + if (mSuperScrollListener != null) { + ViewTreeObserver vto = (anchor.getWindowToken() != null) ? anchor.getViewTreeObserver() : null; + if (vto != mViewTreeObserver) { + if (mViewTreeObserver != null && mViewTreeObserver.isAlive()) { + mViewTreeObserver.removeOnScrollChangedListener(mSuperScrollListener); + } + if ((mViewTreeObserver = vto) != null) { + vto.addOnScrollChangedListener(mSuperScrollListener); + } + } + } + } + + @Override + public void showAsDropDown(View anchor, int xoff, int yoff) { + try { + super.showAsDropDown(anchor, xoff, yoff); + registerListener(anchor); + } catch (Exception e) { + Log.e("tmessages", e); + } + } + + @Override + public void update(View anchor, int xoff, int yoff, int width, int height) { + super.update(anchor, xoff, yoff, width, height); + registerListener(anchor); + } + + @Override + public void update(View anchor, int width, int height) { + super.update(anchor, width, height); + registerListener(anchor); + } + + @Override + public void showAtLocation(View parent, int gravity, int x, int y) { + super.showAtLocation(parent, gravity, x, y); + unregisterListener(); + } + + @Override + public void dismiss() { + setFocusable(false); + try { + super.dismiss(); + } catch (Exception e) { + //don't promt + } + unregisterListener(); + } + } + + private class EmojiColorPickerView extends View { + + private Drawable backgroundDrawable; + private Drawable arrowDrawable; + private String currentEmoji; + private int arrowX; + private int selection; + private Paint rectPaint = new Paint(Paint.ANTI_ALIAS_FLAG); + private RectF rect = new RectF(); + + public void setEmoji(String emoji, int arrowPosition) { + currentEmoji = emoji; + arrowX = arrowPosition; + rectPaint.setColor(0x2f000000); + invalidate(); + } + + public String getEmoji() { + return currentEmoji; + } + + public void setSelection(int position) { + if (selection == position) { + return; + } + selection = position; + invalidate(); + } + + public int getSelection() { + return selection; + } + + public EmojiColorPickerView(Context context) { + super(context); + + backgroundDrawable = getResources().getDrawable(R.drawable.stickers_back_all); + arrowDrawable = getResources().getDrawable(R.drawable.stickers_back_arrow); + } + + @Override + protected void onDraw(Canvas canvas) { + backgroundDrawable.setBounds(0, 0, getMeasuredWidth(), Screen.dp(AndroidUtils.isTablet() ? 60 : 52)); + backgroundDrawable.draw(canvas); + + arrowDrawable.setBounds(arrowX - Screen.dp(9), Screen.dp(AndroidUtils.isTablet() ? 55.5f : 47.5f), arrowX + Screen.dp(9), Screen.dp((AndroidUtils.isTablet() ? 55.5f : 47.5f) + 8)); + arrowDrawable.draw(canvas); + + if (currentEmoji != null) { + String code; + for (int a = 0; a < 6; a++) { + int x = emojiSize * a + Screen.dp(5 + 4 * a); + int y = Screen.dp(9); + if (selection == a) { + rect.set(x, y - (int) Screen.dpf2(3.5f), x + emojiSize, y + emojiSize + Screen.dp(3)); + canvas.drawRoundRect(rect, Screen.dp(4), Screen.dp(4), rectPaint); + } + code = currentEmoji; + if (a != 0) { + String color; + switch (a) { + case 1: + color = "\uD83C\uDFFB"; + break; + case 2: + color = "\uD83C\uDFFC"; + break; + case 3: + color = "\uD83C\uDFFD"; + break; + case 4: + color = "\uD83C\uDFFE"; + break; + case 5: + color = "\uD83C\uDFFF"; + break; + default: + color = ""; + } + code = addColorToCode(code, color); + } + Drawable drawable = Emoji.getEmojiBigDrawable(code); + if (drawable != null) { + drawable.setBounds(x, y, x + emojiSize, y + emojiSize); + drawable.draw(canvas); + } + } + } + } + } + + private ArrayList adapters = new ArrayList<>(); + private HashMap emojiUseHistory = new HashMap<>(); + private static HashMap emojiColor = new HashMap<>(); + private ArrayList recentEmoji = new ArrayList<>(); + + private Drawable dotDrawable; + + private int[] icons = { + R.drawable.ic_emoji_recent, + R.drawable.ic_emoji_smile, + R.drawable.ic_emoji_flower, + R.drawable.ic_emoji_bell, + R.drawable.ic_emoji_car, + R.drawable.ic_emoji_symbol, + R.drawable.ic_smiles2_stickers}; + + private Listener listener; + private ViewPager pager; + + + private LinearLayout stickersWrap; + private LinearLayout stickerIndicatorContainer; + private LinearLayout stickerSwitchContainer; + private StickersView stickersView; + + private ArrayList views = new ArrayList<>(); + private ArrayList emojiGrids = new ArrayList<>(); + private ImageView backspaceButton; + private LinearLayout emojiTab; + + private PagerSlidingTabStrip pagerSlidingTabStrip; + + private int currentPage; + + private EmojiColorPickerView pickerView; + private EmojiPopupWindow pickerViewPopup; + private int popupWidth; + private int popupHeight; + private int emojiSize; + private int location[] = new int[2]; + + + private boolean isLayout; + private int currentBackgroundType = -1; + private Object outlineProvider; + + private int oldWidth; + private int lastNotifyWidth; + + private boolean backspacePressed; + private boolean backspaceOnce; + + private int minusDy; + + public EmojiView(boolean needStickers, final Context context) { + super(context); + + + dotDrawable = context.getResources().getDrawable(R.drawable.bluecircle); + + if (Build.VERSION.SDK_INT >= 21) { + outlineProvider = new ViewOutlineProvider() { + @TargetApi(Build.VERSION_CODES.LOLLIPOP) + @Override + public void getOutline(View view, Outline outline) { + outline.setRoundRect(view.getPaddingLeft(), view.getPaddingTop(), view.getMeasuredWidth() - view.getPaddingRight(), view.getMeasuredHeight() - view.getPaddingBottom(), Screen.dp(6)); + } + }; + } + + for (int i = 0; i < EmojiData.dataColored.length + 1; i++) { + GridView gridView = new GridView(context); + if (AndroidUtils.isTablet()) { + gridView.setColumnWidth(Screen.dp(60)); + } else { + gridView.setColumnWidth(Screen.dp(45)); + } + gridView.setNumColumns(-1); + EmojiGridAdapter emojiGridAdapter = new EmojiGridAdapter(i - 1); + AndroidUtils.setListViewEdgeEffectColor(gridView, 0xfff5f6f7); + gridView.setAdapter(emojiGridAdapter); + adapters.add(emojiGridAdapter); + emojiGrids.add(gridView); + FrameLayout frameLayout = new FrameLayout(context); + frameLayout.addView(gridView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.TOP | Gravity.LEFT, 0, 48, 0, 0)); + + views.add(frameLayout); + } + + if(needStickers){ + + stickerIndicatorContainer = new LinearLayout(context); + stickerIndicatorContainer.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, Screen.dp(48))); + stickerIndicatorContainer.setOrientation(LinearLayout.HORIZONTAL); + stickerIndicatorContainer.setId(R.id.sticker_indicator_container); + + ImageView backToSmiles = new ImageView(context); + backToSmiles.setId(R.id.back_to_smiles); + backToSmiles.setPadding(Screen.dp(8),Screen.dp(8),Screen.dp(8),Screen.dp(8)); + backToSmiles.setLayoutParams(new ViewGroup.LayoutParams(Screen.dp(48), Screen.dp(48))); + backToSmiles.setImageResource(R.drawable.ic_smiles_smile); + + backToSmiles.setOnClickListener(new OnClickListener() { + @Override + public void onClick(View v) { + pager.setCurrentItem(0); + } + }); + + stickerIndicatorContainer.addView(backToSmiles); + stickerSwitchContainer = new LinearLayout(getContext()); + stickerSwitchContainer.setId(R.id.sticker_switch_container); + stickerSwitchContainer.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.MATCH_PARENT)); + + stickerIndicatorContainer.addView(stickerSwitchContainer); + + stickersWrap = new LinearLayout(getContext()); + stickersWrap.setOrientation(LinearLayout.VERTICAL); + stickersWrap.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)); + + stickersWrap.addView(stickerIndicatorContainer); + + StickersView stickersView = new StickersView(getContext(), this); + +// ViewGroup.MarginLayoutParams marginLayoutParams = +// new ViewGroup.MarginLayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT); +// +// marginLayoutParams.setMargins(0, Screen.dp(48), 0, 0); + + stickersWrap.addView(stickersView); + + views.add(stickersWrap); + } + + + pager = new ViewPager(context) { + @Override + public boolean onInterceptTouchEvent(MotionEvent ev) { + if (getParent() != null) { + getParent().requestDisallowInterceptTouchEvent(true); + } + return super.onInterceptTouchEvent(ev); + } + }; + pager.setAdapter(new EmojiPagesAdapter()); + + emojiTab = new LinearLayout(context) { + @Override + public boolean onInterceptTouchEvent(MotionEvent ev) { + if (getParent() != null) { + getParent().requestDisallowInterceptTouchEvent(true); + } + return super.onInterceptTouchEvent(ev); + } + }; + emojiTab.setOrientation(LinearLayout.HORIZONTAL); + addView(emojiTab, LayoutHelper.createFrame(LayoutParams.MATCH_PARENT, 48)); + + pagerSlidingTabStrip = new PagerSlidingTabStrip(context); + pagerSlidingTabStrip.setViewPager(pager); + pagerSlidingTabStrip.setShouldExpand(true); + pagerSlidingTabStrip.setIndicatorHeight(Screen.dp(2)); + pagerSlidingTabStrip.setUnderlineHeight(Screen.dp(1)); + pagerSlidingTabStrip.setIndicatorColor(0xff2b96e2); + pagerSlidingTabStrip.setUnderlineColor(0xffe2e5e7); + emojiTab.addView(pagerSlidingTabStrip, LayoutHelper.createLinear(0, 48, 1.0f)); + pagerSlidingTabStrip.setOnPageChangeListener(new ViewPager.OnPageChangeListener() { + @Override + public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { + EmojiView.this.onPageScrolled(position, getMeasuredWidth() - getPaddingLeft() - getPaddingRight(), positionOffsetPixels); + } + + @Override + public void onPageSelected(int position) { + saveNewPage(); + } + + @Override + public void onPageScrollStateChanged(int state) { + + } + }); + + FrameLayout frameLayout = new FrameLayout(context); + emojiTab.addView(frameLayout, LayoutHelper.createLinear(52, 48)); + + backspaceButton = new ImageView(context) { + @Override + public boolean onTouchEvent(MotionEvent event) { + if (event.getAction() == MotionEvent.ACTION_DOWN) { + backspacePressed = true; + backspaceOnce = false; + postBackspaceRunnable(350); + } else if (event.getAction() == MotionEvent.ACTION_CANCEL || event.getAction() == MotionEvent.ACTION_UP) { + backspacePressed = false; + if (!backspaceOnce) { + if (listener != null && listener.onBackspace()) { + backspaceButton.performHapticFeedback(HapticFeedbackConstants.KEYBOARD_TAP); + } + } + } + super.onTouchEvent(event); + return true; + } + }; + backspaceButton.setImageResource(R.drawable.ic_smiles_backspace); + backspaceButton.setBackgroundResource(R.drawable.ic_emoji_backspace); + backspaceButton.setScaleType(ImageView.ScaleType.CENTER); + frameLayout.addView(backspaceButton, LayoutHelper.createFrame(52, 48)); + + View view = new View(context); + view.setBackgroundColor(0xffe2e5e7); + frameLayout.addView(view, LayoutHelper.createFrame(52, 1, Gravity.LEFT | Gravity.BOTTOM)); + + TextView textView = new TextView(context); + textView.setText("Nada de recente"); + textView.setTextSize(18); + textView.setTextColor(0xff888888); + textView.setGravity(Gravity.CENTER); + textView.setClickable(false); + textView.setFocusable(false); + ((FrameLayout) views.get(0)).addView(textView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.CENTER, 0, 48, 0, 0)); + emojiGrids.get(0).setEmptyView(textView); + + addView(pager, 0, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.LEFT | Gravity.TOP)); + + emojiSize = Screen.dp(AndroidUtils.isTablet() ? 40 : 32); + pickerView = new EmojiColorPickerView(context); + pickerViewPopup = new EmojiPopupWindow(pickerView, popupWidth = Screen.dp((AndroidUtils.isTablet() ? 40 : 32) * 6 + 10 + 4 * 5), popupHeight = Screen.dp(AndroidUtils.isTablet() ? 64 : 56)); + pickerViewPopup.setOutsideTouchable(true); + pickerViewPopup.setClippingEnabled(true); + pickerViewPopup.setInputMethodMode(EmojiPopupWindow.INPUT_METHOD_NOT_NEEDED); + pickerViewPopup.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_UNSPECIFIED); + pickerViewPopup.getContentView().setFocusableInTouchMode(true); + pickerViewPopup.getContentView().setOnKeyListener(new OnKeyListener() { + @Override + public boolean onKey(View v, int keyCode, KeyEvent event) { + if (keyCode == KeyEvent.KEYCODE_MENU && event.getRepeatCount() == 0 && event.getAction() == KeyEvent.ACTION_UP && pickerViewPopup != null && pickerViewPopup.isShowing()) { + pickerViewPopup.dismiss(); + return true; + } + return false; + } + }); + currentPage = getContext().getSharedPreferences("emoji", Activity.MODE_PRIVATE).getInt("selected_page", 0); + loadRecents(); + } + + + private void saveNewPage() { + int newPage; + if (pager.getCurrentItem() == 6) { + newPage = 1; + } else { + newPage = 0; + } + if (currentPage != newPage) { + currentPage = newPage; + getContext().getSharedPreferences("emoji", Activity.MODE_PRIVATE).edit().putInt("selected_page", newPage).commit(); + } + } + + public void clearRecentEmoji() { + SharedPreferences preferences = getContext().getSharedPreferences("emoji", Activity.MODE_PRIVATE); + preferences.edit().putBoolean("filled_default", true).commit(); + emojiUseHistory.clear(); + recentEmoji.clear(); + saveRecentEmoji(); + adapters.get(0).notifyDataSetChanged(); + } + + + private void onPageScrolled(int position, int width, int positionOffsetPixels) { + if (width == 0) { + width = Screen.displaySize.x; + } + + int margin = 0; + if (position == 5) { + margin = -positionOffsetPixels; + } else if (position == 6) { + margin = -width; + } + + if (emojiTab.getTranslationX() != margin) { + emojiTab.setTranslationX(margin); + } + } + + private void postBackspaceRunnable(final int time) { + AndroidUtils.runOnUIThread(new Runnable() { + @Override + public void run() { + if (!backspacePressed) { + return; + } + if (listener != null && listener.onBackspace()) { + backspaceButton.performHapticFeedback(HapticFeedbackConstants.KEYBOARD_TAP); + } + backspaceOnce = true; + postBackspaceRunnable(Math.max(50, time - 100)); + } + }, time); + } + + private String convert(long paramLong) { + String str = ""; + for (int i = 0; ; i++) { + if (i >= 4) { + return str; + } + int j = (int) (0xFFFF & paramLong >> 16 * (3 - i)); + if (j != 0) { + str = str + (char) j; + } + } + } + + private void saveRecentEmoji() { + SharedPreferences preferences = getContext().getSharedPreferences("emoji", Activity.MODE_PRIVATE); + StringBuilder stringBuilder = new StringBuilder(); + for (HashMap.Entry entry : emojiUseHistory.entrySet()) { + if (stringBuilder.length() != 0) { + stringBuilder.append(","); + } + stringBuilder.append(entry.getKey()); + stringBuilder.append("="); + stringBuilder.append(entry.getValue()); + } + preferences.edit().putString("emojis2", stringBuilder.toString()).commit(); + } + + private void saveEmojiColors() { + SharedPreferences preferences = getContext().getSharedPreferences("emoji", Activity.MODE_PRIVATE); + StringBuilder stringBuilder = new StringBuilder(); + for (HashMap.Entry entry : emojiColor.entrySet()) { + if (stringBuilder.length() != 0) { + stringBuilder.append(","); + } + stringBuilder.append(entry.getKey()); + stringBuilder.append("="); + stringBuilder.append(entry.getValue()); + } + preferences.edit().putString("color", stringBuilder.toString()).commit(); + } + + + + private void sortEmoji() { + recentEmoji.clear(); + for (HashMap.Entry entry : emojiUseHistory.entrySet()) { + recentEmoji.add(entry.getKey()); + } + Collections.sort(recentEmoji, new Comparator() { + @Override + public int compare(String lhs, String rhs) { + Integer count1 = emojiUseHistory.get(lhs); + Integer count2 = emojiUseHistory.get(rhs); + if (count1 == null) { + count1 = 0; + } + if (count2 == null) { + count2 = 0; + } + if (count1 > count2) { + return -1; + } else if (count1 < count2) { + return 1; + } + return 0; + } + }); + while (recentEmoji.size() > 50) { + recentEmoji.remove(recentEmoji.size() - 1); + } + } + + + + public void loadRecents() { + SharedPreferences preferences = getContext().getSharedPreferences("emoji", Activity.MODE_PRIVATE); + + String str; + try { + emojiUseHistory.clear(); + if (preferences.contains("emojis")) { + str = preferences.getString("emojis", ""); + if (str != null && str.length() > 0) { + String[] args = str.split(","); + for (String arg : args) { + String[] args2 = arg.split("="); + long value = Utilities.parseLong(args2[0]); + String string = ""; + for (int a = 0; a < 4; a++) { + char ch = (char) value; + string = String.valueOf(ch) + string; + value >>= 16; + if (value == 0) { + break; + } + } + if (string.length() > 0) { + emojiUseHistory.put(string, Utilities.parseInt(args2[1])); + } + } + } + preferences.edit().remove("emojis").commit(); + saveRecentEmoji(); + } else { + str = preferences.getString("emojis2", ""); + if (str != null && str.length() > 0) { + String[] args = str.split(","); + for (String arg : args) { + String[] args2 = arg.split("="); + emojiUseHistory.put(args2[0], Utilities.parseInt(args2[1])); + } + } + } + if (emojiUseHistory.isEmpty()) { + if (!preferences.getBoolean("filled_default", false)) { + String[] newRecent = new String[]{ + "\uD83D\uDE02", "\uD83D\uDE18", "\u2764", "\uD83D\uDE0D", "\uD83D\uDE0A", "\uD83D\uDE01", + "\uD83D\uDC4D", "\u263A", "\uD83D\uDE14", "\uD83D\uDE04", "\uD83D\uDE2D", "\uD83D\uDC8B", + "\uD83D\uDE12", "\uD83D\uDE33", "\uD83D\uDE1C", "\uD83D\uDE48", "\uD83D\uDE09", "\uD83D\uDE03", + "\uD83D\uDE22", "\uD83D\uDE1D", "\uD83D\uDE31", "\uD83D\uDE21", "\uD83D\uDE0F", "\uD83D\uDE1E", + "\uD83D\uDE05", "\uD83D\uDE1A", "\uD83D\uDE4A", "\uD83D\uDE0C", "\uD83D\uDE00", "\uD83D\uDE0B", + "\uD83D\uDE06", "\uD83D\uDC4C", "\uD83D\uDE10", "\uD83D\uDE15"}; + for (int i = 0; i < newRecent.length; i++) { + emojiUseHistory.put(newRecent[i], newRecent.length - i); + } + preferences.edit().putBoolean("filled_default", true).commit(); + saveRecentEmoji(); + } + } + sortEmoji(); + adapters.get(0).notifyDataSetChanged(); + } catch (Exception e) { + Log.e(TAG, e); + } + + try { + str = preferences.getString("color", ""); + if (str != null && str.length() > 0) { + String[] args = str.split(","); + for (int a = 0; a < args.length; a++) { + String arg = args[a]; + String[] args2 = arg.split("="); + emojiColor.put(args2[0], args2[1]); + } + } + } catch (Exception e) { + Log.e(TAG, e); + } + } + + @Override + public void requestLayout() { + if (isLayout) { + return; + } + super.requestLayout(); + } + + @Override + public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { + isLayout = true; + + if (currentBackgroundType != 0) { + if (Build.VERSION.SDK_INT >= 21) { + setOutlineProvider(null); + setClipToOutline(false); + setElevation(0); + } + setBackgroundColor(0xfff5f6f7); + emojiTab.setBackgroundColor(0xfff5f6f7); + currentBackgroundType = 0; + } + + + FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) emojiTab.getLayoutParams(); + FrameLayout.LayoutParams layoutParams1 = null; + layoutParams.width = View.MeasureSpec.getSize(widthMeasureSpec); + + if (layoutParams.width != oldWidth) { + if (layoutParams1 != null) { + onPageScrolled(pager.getCurrentItem(), layoutParams.width - getPaddingLeft() - getPaddingRight(), 0); + } + emojiTab.setLayoutParams(layoutParams); + oldWidth = layoutParams.width; + } + super.onMeasure(View.MeasureSpec.makeMeasureSpec(layoutParams.width, MeasureSpec.EXACTLY), View.MeasureSpec.makeMeasureSpec(View.MeasureSpec.getSize(heightMeasureSpec), MeasureSpec.EXACTLY)); + isLayout = false; + } + + @Override + protected void onLayout(boolean changed, int left, int top, int right, int bottom) { + if (lastNotifyWidth != right - left) { + lastNotifyWidth = right - left; + } + super.onLayout(changed, left, top, right, bottom); + } + + public void setListener(Listener value) { + listener = value; + } + + public void invalidateViews() { + for (int a = 0; a < emojiGrids.size(); a++) { + emojiGrids.get(a).invalidateViews(); + } + } + + public void onOpen(boolean forceEmoji) { + + } + + @Override + protected void onAttachedToWindow() { + super.onAttachedToWindow(); + } + + @Override + public void setVisibility(int visibility) { + super.setVisibility(visibility); + if (visibility != GONE) { + sortEmoji(); + adapters.get(0).notifyDataSetChanged(); + } + } + + public int getCurrentPage() { + return currentPage; + } + + public void onDestroy() { + } + + @Override + protected void onDetachedFromWindow() { + super.onDetachedFromWindow(); + if (pickerViewPopup != null && pickerViewPopup.isShowing()) { + pickerViewPopup.dismiss(); + } + } + + private class EmojiGridAdapter extends BaseAdapter { + + private int emojiPage; + + public EmojiGridAdapter(int page) { + emojiPage = page; + } + + @Override + public Object getItem(int position) { + return null; + } + + @Override + public int getCount() { + if (emojiPage == -1) { + return recentEmoji.size(); + } + return EmojiData.dataColored[emojiPage].length; + } + + @Override + public long getItemId(int position) { + return position; + } + + @Override + public View getView(int position, View view, ViewGroup paramViewGroup) { + ImageViewEmoji imageView = (ImageViewEmoji) view; + if (imageView == null) { + imageView = new ImageViewEmoji(getContext()); + } + String code; + String coloredCode; + if (emojiPage == -1) { + coloredCode = code = recentEmoji.get(position); + } else { + coloredCode = code = EmojiData.dataColored[emojiPage][position]; + String color = emojiColor.get(code); + if (color != null) { + coloredCode = addColorToCode(coloredCode, color); + } + } + imageView.setImageDrawable(Emoji.getEmojiBigDrawable(coloredCode)); + imageView.setTag(code); + return imageView; + } + + @Override + public void unregisterDataSetObserver(DataSetObserver observer) { + if (observer != null) { + super.unregisterDataSetObserver(observer); + } + } + } + + public void onStickerClicked(Sticker sticker) { + this.listener.onStickerSelected(sticker); + } + + public LinearLayout getStickerSwitchContainer() { + return stickerSwitchContainer; + } + + private class EmojiPagesAdapter extends PagerAdapter implements PagerSlidingTabStrip.IconTabProvider { + + public void destroyItem(ViewGroup viewGroup, int position, Object object) { + View view; + if (position == 6) { + view = stickersWrap; + } else { + view = views.get(position); + } + viewGroup.removeView(view); + } + + public int getCount() { + return views.size(); + } + + public int getPageIconResId(int paramInt) { + return icons[paramInt]; + } + + @Override + public void customOnDraw(Canvas canvas, int position) { + if (position == 6 && dotDrawable != null) { + int x = canvas.getWidth() / 2 + Screen.dp(4); + int y = canvas.getHeight() / 2 - Screen.dp(13); + dotDrawable.setBounds(x, y, x + dotDrawable.getIntrinsicWidth(), y + dotDrawable.getIntrinsicHeight()); + dotDrawable.draw(canvas); + } + } + + public Object instantiateItem(ViewGroup viewGroup, int position) { + View view; + if (position == 6) { + view = stickersWrap; + } else { + view = views.get(position); + } + viewGroup.addView(view); + return view; + } + + public boolean isViewFromObject(View view, Object object) { + return view == object; + } + + @Override + public void unregisterDataSetObserver(DataSetObserver observer) { + if (observer != null) { + super.unregisterDataSetObserver(observer); + } + } + } + + private class Holder extends RecyclerView.ViewHolder { + public Holder(View itemView) { + super(itemView); + } + } + +} diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/keyboard/emoji/smiles/OnBackspaceClickListener.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/keyboard/emoji/smiles/OnBackspaceClickListener.java deleted file mode 100644 index 2c871dab3f..0000000000 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/keyboard/emoji/smiles/OnBackspaceClickListener.java +++ /dev/null @@ -1,10 +0,0 @@ -package im.actor.sdk.view.emoji.keyboard.emoji.smiles; - -import android.view.View; - -/** - * Created by Jesus Christ. Amen. - */ -public interface OnBackspaceClickListener { - void onBackspaceClick(View v); -} diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/keyboard/emoji/smiles/OnRecentChangeListener.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/keyboard/emoji/smiles/OnRecentChangeListener.java deleted file mode 100644 index 3a232f47c6..0000000000 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/keyboard/emoji/smiles/OnRecentChangeListener.java +++ /dev/null @@ -1,8 +0,0 @@ -package im.actor.sdk.view.emoji.keyboard.emoji.smiles; - -/** - * Created by Jesus Christ. Amen. - */ -public interface OnRecentChangeListener { - void onRecentChange(); -} diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/keyboard/emoji/smiles/OnSmileClickListener.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/keyboard/emoji/smiles/OnSmileClickListener.java deleted file mode 100644 index be92adf76a..0000000000 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/keyboard/emoji/smiles/OnSmileClickListener.java +++ /dev/null @@ -1,8 +0,0 @@ -package im.actor.sdk.view.emoji.keyboard.emoji.smiles; - -/** -* Created by Jesus Christ. Amen. -*/ -public interface OnSmileClickListener { - public void onEmojiClicked(String smile); -} \ No newline at end of file diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/keyboard/emoji/smiles/RepeatListener.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/keyboard/emoji/smiles/RepeatListener.java deleted file mode 100644 index 67a5161226..0000000000 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/keyboard/emoji/smiles/RepeatListener.java +++ /dev/null @@ -1,62 +0,0 @@ -package im.actor.sdk.view.emoji.keyboard.emoji.smiles; - -import android.os.Handler; -import android.os.SystemClock; -import android.view.MotionEvent; -import android.view.View; - -/** -* Created by Jesus Christ. Amen. -*/ -public class RepeatListener implements View.OnTouchListener { - - private Handler handler = new Handler(); - - private int initialInterval; - private final int normalInterval; - private final View.OnClickListener clickListener; - - private Runnable handlerRunnable = new Runnable() { - @Override - public void run() { - if (downView == null) { - return; - } - handler.removeCallbacksAndMessages(downView); - handler.postAtTime(this, downView, SystemClock.uptimeMillis() + normalInterval); - clickListener.onClick(downView); - } - }; - - private View downView; - - - public RepeatListener(int initialInterval, int normalInterval, View.OnClickListener clickListener) { - if (clickListener == null) - throw new IllegalArgumentException("null runnable"); - if (initialInterval < 0 || normalInterval < 0) - throw new IllegalArgumentException("negative interval"); - - this.initialInterval = initialInterval; - this.normalInterval = normalInterval; - this.clickListener = clickListener; - } - - public boolean onTouch(View view, MotionEvent motionEvent) { - switch (motionEvent.getAction()) { - case MotionEvent.ACTION_DOWN: - downView = view; - handler.removeCallbacks(handlerRunnable); - handler.postAtTime(handlerRunnable, downView, SystemClock.uptimeMillis() + initialInterval); - clickListener.onClick(view); - return true; - case MotionEvent.ACTION_UP: - case MotionEvent.ACTION_CANCEL: - case MotionEvent.ACTION_OUTSIDE: - handler.removeCallbacksAndMessages(downView); - downView = null; - return true; - } - return false; - } -} diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/keyboard/emoji/smiles/SmilePagerAdapter.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/keyboard/emoji/smiles/SmilePagerAdapter.java deleted file mode 100644 index ae383901ec..0000000000 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/keyboard/emoji/smiles/SmilePagerAdapter.java +++ /dev/null @@ -1,209 +0,0 @@ -package im.actor.sdk.view.emoji.keyboard.emoji.smiles; - -import android.content.Context; -import android.support.v4.view.PagerAdapter; -import android.view.Gravity; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.widget.FrameLayout; -import android.widget.ImageButton; - -import java.util.ArrayList; -import java.util.Arrays; - -import im.actor.runtime.mvvm.MVVMCollection; -import im.actor.sdk.R; -import im.actor.sdk.controllers.activity.BaseActivity; -import im.actor.sdk.view.emoji.SmileProcessor; -import im.actor.sdk.view.emoji.smiles.SmilesPack; -import im.actor.sdk.view.emoji.smiles.SmilesPackView; -import im.actor.sdk.view.emoji.keyboard.emoji.EmojiKeyboard; -import im.actor.sdk.util.Screen; -import im.actor.sdk.view.PagerSlidingTabStrip; -import im.actor.sdk.view.emoji.stickers.StickersView; - -import static im.actor.sdk.util.ActorSDKMessenger.messenger; - -/** -* Created by Jesus Christ. Amen. -*/ -public class SmilePagerAdapter extends PagerAdapter implements PagerSlidingTabStrip.TabProvider { - - private EmojiKeyboard emojiKeyboard; - private int count; - private PagerSlidingTabStrip tabs; - private StickersView stickersView; - - public SmilePagerAdapter(EmojiKeyboard emojiKeyboard) { - this.emojiKeyboard = emojiKeyboard; -// count = messenger().getOwnStickerPacks().getValuesMap().values().size(); -// if (emojiKeyboard.getActivity() instanceof BaseActivity) { -// messenger().getOwnStickerPacks().addCallback(new MVVMCollection.OnChangedListener() { -// @Override -// public void onChanged() { -// count = messenger().getOwnStickerPacks().getValuesMap().values().size(); -// if (tabs != null) { -// tabs.notifyDataSetChanged(); -// } -// notifyDataSetChanged(); -// } -// }); -// } - - } - - - @Override - public int getCount() { - return 6;//count > 0 ? 6 : 5; - } - - @Override - public Object instantiateItem(ViewGroup container, int position) { - View itemView; - if (position <= 4) { - - itemView = LayoutInflater.from(container.getContext()).inflate(R.layout.emoji_smiles_page, null); - ViewGroup emojicontainer = (ViewGroup) itemView.findViewById(R.id.emojiPackContainer); - View noEmojiTV = itemView.findViewById(R.id.text); - - ArrayList emojiPack = new ArrayList(); - switch (position) { - case 0: - emojiPack = SmilesPack.getRecent(); - break; - case 1: - emojiPack = new ArrayList(Arrays.asList(SmilesPack.STANDART)); - break; - case 2: - emojiPack = new ArrayList(Arrays.asList(SmilesPack.NATURE)); - break; - case 3: - emojiPack = new ArrayList(Arrays.asList(SmilesPack.TRANSPORT)); - break; - case 4: - emojiPack = new ArrayList(Arrays.asList(SmilesPack.UNSORTED)); - break; - - } - - int emojisMaxRowCount = 8; - int emojiSize = Screen.dp(45); - int emojiPadding = emojiSize / 5; - if (Screen.getWidth() / emojiSize < emojisMaxRowCount) { - emojisMaxRowCount = Screen.getWidth() / emojiSize; - } - final SmilesPackView smilesPackView = new SmilesPackView(container.getContext(), SmileProcessor.emoji(), emojiPack, emojisMaxRowCount, emojiSize, emojiPadding); - FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); - params.gravity = Gravity.CENTER; - emojicontainer.addView(smilesPackView, params); - if (!SmileProcessor.emoji().isLoaded()) { - SmileProcessor.emoji().registerListener(new SmilesListener() { - @Override - public void onSmilesUpdated(boolean completed) { - smilesPackView.update(); - SmileProcessor.emoji().unregisterListener(this); - } - }); - } - if (emojiPack.size() == 0) { - noEmojiTV.setVisibility(View.VISIBLE); - } else { - noEmojiTV.setVisibility(View.GONE); - } - // is this necessary? - /*if(position==0){ - getSmileProcessor().setRecentUpdateListener(new SmilesRecentListener() { - @Override - public void onSmilesUpdated() { - smilesPackView.update(); - } - }); - }*/ - smilesPackView.setOnSmileClickListener(new OnSmileClickListener() { - @Override - public void onEmojiClicked(String smile) { - emojiKeyboard.onEmojiClicked(smile); - } - }); - SmilesPack.setOnRecentChangeListener(new OnRecentChangeListener() { - - @Override - public void onRecentChange() { - smilesPackView.update(); - } - }); - - } else { - if (stickersView == null) { - stickersView = new StickersView(container.getContext(), emojiKeyboard); - } - itemView = stickersView; - } - container.addView(itemView, 0); - return itemView; - } - - @Override - public void destroyItem(ViewGroup container, int position, Object view) { - container.removeView((View) view); - } - - @Override - public boolean isViewFromObject(View view, Object key) { - return key == view; - } - - @Override - public View getTab(int position, Context context) { - - ImageButton tabView = new ImageButton(context); - //if(position==0){ - int icon; - switch (position) { - case 0: - icon = R.drawable.ic_smiles_recent; - break; - case 1: - icon = R.drawable.ic_smiles_smile; - break; - case 2: - icon = R.drawable.ic_smiles_bell;//R.drawable.ic_smiles_flower; - break; - /*case 3: - icon = R.drawable.ic_smiles_bell; - break;*/ - case 3://4: - icon = R.drawable.ic_smiles_car; - break; - case 4://5: - icon = R.drawable.ic_smiles_grid; - break; - case 5: - icon = R.drawable.ic_smiles_sticker; - break; - default: - icon = R.drawable.ic_smiles_smile; - } - tabView.setImageResource(icon); - /*//} else{ - *//*tabView.setScaleType(ImageView.ScaleType.CENTER_INSIDE); - tabView.setAdjustViewBounds(true); - //tabView.setCropToPadding(false); - StickerPack pack = Stickers.getPacks()[position - 1]; - tabView.setImageURI(Uri.parse(Stickers.getFile(pack.getId(), pack.getLogoStickerId())));*//* - //}*/ - return tabView; - } - - public void setTabs(PagerSlidingTabStrip tabs) { - this.tabs = tabs; - } - - public void release() { - if (stickersView != null) { - stickersView.relesase(); - } - } -} \ No newline at end of file diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/smiles/SmilesPack.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/smiles/SmilesPack.java deleted file mode 100644 index 1b9371007f..0000000000 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/smiles/SmilesPack.java +++ /dev/null @@ -1,1117 +0,0 @@ -/* - * Copyright (C) 2015 Actor LLC. - */ - -package im.actor.sdk.view.emoji.smiles; - -import java.util.ArrayList; - -import im.actor.sdk.view.emoji.keyboard.emoji.smiles.OnRecentChangeListener; - -public class SmilesPack { - public static final Long[] STANDART = new Long[] - { - 0xD83DDE0AL, - 0xD83DDE03L, - 0xD83DDE09L, - 0xD83DDE06L, - 0xD83DDE1CL, - 0xD83DDE0BL, - 0xD83DDE0DL, - 0xD83DDE0EL, - 0xD83DDE12L, - 0xD83DDE0FL, - 0xD83DDE14L, - 0xD83DDE22L, - 0xD83DDE2DL, - 0xD83DDE29L, - 0xD83DDE28L, - 0xD83DDE10L, - 0xD83DDE0CL, - 0xD83DDE04L, - 0xD83DDE07L, - 0xD83DDE30L, - 0xD83DDE32L, - 0xD83DDE33L, - 0xD83DDE37L, - 0xD83DDE02L, - 0x2764L, - 0xD83DDE1AL, - 0xD83DDE15L, - 0xD83DDE2FL, - 0xD83DDE26L, - 0xD83DDE35L, - 0xD83DDE20L, - 0xD83DDE21L, - 0xD83DDE1DL, - 0xD83DDE34L, - 0xD83DDE18L, - 0xD83DDE1FL, - 0xD83DDE2CL, - 0xD83DDE36L, - 0xD83DDE2AL, - 0xD83DDE2BL, - 0x263AL, - 0xD83DDE00L, - 0xD83DDE25L, - 0xD83DDE1BL, - 0xD83DDE16L, - 0xD83DDE24L, - 0xD83DDE23L, - 0xD83DDE27L, - 0xD83DDE11L, - 0xD83DDE05L, - 0xD83DDE2EL, - 0xD83DDE1EL, - 0xD83DDE19L, - 0xD83DDE13L, - 0xD83DDE01L, - 0xD83DDE31L, - 0xD83DDE08L, - 0xD83DDC7FL, - 0xD83DDC7DL, - 0xD83DDC4DL, - 0xD83DDC4EL, - 0x261DL, - 0x270CL, - 0xD83DDC4CL, - 0xD83DDC4FL, - 0xD83DDC4AL, - 0x270BL, - 0xD83DDE4FL, - 0xD83DDC43L, - 0xD83DDC46L, - 0xD83DDC47L, - 0xD83DDC48L, - 0xD83DDCAAL, - 0xD83DDC42L, - }; - - public static final Long[] TRANSPORT = new Long[] - { - 0xD83DDCA1L, - 0xD83DDCA3L, - 0xD83DDCA5L, - 0xD83DDCA7L, - 0xD83DDCA8L, - 0xD83DDCACL, - 0xD83DDCB0L, - 0xD83DDCB3L, - 0xD83DDCB4L, - 0xD83DDCB5L, - 0xD83DDCB6L, - 0xD83DDCB7L, - 0xD83DDCB8L, - 0xD83DDCBAL, - 0xD83DDCBBL, - 0xD83DDCBCL, - 0xD83DDCBDL, - 0xD83DDCBEL, - 0xD83DDCBFL, - 0xD83DDCC0L, - 0xD83DDCC4L, - 0xD83DDCC5L, - 0xD83DDCC7L, - 0xD83DDCC8L, - 0xD83DDCC9L, - 0xD83DDCCAL, - 0xD83DDCCBL, - 0xD83DDCCCL, - 0xD83DDCCDL, - 0xD83DDCCEL, - 0xD83DDCD0L, - 0xD83DDCD1L, - 0xD83DDCD2L, - 0xD83DDCD3L, - 0xD83DDCD4L, - 0xD83DDCD5L, - 0xD83DDCD6L, - 0xD83DDCD7L, - 0xD83DDCD8L, - 0xD83DDCD9L, - 0xD83DDCDAL, - 0xD83DDCDCL, - 0xD83DDCDDL, - 0xD83DDCDFL, - 0xD83DDCE0L, - 0xD83DDCE1L, - 0xD83DDCE2L, - 0xD83DDCE6L, - 0xD83DDCEDL, - 0xD83DDCEEL, - 0xD83DDCEFL, - 0xD83DDCF0L, - 0xD83DDCF1L, - 0xD83DDCF7L, - 0xD83DDCF9L, - 0xD83DDCFAL, - 0xD83DDCFBL, - 0xD83DDCFCL, - 0xD83DDD06L, - 0xD83DDD0EL, - 0xD83DDD11L, - 0xD83DDD14L, - 0xD83DDD16L, - 0xD83DDD25L, - 0xD83DDD26L, - 0xD83DDD27L, - 0xD83DDD28L, - 0xD83DDD29L, - 0xD83DDD2AL, - 0xD83DDD2BL, - 0xD83DDD2CL, - 0xD83DDD2DL, - 0xD83DDD2EL, - 0xD83DDD31L, - 0xD83DDDFFL, - 0xD83DDE80L, - 0xD83DDE81L, - 0xD83DDE82L, - 0xD83DDE83L, - 0xD83DDE84L, - 0xD83DDE85L, - 0xD83DDE86L, - 0xD83DDE87L, - 0xD83DDE88L, - 0xD83DDE8AL, - 0xD83DDE8CL, - 0xD83DDE8DL, - 0xD83DDE8EL, - 0xD83DDE8FL, - 0xD83DDE90L, - 0xD83DDE91L, - 0xD83DDE92L, - 0xD83DDE93L, - 0xD83DDE94L, - 0xD83DDE95L, - 0xD83DDE96L, - 0xD83DDE97L, - 0xD83DDE98L, - 0xD83DDE99L, - 0xD83DDE9AL, - 0xD83DDE9BL, - 0xD83DDE9CL, - 0xD83DDE9DL, - 0xD83DDE9EL, - 0xD83DDE9FL, - 0xD83DDEA0L, - 0xD83DDEA1L, - 0xD83DDEA3L, - 0xD83DDEA4L, - 0xD83DDEA7L, - 0xD83DDEA8L, - 0xD83DDEAAL, - 0xD83DDEACL, - 0xD83DDEB4L, - 0xD83DDEB5L, - 0xD83DDEB6L, - 0xD83DDEBDL, - 0xD83DDEBFL, - 0xD83DDEC0L, - 0xD83CDDE8D83CDDF3L, - 0xD83CDDE9D83CDDEAL, - 0xD83CDDEAD83CDDF8L, - 0xD83CDDEBD83CDDF7L, - 0xD83CDDECD83CDDE7L, - 0xD83CDDEED83CDDF9L, - 0xD83CDDEFD83CDDF5L, - 0xD83CDDF0D83CDDF7L, - 0xD83CDDF7D83CDDFAL, - 0xD83CDDFAD83CDDF8L - }; - - public static final Long[] NATURE = new Long[] - { - 0xD83DDC28L, - 0xD83DDC0EL, - 0xD83DDC0FL, - 0xD83DDC1CL, - 0xD83DDC2BL, - 0xD83DDC2EL, - 0xD83DDC03L, - 0xD83DDC3BL, - 0xD83DDC3CL, - 0xD83DDC05L, - 0xD83DDC13L, - 0xD83DDC18L, - 0xD83DDC36L, - 0xD83DDC31L, - 0xD83DDC37L, - 0xD83DDC11L, - 0x26C4L, - 0x2600L, - 0xD83CDF3AL, - 0xD83CDF3BL, - 0xD83CDF3CL, - 0xD83CDF3DL, - 0xD83CDF4BL, - 0xD83CDF4DL, - 0xD83CDF4EL, - 0xD83CDF4FL, - 0xD83CDF6DL, - 0xD83CDF37L, - 0xD83CDF38L, - 0xD83CDF46L, - 0xD83CDF49L, - 0xD83CDF50L, - 0xD83CDF51L, - 0xD83CDF53L, - 0xD83CDF54L, - 0xD83CDF55L, - 0xD83CDF56L, - 0xD83CDF57L, - 0xD83CDF69L, - 0xD83CDF83L, - 0xD83DDE3AL, - 0xD83DDE38L, - 0xD83DDE39L, - 0xD83DDE3CL, - 0xD83DDE3DL, - 0xD83DDE3EL, - 0xD83DDE3FL, - 0xD83DDE3BL, - 0xD83DDE40L, - 0xD83CDF0DL, - 0xD83CDF1BL, - 0xD83CDF1DL, - 0xD83CDF1EL, - 0xD83CDF30L, - 0xD83CDF31L, - 0xD83CDF32L, - 0xD83CDF33L, - 0xD83CDF34L, - 0xD83CDF35L, - 0xD83CDF3EL, - 0xD83CDF3FL, - 0xD83CDF40L, - 0xD83CDF41L, - 0xD83CDF42L, - 0xD83CDF43L, - 0xD83CDF44L, - 0xD83CDF47L, - 0xD83CDF48L, - 0xD83DDC00L, - 0xD83DDC01L, - 0xD83DDC02L, - 0xD83DDC04L, - 0xD83DDC06L, - 0xD83DDC07L, - 0xD83DDC08L, - 0xD83DDC09L, - 0xD83DDC0AL, - 0xD83DDC0BL, - 0xD83DDC0CL, - 0xD83DDC0DL, - 0xD83DDC10L, - 0xD83DDC12L, - 0xD83DDC14L, - 0xD83DDC15L, - 0xD83DDC16L, - 0xD83DDC17L, - 0xD83DDC19L, - 0xD83DDC1AL, - 0xD83DDC1BL, - 0xD83DDC1DL, - 0xD83DDC1EL, - 0xD83DDC1FL, - 0xD83DDC20L, - 0xD83DDC21L, - 0xD83DDC22L, - 0xD83DDC23L, - 0xD83DDC24L, - 0xD83DDC25L, - 0xD83DDC26L, - 0xD83DDC27L, - 0xD83DDC29L, - 0xD83DDC2AL, - 0xD83DDC2CL, - 0xD83DDC2DL, - 0xD83DDC2FL, - 0xD83DDC30L, - 0xD83DDC32L, - 0xD83DDC33L, - 0xD83DDC34L, - 0xD83DDC35L, - 0xD83DDC38L, - 0xD83DDC39L, - 0xD83DDC3AL, - 0xD83DDC3DL, - 0xD83DDC3EL, - 0xD83DDE48L, - 0xD83DDE49L, - 0xD83DDE4AL, - 0xD83CDF4AL, - 0x26C5L, - 0xD83CDF4CL, - 0xD83CDF39L, - 0xD83CDF45L, - 0xD83CDF52L, - 0xD83CDF84L, - }; - - public static final Long[] UNSORTED = new Long[] - { - 0xD83CDF5AL, - 0xD83CDF5BL, - 0xD83CDF5CL, - 0xD83CDF5DL, - 0xD83CDF5EL, - 0xD83CDF5FL, - 0xD83CDF60L, - 0xD83CDF61L, - 0xD83CDF62L, - 0xD83CDF63L, - 0xD83CDF64L, - 0xD83CDF65L, - 0xD83CDF66L, - 0xD83CDF67L, - 0xD83CDF68L, - 0xD83CDF6AL, - 0xD83CDF6BL, - 0xD83CDF6CL, - 0xD83CDF6EL, - 0xD83CDF6FL, - 0xD83CDF70L, - 0xD83CDF71L, - 0xD83CDF72L, - 0xD83CDF73L, - 0xD83CDF74L, - 0xD83CDF75L, - 0xD83CDF76L, - 0xD83CDF79L, - 0xD83CDF7CL, - 0xD83DDC8BL, - 0xD83DDCA9L, - 0x2744L, - 0xD83CDF77L, - 0xD83CDF78L, - 0xD83CDF85L, - 0xD83DDCA6L, - 0xD83DDC7AL, - 0xD83DDD1EL, - 0xD83DDC79L, - 0x26BDL, - 0xD83CDF1FL, - 0xD83CDF7AL, - 0xD83CDF7BL, - 0xD83CDF81L, - 0xD83CDF82L, - 0xD83CDFC1L, - 0xD83CDFC6L, - 0xD83DDC94L, - 0xD83DDCADL, - 0x23F3L, - 0x26BEL, - 0xD83CDFAAL, - 0xD83CDFB1L, - 0xD83CDFB2L, - 0xD83CDFB7L, - 0xD83CDFB8L, - 0xD83CDFBEL, - 0xD83CDFC0L, - 0xD83CDFE6L, - 0x23F0L, - 0x2601L, - 0x260EL, - 0x2615L, - 0x267BL, - 0x26A0L, - 0x26A1L, - 0x26D4L, - 0x26EAL, - 0x26F3L, - 0x26F5L, - 0x26FDL, - 0x2702L, - 0x2708L, - 0x2709L, - 0x270AL, - 0x270FL, - 0x2712L, - 0x2728L, - 0xD83CDC04L, - 0xD83CDCCFL, - 0xD83CDD98L, - 0xD83CDF02L, - 0xD83CDF80L, - 0xD83CDF88L, - 0xD83CDF89L, - 0xD83CDF8AL, - 0xD83CDF8BL, - 0xD83CDF8CL, - 0xD83CDF8DL, - 0xD83CDF8EL, - 0xD83CDF8FL, - 0xD83CDF90L, - 0xD83CDF92L, - 0xD83CDF93L, - 0xD83CDFA3L, - 0xD83CDFA4L, - 0xD83CDFA7L, - 0xD83CDFA8L, - 0xD83CDFA9L, - 0xD83CDFABL, - 0xD83CDFACL, - 0xD83CDFADL, - 0xD83CDFAFL, - 0xD83CDFB0L, - 0xD83CDFB3L, - 0xD83CDFB4L, - 0xD83CDFB9L, - 0xD83CDFBAL, - 0xD83CDFBBL, - 0xD83CDFBDL, - 0xD83CDFBFL, - 0xD83CDFC2L, - 0xD83CDFC3L, - 0xD83CDFC4L, - 0xD83CDFC7L, - 0xD83CDFC8L, - 0xD83CDFC9L, - 0xD83CDFCAL, - 0xD83DDC40L, - 0xD83DDC44L, - 0xD83DDC45L, - 0xD83DDC4BL, - 0xD83DDC50L, - 0xD83DDC51L, - 0xD83DDC52L, - 0xD83DDC53L, - 0xD83DDC54L, - 0xD83DDC55L, - 0xD83DDC56L, - 0xD83DDC57L, - 0xD83DDC58L, - 0xD83DDC59L, - 0xD83DDC5AL, - 0xD83DDC5BL, - 0xD83DDC5CL, - 0xD83DDC5DL, - 0xD83DDC5EL, - 0xD83DDC5FL, - 0xD83DDC60L, - 0xD83DDC61L, - 0xD83DDC62L, - 0xD83DDC63L, - 0xD83DDC66L, - 0xD83DDC67L, - 0xD83DDC68L, - 0xD83DDC69L, - 0xD83DDC6AL, - 0xD83DDC6BL, - 0xD83DDC6CL, - 0xD83DDC6DL, - 0xD83DDC6EL, - 0xD83DDC6FL, - 0xD83DDC70L, - 0xD83DDC71L, - 0xD83DDC72L, - 0xD83DDC73L, - 0xD83DDC74L, - 0xD83DDC75L, - 0xD83DDC76L, - 0xD83DDC77L, - 0xD83DDC78L, - 0xD83DDC7BL, - 0xD83DDC7CL, - 0xD83DDC7EL, - 0xD83DDC80L, - 0xD83DDC81L, - 0xD83DDC82L, - 0xD83DDC83L, - 0xD83DDC84L, - 0xD83DDC85L, - 0xD83DDC86L, - 0xD83DDC87L, - 0xD83DDC88L, - 0xD83DDC89L, - 0xD83DDC8AL, - 0xD83DDC8CL, - 0xD83DDC8DL, - 0xD83DDC8EL, - 0xD83DDC8FL, - 0xD83DDC90L, - 0xD83DDC91L, - 0xD83DDC92L, - 0xD83DDC93L, - 0xD83DDC95L, - 0xD83DDC96L, - 0xD83DDC97L, - 0xD83DDC98L, - 0xD83DDC99L, - 0xD83DDC9AL, - 0xD83DDC9BL, - 0xD83DDC9CL, - 0xD83DDC9DL, - 0xD83DDC9EL, - 0xD83DDC9FL, - 0xD83DDE45L, - 0xD83DDE46L, - 0xD83DDE47L, - 0xD83DDE4BL, - 0xD83DDE4CL, - 0xD83DDE4EL, - - }; - - public static final Long[] ALL_SMILEYS = new Long[]{0xD83DDE0AL, - 0xD83DDE03L, - 0xD83DDE09L, - 0xD83DDE06L, - 0xD83DDE1CL, - 0xD83DDE0BL, - 0xD83DDE0DL, - 0xD83DDE0EL, - 0xD83DDE12L, - 0xD83DDE0FL, - 0xD83DDE14L, - 0xD83DDE22L, - 0xD83DDE2DL, - 0xD83DDE29L, - 0xD83DDE28L, - 0xD83DDE10L, - 0xD83DDE0CL, - 0xD83DDE04L, - 0xD83DDE07L, - 0xD83DDE30L, - 0xD83DDE32L, - 0xD83DDE33L, - 0xD83DDE37L, - 0xD83DDE02L, - 0x2764L, - 0xD83DDE1AL, - 0xD83DDE15L, - 0xD83DDE2FL, - 0xD83DDE26L, - 0xD83DDE35L, - 0xD83DDE20L, - 0xD83DDE21L, - 0xD83DDE1DL, - 0xD83DDE34L, - 0xD83DDE18L, - 0xD83DDE1FL, - 0xD83DDE2CL, - 0xD83DDE36L, - 0xD83DDE2AL, - 0xD83DDE2BL, - 0x263AL, - 0xD83DDE00L, - 0xD83DDE25L, - 0xD83DDE1BL, - 0xD83DDE16L, - 0xD83DDE24L, - 0xD83DDE23L, - 0xD83DDE27L, - 0xD83DDE11L, - 0xD83DDE05L, - 0xD83DDE2EL, - 0xD83DDE1EL, - 0xD83DDE19L, - 0xD83DDE13L, - 0xD83DDE01L, - 0xD83DDE31L, - 0xD83DDE08L, - 0xD83DDC7FL, - 0xD83DDC7DL, - 0xD83DDC4DL, - 0xD83DDC4EL, - 0x261DL, - 0x270CL, - 0xD83DDC4CL, - 0xD83DDC4FL, - 0xD83DDC4AL, - 0x270BL, - 0xD83DDE4FL, - 0xD83DDC43L, - 0xD83DDC46L, - 0xD83DDC47L, - 0xD83DDC48L, - 0xD83DDCAAL, - 0xD83DDC42L, - 0xD83DDC8BL, - 0xD83DDCA9L, - 0x2744L, - 0xD83CDF4AL, - 0xD83CDF77L, - 0xD83CDF78L, - 0xD83CDF85L, - 0xD83DDCA6L, - 0xD83DDC7AL, - 0xD83DDC28L, - 0xD83DDD1EL, - 0xD83DDC79L, - 0x26BDL, - 0x26C5L, - 0xD83CDF1FL, - 0xD83CDF4CL, - 0xD83CDF7AL, - 0xD83CDF7BL, - 0xD83CDF39L, - 0xD83CDF45L, - 0xD83CDF52L, - 0xD83CDF81L, - 0xD83CDF82L, - 0xD83CDF84L, - 0xD83CDFC1L, - 0xD83CDFC6L, - 0xD83DDC0EL, - 0xD83DDC0FL, - 0xD83DDC1CL, - 0xD83DDC2BL, - 0xD83DDC2EL, - 0xD83DDC03L, - 0xD83DDC3BL, - 0xD83DDC3CL, - 0xD83DDC05L, - 0xD83DDC13L, - 0xD83DDC18L, - 0xD83DDC94L, - 0xD83DDCADL, - 0xD83DDC36L, - 0xD83DDC31L, - 0xD83DDC37L, - 0xD83DDC11L, - 0x23F3L, - 0x26BEL, - 0x26C4L, - 0x2600L, - 0xD83CDF3AL, - 0xD83CDF3BL, - 0xD83CDF3CL, - 0xD83CDF3DL, - 0xD83CDF4BL, - 0xD83CDF4DL, - 0xD83CDF4EL, - 0xD83CDF4FL, - 0xD83CDF6DL, - 0xD83CDF37L, - 0xD83CDF38L, - 0xD83CDF46L, - 0xD83CDF49L, - 0xD83CDF50L, - 0xD83CDF51L, - 0xD83CDF53L, - 0xD83CDF54L, - 0xD83CDF55L, - 0xD83CDF56L, - 0xD83CDF57L, - 0xD83CDF69L, - 0xD83CDF83L, - 0xD83CDFAAL, - 0xD83CDFB1L, - 0xD83CDFB2L, - 0xD83CDFB7L, - 0xD83CDFB8L, - 0xD83CDFBEL, - 0xD83CDFC0L, - 0xD83CDFE6L, - 0xD83DDE38L, - 0xD83DDE39L, - 0xD83DDE3CL, - 0xD83DDE3DL, - 0xD83DDE3EL, - 0xD83DDE3FL, - 0xD83DDE3BL, - 0xD83DDE40L, - 0x23F0L, - 0x2601L, - 0x260EL, - 0x2615L, - 0x267BL, - 0x26A0L, - 0x26A1L, - 0x26D4L, - 0x26EAL, - 0x26F3L, - 0x26F5L, - 0x26FDL, - 0x2702L, - 0x2708L, - 0x2709L, - 0x270AL, - 0x270FL, - 0x2712L, - 0x2728L, - 0xD83CDC04L, - 0xD83CDCCFL, - 0xD83CDD98L, - 0xD83CDF02L, - 0xD83CDF0DL, - 0xD83CDF1BL, - 0xD83CDF1DL, - 0xD83CDF1EL, - 0xD83CDF30L, - 0xD83CDF31L, - 0xD83CDF32L, - 0xD83CDF33L, - 0xD83CDF34L, - 0xD83CDF35L, - 0xD83CDF3EL, - 0xD83CDF3FL, - 0xD83CDF40L, - 0xD83CDF41L, - 0xD83CDF42L, - 0xD83CDF43L, - 0xD83CDF44L, - 0xD83CDF47L, - 0xD83CDF48L, - 0xD83CDF5AL, - 0xD83CDF5BL, - 0xD83CDF5CL, - 0xD83CDF5DL, - 0xD83CDF5EL, - 0xD83CDF5FL, - 0xD83CDF60L, - 0xD83CDF61L, - 0xD83CDF62L, - 0xD83CDF63L, - 0xD83CDF64L, - 0xD83CDF65L, - 0xD83CDF66L, - 0xD83CDF67L, - 0xD83CDF68L, - 0xD83CDF6AL, - 0xD83CDF6BL, - 0xD83CDF6CL, - 0xD83CDF6EL, - 0xD83CDF6FL, - 0xD83CDF70L, - 0xD83CDF71L, - 0xD83CDF72L, - 0xD83CDF73L, - 0xD83CDF74L, - 0xD83CDF75L, - 0xD83CDF76L, - 0xD83CDF79L, - 0xD83CDF7CL, - 0xD83CDF80L, - 0xD83CDF88L, - 0xD83CDF89L, - 0xD83CDF8AL, - 0xD83CDF8BL, - 0xD83CDF8CL, - 0xD83CDF8DL, - 0xD83CDF8EL, - 0xD83CDF8FL, - 0xD83CDF90L, - 0xD83CDF92L, - 0xD83CDF93L, - 0xD83CDFA3L, - 0xD83CDFA4L, - 0xD83CDFA7L, - 0xD83CDFA8L, - 0xD83CDFA9L, - 0xD83CDFABL, - 0xD83CDFACL, - 0xD83CDFADL, - 0xD83CDFAFL, - 0xD83CDFB0L, - 0xD83CDFB3L, - 0xD83CDFB4L, - 0xD83CDFB9L, - 0xD83CDFBAL, - 0xD83CDFBBL, - 0xD83CDFBDL, - 0xD83CDFBFL, - 0xD83CDFC2L, - 0xD83CDFC3L, - 0xD83CDFC4L, - 0xD83CDFC7L, - 0xD83CDFC8L, - 0xD83CDFC9L, - 0xD83CDFCAL, - 0xD83DDC00L, - 0xD83DDC01L, - 0xD83DDC02L, - 0xD83DDC04L, - 0xD83DDC06L, - 0xD83DDC07L, - 0xD83DDC08L, - 0xD83DDC09L, - 0xD83DDC0AL, - 0xD83DDC0BL, - 0xD83DDC0CL, - 0xD83DDC0DL, - 0xD83DDC10L, - 0xD83DDC12L, - 0xD83DDC14L, - 0xD83DDC15L, - 0xD83DDC16L, - 0xD83DDC17L, - 0xD83DDC19L, - 0xD83DDC1AL, - 0xD83DDC1BL, - 0xD83DDC1DL, - 0xD83DDC1EL, - 0xD83DDC1FL, - 0xD83DDC20L, - 0xD83DDC21L, - 0xD83DDC22L, - 0xD83DDC23L, - 0xD83DDC24L, - 0xD83DDC25L, - 0xD83DDC26L, - 0xD83DDC27L, - 0xD83DDC29L, - 0xD83DDC2AL, - 0xD83DDC2CL, - 0xD83DDC2DL, - 0xD83DDC2FL, - 0xD83DDC30L, - 0xD83DDC32L, - 0xD83DDC33L, - 0xD83DDC34L, - 0xD83DDC35L, - 0xD83DDC38L, - 0xD83DDC39L, - 0xD83DDC3AL, - 0xD83DDC3DL, - 0xD83DDC3EL, - 0xD83DDC40L, - 0xD83DDC44L, - 0xD83DDC45L, - 0xD83DDC4BL, - 0xD83DDC50L, - 0xD83DDC51L, - 0xD83DDC52L, - 0xD83DDC53L, - 0xD83DDC54L, - 0xD83DDC55L, - 0xD83DDC56L, - 0xD83DDC57L, - 0xD83DDC58L, - 0xD83DDC59L, - 0xD83DDC5AL, - 0xD83DDC5BL, - 0xD83DDC5CL, - 0xD83DDC5DL, - 0xD83DDC5EL, - 0xD83DDC5FL, - 0xD83DDC60L, - 0xD83DDC61L, - 0xD83DDC62L, - 0xD83DDC63L, - 0xD83DDC66L, - 0xD83DDC67L, - 0xD83DDC68L, - 0xD83DDC69L, - 0xD83DDC6AL, - 0xD83DDC6BL, - 0xD83DDC6CL, - 0xD83DDC6DL, - 0xD83DDC6EL, - 0xD83DDC6FL, - 0xD83DDC70L, - 0xD83DDC71L, - 0xD83DDC72L, - 0xD83DDC73L, - 0xD83DDC74L, - 0xD83DDC75L, - 0xD83DDC76L, - 0xD83DDC77L, - 0xD83DDC78L, - 0xD83DDC7BL, - 0xD83DDC7CL, - 0xD83DDC7EL, - 0xD83DDC80L, - 0xD83DDC81L, - 0xD83DDC82L, - 0xD83DDC83L, - 0xD83DDC84L, - 0xD83DDC85L, - 0xD83DDC86L, - 0xD83DDC87L, - 0xD83DDC88L, - 0xD83DDC89L, - 0xD83DDC8AL, - 0xD83DDC8CL, - 0xD83DDC8DL, - 0xD83DDC8EL, - 0xD83DDC8FL, - 0xD83DDC90L, - 0xD83DDC91L, - 0xD83DDC92L, - 0xD83DDC93L, - 0xD83DDC95L, - 0xD83DDC96L, - 0xD83DDC97L, - 0xD83DDC98L, - 0xD83DDC99L, - 0xD83DDC9AL, - 0xD83DDC9BL, - 0xD83DDC9CL, - 0xD83DDC9DL, - 0xD83DDC9EL, - 0xD83DDC9FL, - 0xD83DDCA1L, - 0xD83DDCA3L, - 0xD83DDCA5L, - 0xD83DDCA7L, - 0xD83DDCA8L, - 0xD83DDCACL, - 0xD83DDCB0L, - 0xD83DDCB3L, - 0xD83DDCB4L, - 0xD83DDCB5L, - 0xD83DDCB6L, - 0xD83DDCB7L, - 0xD83DDCB8L, - 0xD83DDCBAL, - 0xD83DDCBBL, - 0xD83DDCBCL, - 0xD83DDCBDL, - 0xD83DDCBEL, - 0xD83DDCBFL, - 0xD83DDCC0L, - 0xD83DDCC4L, - 0xD83DDCC5L, - 0xD83DDCC7L, - 0xD83DDCC8L, - 0xD83DDCC9L, - 0xD83DDCCAL, - 0xD83DDCCBL, - 0xD83DDCCCL, - 0xD83DDCCDL, - 0xD83DDCCEL, - 0xD83DDCD0L, - 0xD83DDCD1L, - 0xD83DDCD2L, - 0xD83DDCD3L, - 0xD83DDCD4L, - 0xD83DDCD5L, - 0xD83DDCD6L, - 0xD83DDCD7L, - 0xD83DDCD8L, - 0xD83DDCD9L, - 0xD83DDCDAL, - 0xD83DDCDCL, - 0xD83DDCDDL, - 0xD83DDCDFL, - 0xD83DDCE0L, - 0xD83DDCE1L, - 0xD83DDCE2L, - 0xD83DDCE6L, - 0xD83DDCEDL, - 0xD83DDCEEL, - 0xD83DDCEFL, - 0xD83DDCF0L, - 0xD83DDCF1L, - 0xD83DDCF7L, - 0xD83DDCF9L, - 0xD83DDCFAL, - 0xD83DDCFBL, - 0xD83DDCFCL, - 0xD83DDD06L, - 0xD83DDD0EL, - 0xD83DDD11L, - 0xD83DDD14L, - 0xD83DDD16L, - 0xD83DDD25L, - 0xD83DDD26L, - 0xD83DDD27L, - 0xD83DDD28L, - 0xD83DDD29L, - 0xD83DDD2AL, - 0xD83DDD2BL, - 0xD83DDD2CL, - 0xD83DDD2DL, - 0xD83DDD2EL, - 0xD83DDD31L, - 0xD83DDDFFL, - 0xD83DDE3AL, - 0xD83DDE45L, - 0xD83DDE46L, - 0xD83DDE47L, - 0xD83DDE48L, - 0xD83DDE49L, - 0xD83DDE4AL, - 0xD83DDE4BL, - 0xD83DDE4CL, - 0xD83DDE4EL, - 0xD83DDE80L, - 0xD83DDE81L, - 0xD83DDE82L, - 0xD83DDE83L, - 0xD83DDE84L, - 0xD83DDE85L, - 0xD83DDE86L, - 0xD83DDE87L, - 0xD83DDE88L, - 0xD83DDE8AL, - 0xD83DDE8CL, - 0xD83DDE8DL, - 0xD83DDE8EL, - 0xD83DDE8FL, - 0xD83DDE90L, - 0xD83DDE91L, - 0xD83DDE92L, - 0xD83DDE93L, - 0xD83DDE94L, - 0xD83DDE95L, - 0xD83DDE96L, - 0xD83DDE97L, - 0xD83DDE98L, - 0xD83DDE99L, - 0xD83DDE9AL, - 0xD83DDE9BL, - 0xD83DDE9CL, - 0xD83DDE9DL, - 0xD83DDE9EL, - 0xD83DDE9FL, - 0xD83DDEA0L, - 0xD83DDEA1L, - 0xD83DDEA3L, - 0xD83DDEA4L, - 0xD83DDEA7L, - 0xD83DDEA8L, - 0xD83DDEAAL, - 0xD83DDEACL, - 0xD83DDEB4L, - 0xD83DDEB5L, - 0xD83DDEB6L, - 0xD83DDEBDL, - 0xD83DDEBFL, - 0xD83DDEC0L, - 0xD83CDDE8D83CDDF3L, - 0xD83CDDE9D83CDDEAL, - 0xD83CDDEAD83CDDF8L, - 0xD83CDDEBD83CDDF7L, - 0xD83CDDECD83CDDE7L, - 0xD83CDDEED83CDDF9L, - 0xD83CDDEFD83CDDF5L, - 0xD83CDDF0D83CDDF7L, - 0xD83CDDF7D83CDDFAL, - 0xD83CDDFAD83CDDF8L,}; - - public static final Long[] RECENT_DEFAULT = new Long[]{ - - // todo default recent? - 0xD83DDE37L, - 0xD83DDE21L, - 0xD83DDE33L, - 0xD83DDE0DL, - 0xD83DDE0AL, - - - }; - private static ArrayList recent = new ArrayList(); - - - private static OnRecentChangeListener onRecentChangeListener; - - public static void setOnRecentChangeListener(OnRecentChangeListener onRecentChangeListener) { - SmilesPack.onRecentChangeListener = onRecentChangeListener; - } - - public static ArrayList getRecent() {/* - if (recent.isEmpty()) { - recent.addAll(Arrays.asList(RECENT_DEFAULT)); - } - return recent;*/ - return SmilesRecentsController.getInstance(); - } - - public static void upRecent(Long smileId) { - SmilesRecentsController.getInstance().push(smileId); - } -} diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/smiles/SmilesPackView.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/smiles/SmilesPackView.java deleted file mode 100644 index 024181baa8..0000000000 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/smiles/SmilesPackView.java +++ /dev/null @@ -1,160 +0,0 @@ -/* - * Copyright (C) 2015 Actor LLC. - */ - -package im.actor.sdk.view.emoji.smiles; - -import android.content.Context; -import android.graphics.Bitmap; -import android.graphics.Canvas; -import android.graphics.Paint; -import android.graphics.Rect; -import android.view.MotionEvent; -import android.view.SoundEffectConstants; -import android.view.View; -import android.view.ViewConfiguration; - -import java.util.ArrayList; - -import im.actor.sdk.view.emoji.SmileProcessor; -import im.actor.sdk.view.emoji.keyboard.emoji.smiles.OnSmileClickListener; - -public class SmilesPackView extends View { - - private int smileysInRow; - private int rowCount; - private int countInRow; - private SmileProcessor processor; - private ArrayList smileyIds; - private int[] smileysSections; - private int[] smileysX; - private int[] smileysY; - private int smileySrcSize; - private int smileySize; - private int smileyPadding; - private Rect rect = new Rect(); - private Rect sectionRect = new Rect(); - private Paint paint = new Paint(); - private OnSmileClickListener onSmileClickListener; - private float touchX, touchY; - - public SmilesPackView(Context context, SmileProcessor processor, - ArrayList smileyIds, int smileysInRow, int smileySize, int smileyPadding) { - super(context); - - - this.smileysInRow = smileysInRow; - this.rowCount = (int) Math.ceil((float) smileyIds.size() / smileysInRow); - this.processor = processor; - this.smileyIds = new ArrayList(smileyIds); - this.countInRow = smileysInRow; - this.smileySize = smileySize; - this.smileyPadding = smileyPadding; - this.smileySrcSize = processor.getRectSize(); - - init(); - - } - - private void init() { - - smileysSections = new int[smileyIds.size()]; - smileysX = new int[smileyIds.size()]; - smileysY = new int[smileyIds.size()]; - for (int i = 0; i < smileyIds.size(); i++) { - smileysSections[i] = processor.getSectionIndex(smileyIds.get(i)); - smileysX[i] = processor.getSectionX(smileyIds.get(i)); - smileysY[i] = processor.getSectionY(smileyIds.get(i)); - } - - this.paint.setAntiAlias(true); - this.paint.setFlags(Paint.FILTER_BITMAP_FLAG); - } - - - public void update() { - this.rowCount = (int) Math.ceil((float) smileyIds.size() / smileysInRow); - super.invalidate(); - } - - @Override - protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { - setMeasuredDimension(smileySize * countInRow, smileySize * rowCount); - } - - public OnSmileClickListener getOnSmileClickListener() { - return onSmileClickListener; - } - - public void setOnSmileClickListener(OnSmileClickListener onSmileClickListener) { - this.onSmileClickListener = onSmileClickListener; - } - - @Override - public boolean onTouchEvent(MotionEvent event) { - switch (event.getAction()) { - case MotionEvent.ACTION_DOWN: - touchX = event.getX(); - touchY = event.getY(); - return true; - case MotionEvent.ACTION_UP: - float slop = ViewConfiguration.get(getContext()).getScaledTouchSlop(); - if (Math.abs(event.getX() - touchX) < slop && Math.abs(event.getY() - touchY) < slop) { - int offsetLeft = (getWidth() - countInRow * smileySize) / 2; - if (touchX > offsetLeft || touchX < offsetLeft + smileySize * countInRow) { - int row = (int) (touchY / smileySize); - int col = (int) ((touchX - offsetLeft) / smileySize); - int index = row * countInRow + col; - if (index >= 0 && index < smileyIds.size()) { - if (onSmileClickListener != null) { - playSoundEffect(SoundEffectConstants.CLICK); - - long smileId = smileyIds.get(index); - String smile = null; - char a = (char) (smileId & 0xFFFFFFFF); - char b = (char) ((smileId >> 16) & 0xFFFFFFFF); - char c = (char) ((smileId >> 32) & 0xFFFFFFFF); - char d = (char) ((smileId >> 48) & 0xFFFFFFFF); - if (c != 0 && d != 0) { - smile = "" + d + c + b + a; - } else if (b != 0) { - smile = b + "" + a; - } else { - smile = "" + a; - } - SmileProcessor.emoji().upRecent(smileId); - onSmileClickListener.onEmojiClicked(smile); - } - } - } - } - return true; - } - return false; - } - - @Override - protected void onDraw(Canvas canvas) { - if (processor.isLoaded()) { - int offsetLeft = (getWidth() - countInRow * smileySize) / 2; - for (int i = 0; i < smileyIds.size(); i++) { - int row = i / countInRow; - int col = i % countInRow; - rect.set(col * smileySize + smileyPadding + offsetLeft, row * smileySize + smileyPadding, (col + 1) * smileySize - smileyPadding + offsetLeft, - (row + 1) * smileySize - smileyPadding); - if (!canvas.quickReject(rect.left, rect.top, rect.right, rect.bottom, Canvas.EdgeType.AA)) { - Bitmap img = processor.getSection(smileysSections[i]); - if (img != null) { - sectionRect.set(smileysX[i] * smileySrcSize + 1, smileysY[i] * smileySrcSize + 1, - (smileysX[i] + 1) * smileySrcSize - 1, (smileysY[i] + 1) * smileySrcSize - 1); - canvas.drawBitmap(img, sectionRect, rect, paint); - } - } - } - } - } - - public void setPack(Long[] updated) { - - } -} \ No newline at end of file diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/smiles/SmilesRecentListener.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/smiles/SmilesRecentListener.java deleted file mode 100644 index 79d32297b9..0000000000 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/smiles/SmilesRecentListener.java +++ /dev/null @@ -1,12 +0,0 @@ -/* - * Copyright (C) 2015 Actor LLC. - */ - -package im.actor.sdk.view.emoji.smiles; - -/** - * Created by Jesus Christ. Amen. - */ -public interface SmilesRecentListener { - void onSmilesUpdated(); -} diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/smiles/SmilesRecentsController.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/smiles/SmilesRecentsController.java deleted file mode 100644 index cfac7e83f1..0000000000 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/smiles/SmilesRecentsController.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright (C) 2015 Actor LLC. - */ - -package im.actor.sdk.view.emoji.smiles; - -import android.content.Context; -import android.content.SharedPreferences; - -import java.util.ArrayList; -import java.util.StringTokenizer; - -import im.actor.runtime.android.AndroidContext; - -/** - * Created by Jesus Christ. Amen. - */ -public class SmilesRecentsController extends ArrayList { - - private static final String PREFERENCE_NAME = "smiles"; - private static final String PREF_RECENTS = "recent_smiles"; - - private static final Object LOCK = new Object(); - private static SmilesRecentsController sInstance; - - private Context mContext; - - private SmilesRecentsController(Context context) { - mContext = context.getApplicationContext(); - loadRecents(); - } - - public static SmilesRecentsController getInstance() { - return getInstance(AndroidContext.getContext()); - } - - public static SmilesRecentsController getInstance(Context context) { - if (sInstance == null) { - synchronized (LOCK) { - if (sInstance == null) { - sInstance = new SmilesRecentsController(context); - } - } - } - return sInstance; - } - - - public void push(Long object) { - if (contains(object)) { - super.remove(object); - } - add(0, object); - while(size()>32){ - remove(32); - } - } - - @Override - public boolean add(Long object) { - boolean ret = super.add(object); - return ret; - } - - @Override - public void add(int index, Long object) { - super.add(index, object); - } - - @Override - public boolean remove(Object object) { - boolean ret = super.remove(object); - return ret; - } - - private SharedPreferences getPreferences() { - return mContext.getSharedPreferences(PREFERENCE_NAME, Context.MODE_PRIVATE); - } - - private void loadRecents() { - SharedPreferences prefs = getPreferences(); - String str = prefs.getString(PREF_RECENTS, ""); - StringTokenizer tokenizer = new StringTokenizer(str, "~"); - while (tokenizer.hasMoreTokens()) { - try { - add(Long.valueOf(tokenizer.nextToken())); - } catch (NumberFormatException e) { - // ignored - } - } - } - - public void saveRecents() { - StringBuilder str = new StringBuilder(); - int c = size(); - for (int i = 0; i < c; i++) { - Long e = get(i); - str.append(e); - if (i < (c - 1)) { - str.append('~'); - } - } - SharedPreferences prefs = getPreferences(); - prefs.edit().putString(PREF_RECENTS, str.toString()).apply(); - } - -} \ No newline at end of file diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/smiles/SmileysPack.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/smiles/SmileysPack.java deleted file mode 100644 index 4064d9effa..0000000000 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/smiles/SmileysPack.java +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (C) 2015 Actor LLC. - */ - -package im.actor.sdk.view.emoji.smiles; - -/** - * Created by ex3ndr on 19.10.14. - */ -public class SmileysPack { - public static final boolean PACK_2 = true; - public static final boolean PACK_15 = true; - public static final boolean PACK_1 = false; -} diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/stickers/StickersAdapter.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/stickers/StickersAdapter.java index 3ae96dd41e..9fed7423fe 100644 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/stickers/StickersAdapter.java +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/view/emoji/stickers/StickersAdapter.java @@ -16,14 +16,14 @@ import im.actor.runtime.mvvm.ValueChangedListener; import im.actor.sdk.controllers.ActorBinder; import im.actor.sdk.util.Screen; -import im.actor.sdk.view.emoji.keyboard.emoji.EmojiKeyboard; +import im.actor.sdk.view.emoji.keyboard.emoji.EmojiView; import static im.actor.sdk.util.ActorSDKMessenger.messenger; public class StickersAdapter extends RecyclerView.Adapter { private ArrayList stickers = new ArrayList<>(); - private EmojiKeyboard keyboard; + private EmojiView keyboard; private PacksAdapter packsAdapter; private RecyclerView recyclerView; private ActorBinder binder; @@ -31,7 +31,7 @@ public class StickersAdapter extends RecyclerView.Adapter + + + diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/bluecircle.png b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/bluecircle.png new file mode 100644 index 0000000000..93c4e092bd Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/bluecircle.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/ic_smiles2_car.png b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/ic_smiles2_car.png new file mode 100755 index 0000000000..772df38a3c Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/ic_smiles2_car.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/ic_smiles2_car_active.png b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/ic_smiles2_car_active.png new file mode 100755 index 0000000000..fe26abc513 Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/ic_smiles2_car_active.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/ic_smiles2_food.png b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/ic_smiles2_food.png new file mode 100755 index 0000000000..c6aa99f8ab Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/ic_smiles2_food.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/ic_smiles2_food_active.png b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/ic_smiles2_food_active.png new file mode 100755 index 0000000000..0494b456fc Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/ic_smiles2_food_active.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/ic_smiles2_nature.png b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/ic_smiles2_nature.png new file mode 100755 index 0000000000..a5c958f57b Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/ic_smiles2_nature.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/ic_smiles2_nature_active.png b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/ic_smiles2_nature_active.png new file mode 100755 index 0000000000..f2b57bf566 Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/ic_smiles2_nature_active.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/ic_smiles2_objects.png b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/ic_smiles2_objects.png new file mode 100755 index 0000000000..ca6ea1e79e Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/ic_smiles2_objects.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/ic_smiles2_objects_active.png b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/ic_smiles2_objects_active.png new file mode 100755 index 0000000000..46a59bc568 Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/ic_smiles2_objects_active.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/ic_smiles2_recent.png b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/ic_smiles2_recent.png new file mode 100755 index 0000000000..4c562e0015 Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/ic_smiles2_recent.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/ic_smiles2_recent_active.png b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/ic_smiles2_recent_active.png new file mode 100755 index 0000000000..40283e4c35 Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/ic_smiles2_recent_active.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/ic_smiles2_smile.png b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/ic_smiles2_smile.png new file mode 100755 index 0000000000..c562e241e0 Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/ic_smiles2_smile.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/ic_smiles2_smile_active.png b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/ic_smiles2_smile_active.png new file mode 100755 index 0000000000..6a3c0a6067 Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/ic_smiles2_smile_active.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/ic_smiles2_stickers.png b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/ic_smiles2_stickers.png new file mode 100755 index 0000000000..288723cf3a Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/ic_smiles2_stickers.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/ic_smiles2_stickers_active.png b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/ic_smiles2_stickers_active.png new file mode 100755 index 0000000000..2b6917aebb Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/ic_smiles2_stickers_active.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/ic_smiles_backspace.png b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/ic_smiles_backspace.png old mode 100644 new mode 100755 diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/ic_smiles_backspace_active.png b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/ic_smiles_backspace_active.png old mode 100644 new mode 100755 diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/stickers_back_all.9.png b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/stickers_back_all.9.png new file mode 100644 index 0000000000..6a05a79f53 Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/stickers_back_all.9.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/stickers_back_arrow.png b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/stickers_back_arrow.png new file mode 100644 index 0000000000..4579d546af Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xhdpi/stickers_back_arrow.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/bluecircle.png b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/bluecircle.png new file mode 100644 index 0000000000..36d790a8f4 Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/bluecircle.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/ic_smiles2_car.png b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/ic_smiles2_car.png new file mode 100755 index 0000000000..4a0177503c Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/ic_smiles2_car.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/ic_smiles2_car_active.png b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/ic_smiles2_car_active.png new file mode 100755 index 0000000000..417c46f158 Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/ic_smiles2_car_active.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/ic_smiles2_food.png b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/ic_smiles2_food.png new file mode 100755 index 0000000000..0b1a1a1b31 Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/ic_smiles2_food.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/ic_smiles2_food_active.png b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/ic_smiles2_food_active.png new file mode 100755 index 0000000000..e10e3c32d9 Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/ic_smiles2_food_active.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/ic_smiles2_nature.png b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/ic_smiles2_nature.png new file mode 100755 index 0000000000..2558d32e40 Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/ic_smiles2_nature.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/ic_smiles2_nature_active.png b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/ic_smiles2_nature_active.png new file mode 100755 index 0000000000..e7adec7e10 Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/ic_smiles2_nature_active.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/ic_smiles2_objects.png b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/ic_smiles2_objects.png new file mode 100755 index 0000000000..afa8a949bb Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/ic_smiles2_objects.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/ic_smiles2_objects_active.png b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/ic_smiles2_objects_active.png new file mode 100755 index 0000000000..f159f569d2 Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/ic_smiles2_objects_active.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/ic_smiles2_recent.png b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/ic_smiles2_recent.png new file mode 100755 index 0000000000..20fb6df576 Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/ic_smiles2_recent.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/ic_smiles2_recent_active.png b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/ic_smiles2_recent_active.png new file mode 100755 index 0000000000..ed16a56eb5 Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/ic_smiles2_recent_active.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/ic_smiles2_smile.png b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/ic_smiles2_smile.png new file mode 100755 index 0000000000..4fb73ab125 Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/ic_smiles2_smile.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/ic_smiles2_smile_active.png b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/ic_smiles2_smile_active.png new file mode 100755 index 0000000000..61aa5421ff Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/ic_smiles2_smile_active.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/ic_smiles2_stickers.png b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/ic_smiles2_stickers.png new file mode 100755 index 0000000000..e5d036ede7 Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/ic_smiles2_stickers.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/ic_smiles2_stickers_active.png b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/ic_smiles2_stickers_active.png new file mode 100755 index 0000000000..925c02c34f Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/ic_smiles2_stickers_active.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/stickers_back_all.9.png b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/stickers_back_all.9.png new file mode 100644 index 0000000000..7b0ed60d12 Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/stickers_back_all.9.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/stickers_back_arrow.png b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/stickers_back_arrow.png new file mode 100644 index 0000000000..43d89e76e7 Binary files /dev/null and b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable-xxhdpi/stickers_back_arrow.png differ diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable/ic_emoji_backspace.xml b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable/ic_emoji_backspace.xml new file mode 100644 index 0000000000..c515f6be7c --- /dev/null +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable/ic_emoji_backspace.xml @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable/ic_emoji_bell.xml b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable/ic_emoji_bell.xml new file mode 100644 index 0000000000..7d42e318d3 --- /dev/null +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable/ic_emoji_bell.xml @@ -0,0 +1,13 @@ + + + + + + + diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable/ic_emoji_car.xml b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable/ic_emoji_car.xml new file mode 100644 index 0000000000..0d6e59f9ff --- /dev/null +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable/ic_emoji_car.xml @@ -0,0 +1,16 @@ + + + + + + + diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable/ic_emoji_flower.xml b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable/ic_emoji_flower.xml new file mode 100644 index 0000000000..0a21067f14 --- /dev/null +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable/ic_emoji_flower.xml @@ -0,0 +1,16 @@ + + + + + + + diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable/ic_emoji_recent.xml b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable/ic_emoji_recent.xml new file mode 100644 index 0000000000..e3c60248fd --- /dev/null +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable/ic_emoji_recent.xml @@ -0,0 +1,16 @@ + + + + + + + diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable/ic_emoji_smile.xml b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable/ic_emoji_smile.xml new file mode 100644 index 0000000000..71c0563d83 --- /dev/null +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable/ic_emoji_smile.xml @@ -0,0 +1,16 @@ + + + + + + + diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable/ic_emoji_symbol.xml b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable/ic_emoji_symbol.xml new file mode 100644 index 0000000000..60c0d3c4f6 --- /dev/null +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable/ic_emoji_symbol.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable/list_selector.xml b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable/list_selector.xml new file mode 100644 index 0000000000..f311824b83 --- /dev/null +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/res/drawable/list_selector.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/layout/emoji_keyboard.xml b/actor-sdk/sdk-core-android/android-sdk/src/main/res/layout/emoji_keyboard.xml deleted file mode 100644 index f71a28b317..0000000000 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/res/layout/emoji_keyboard.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/layout/emoji_smiles_page.xml b/actor-sdk/sdk-core-android/android-sdk/src/main/res/layout/emoji_smiles_page.xml deleted file mode 100644 index d04b53f87d..0000000000 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/res/layout/emoji_smiles_page.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/layout/emoji_smiles_pager.xml b/actor-sdk/sdk-core-android/android-sdk/src/main/res/layout/emoji_smiles_pager.xml deleted file mode 100644 index 4b71079351..0000000000 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/res/layout/emoji_smiles_pager.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/layout/fragment_sign_in.xml b/actor-sdk/sdk-core-android/android-sdk/src/main/res/layout/fragment_sign_in.xml index 508f4f513e..c4bcfb0193 100644 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/res/layout/fragment_sign_in.xml +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/res/layout/fragment_sign_in.xml @@ -41,17 +41,20 @@ android:paddingLeft="4dp" android:paddingRight="4dp"> - + android:textColorHint="#a6a6a6" + android:inputType="number|phone" + android:digits="0123456789" + android:textAlignment="center" + android:gravity="center_vertical|center_horizontal" + android:textSize="30sp" + android:background="@android:color/transparent"/> diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/layout/fragment_sign_phone.xml b/actor-sdk/sdk-core-android/android-sdk/src/main/res/layout/fragment_sign_phone.xml index 230010b354..a91ae1c792 100644 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/res/layout/fragment_sign_phone.xml +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/res/layout/fragment_sign_phone.xml @@ -68,24 +68,20 @@ android:id="@+id/tv_country_code" android:layout_width="70dp" android:layout_height="wrap_content" - android:gravity="center" + android:gravity="center_horizontal" android:imeOptions="actionGo" android:inputType="phone" android:maxLength="4" - android:maxLines="1" - android:singleLine="true" /> + android:maxLines="1"/> + android:maxLines="1"/> diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/menu/sign_in.xml b/actor-sdk/sdk-core-android/android-sdk/src/main/res/menu/sign_in.xml index dc7c72f8f6..181c17e7f7 100644 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/res/menu/sign_in.xml +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/res/menu/sign_in.xml @@ -12,9 +12,9 @@ android:title="@string/tour_sign_up" app:showAsAction="always" /> - + + + + \ No newline at end of file diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/menu/sign_up.xml b/actor-sdk/sdk-core-android/android-sdk/src/main/res/menu/sign_up.xml index 154df3d205..eb34be12d6 100644 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/res/menu/sign_up.xml +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/res/menu/sign_up.xml @@ -12,9 +12,9 @@ android:title="@string/tour_sign_in" app:showAsAction="always" /> - + + + + \ No newline at end of file diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/values-nl/ui_text.xml b/actor-sdk/sdk-core-android/android-sdk/src/main/res/values-nl/ui_text.xml index 79d53e45b9..0bc0221e58 100644 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/res/values-nl/ui_text.xml +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/res/values-nl/ui_text.xml @@ -1,10 +1,5 @@ - - + - Homecrew Nl Bevestig @@ -57,7 +52,7 @@ met Google Naar boven - Homecrew + {app_name} Voorkom inbraak. Buren worden dienstverleners. @@ -152,7 +147,7 @@ Typ iets om te zoeken - Homecrew doorzoeken + {app_name} doorzoeken Niets gevonden Help Zoeken @@ -181,7 +176,7 @@ Bewerk profiel Wijzig foto Account - Over Homecrew + Over {app_name} Help Stel een vraag of geef feedback Twitter diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/values-pt-rBR/picker_strings.xml b/actor-sdk/sdk-core-android/android-sdk/src/main/res/values-pt-rBR/picker_strings.xml index f5d80933a5..6ddee2cd90 100644 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/res/values-pt-rBR/picker_strings.xml +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/res/values-pt-rBR/picker_strings.xml @@ -25,8 +25,8 @@ Nenhum arquivo aqui Pesquisar Pesquisar - Organizar por nome - Organizar por data + Ordenar por nome + Ordenar por data Câmera Arquivos recentes Pastas Pricipais diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/values-pt-rBR/ui_text.xml b/actor-sdk/sdk-core-android/android-sdk/src/main/res/values-pt-rBR/ui_text.xml index 6146214650..cc07536e31 100644 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/res/values-pt-rBR/ui_text.xml +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/res/values-pt-rBR/ui_text.xml @@ -21,12 +21,22 @@ Sem Cartão SD Número do telefone copiado para área de transferência + Email copiado para a área de transferência Mensagens copiadas para área de transferência + Nome do usuário copiado para a área de transferência Não foi possível remover membro do grupo Não foi possível adicionar usuário ao grupo Esse usuário já é membro do grupo O Nome não pode ficar em branco Não foi possível alterar o nome + O Apelido não pode ficar em branco + Não foi possível alterar o apelido + O campo Sobre não pode ficar em branco + Nenhum aplicativo está disponível para abrir isto + Não foi possível sair do grupo + Não foi possível criar o grupo + Não foi possível excluir a conversa + Não foi possível limpar a conversa Compartilhar Salvar no Telefone @@ -47,7 +57,7 @@ Mensagens seguras para Equipes e Amigos Grandes Grupos de Conversação - Grupos realmente grades de conversação. Mais de 300 usuários por grupo. Comunique-se com suas equipes e tomem decisões em conjunto. + Grupos de conversação realmente grandes. Mais de 300 usuários por grupo. Comunique-se com suas equipes e tomem decisões em conjunto. Funciona em todas as plataformas Não importa se você está no metrô ou nas montanhas. Sua mensagem sempre chegará a pessoa certa. @@ -66,13 +76,19 @@ Selecione um país Código do país inválido + Estamos usando seu e-mail de trabalho para autenticação para que possamos adicionar seus colegas na sua lista de contatos e adicioná-lo a grupos de trabalho instantaneamente. + PORQUE PRECISAMOS DO SEU EMAIL DE TRABALHO? + + Use o email para se registrar + Use o telefone para se registrar + Escolha o tipo de autenticação Por favor escolha tipo de autenticação. Registrar Entrar com seu número de telefone - com e-mail + com seu e-mail @@ -81,6 +97,27 @@ E-mail CONFIRMAR E-MAIL + Ao inscrever-se, você concorda com os Termos de Serviço e Política de Privacidade. + Ao inscrever-se, você concorda com os Termos de Serviço. + Ao inscrever-se, você concorda com a Política de Privacidade. + Outros usuários serão capazes de encontrá-lo via e-mail ou número de telefone. + + Alterar o endereço do servidor + Restaurar o valor padrão + + Termos de Serviço + Política de Privacidade + + + Entrar + Por favor, informe seu telefone ou email. + Por favor, informe seu telefone. + Por favor, informe seu email. + telefone ou email + telefone + email + ENTRAR + Nós lhe enviamos um SMS com o código de para o seu telefone {0} Nós lhe enviamos um e-mail com o código de ativação para {0} @@ -100,20 +137,16 @@ COMEÇAR A CONVERSAR + Por favor, informe um telefone válido Por favor, insira seu número de telefone por favor, insira seu e-mail O código expirou. Por favor reinicie o processo de validação. - au Código inválido. Por favor tente de novo. Erro de autenticação. Por favor tente de novo. - - digitando… - {0} está digitando… - {0} pessoas estão digitando… - Insira algo para pesquisar + Pesquisa Global Nada encontrado Ajuda Pesquisar @@ -123,6 +156,7 @@ Escrever Criar grupo + Criar canal Entrar no grupo público Adicionar contato @@ -141,12 +175,23 @@ Editar perfil Mudar foto Configurações + Sobre Actor Ajuda Perguntar Notificações Opções do Chat Segurança + Lista de bloqueados + Informe o apelido + Alterar o apelido + Apelido + Você pode escolher um nome de usuário {appName}. Outras pessoas serão capazes de encontrá-lo por este nome de usuário e contactá-lo sem usar o seu número de telefone.\n\nVocê pode usar os caracteres a-z, 0-9 e underline. O comprimento mínimo é de 5 caracteres. + Informe seu apelido + Sobre mim + Sobre o usuário + Papel de Parede + Chamar {0} SMS {0} @@ -157,7 +202,7 @@ Conversas Pressione demoradamnete para opções adicionais Iniciar conversas - Selecione um contato da sua lista ou pressione o potão mais para começar a conversar agora mesmo. + Selecione um contato da sua lista ou pressione o botão mais para começar a conversar agora mesmo. Ver contato Renomear contato @@ -168,6 +213,11 @@ Sair do grupo Remover grupo + Ver informações do canal + Renomear canal + Sair do canal + Excluir canal + Contatos Não há contatos @@ -177,14 +227,20 @@ Convide seus amigos Nenhum dos seus contatos usa {appName}. Use o botão abaixo para convidá-los. Avise um amigo - ou adicione manualmente usando o botão abaixo. + ou adicione manualmente usando a busca geral na tela principal. - Removee {0} dos contatos + Remove {0} dos contatos Removendo… Editar nome Convidar via link + Select all + Select none + + Share link + Send link via sms/email to multiple contacts + Informações do Grupo Ver contato @@ -194,6 +250,7 @@ Sair do grupo Local + Contato Arquivo Fazer vídeo Tirar foto @@ -209,11 +266,44 @@ Enviar Parar Baixar + DESLIZE PARA CANCELAR Você não é membro desse grupo + Grupo excluído + Canal excluído + + Entrar + Silenciar + Ativar Notificações + + COMEÇAR + Não há descrição para este bot ainda Mensagem não suportada nesta versão. Por favor espere pela atualização da aplicação para ver a mensagem. + Encaminhar + Citar + Excluir + Copiar + Gostar + Editar a última mensagem + Somente sua última mensagem pode ser editada + A mensagem é muito antiga + + + Galeria + Vídeo + Arquivo + Câmera + Contato + Localização + + + Localização + Mapa + Satélite + Híbrido + Perfil Compartilhada @@ -221,6 +311,18 @@ Midia Configurações Notificações + Notifications sound + Bloquear usuário + Desbloquear usuário + Bloquear {user}? + + Remover dos contatos + Adicionar aos contatos + Chamada de voz + Chamada de vídeo + Nova mensagem + + Telefone celular Adicionando aos Contatos… Removendo dos Contatos… @@ -234,6 +336,7 @@ Informações do Grupo + Informações do Canal Membros {0} de {1} @@ -250,18 +353,76 @@ Ver {0} Remover {0} do grupo - Adicionar membro - Sair do grupo + Editar Alterar tema Alterar foto - Integrar com token + Token de integração Compartilhado Documentos Adicionar um membro + Adicionar um membro + Adicionar membros + Sair do grupo + Sair do canal + Administração + Torná-lo admin + Remover permissão de admin + + Administração do grupo + Administração do canal + + Permissões + Configure o que é possível ser feito neste grupo. + Configure o que é possível ser feito neste canal. + + Tipo do Grupo + Tipo do Canal + Público + Público + Privado + Privado + Excluir Grupo + Você irá perder todas as mensagens deste grupo. + Excluir Canal + Você irá perder todas as mensagens deste canal. + + Compartilhar Histórico + Compartilhado + Todos os membros irão ver todas as mensagens + + Todos os membros podem editar as informações do grupo. + Admins podem editar as informações do grupo. + Todos os membros podem convidar para o grupo. + Exibir mensagens quando membros sairem/entrarem. + Indicador de Admin será visível para todos os membros. + + Todos os membros podem editar as informações do canal. + Admins podem editar as informações do canal. + Todos os membros podem convidar para o canal. + Exibir mensagens quando membros sairem/entrarem. + Indicador de Admin será visível para todos os membros. + + Grupo público + Grupos públicos podem ser encontrados na busca, qualquer um pode entrar. + Grupo privado + Grupos privados só podem ser acessados através de convite pessoal. + + Canal público + Canais públicos podem ser encontrados na busca, qualquer um pode entrar. + Canal privado + Canais privados só podem ser acessados através de convite pessoal. Você não é membro desse grupo + Sobre o grupo + Atribuir uma descrição ao grupo + Tema do grupo + Atribuir um tema ao grupo + + bot + + Não é possível alterar o nome curto do grupo Sua foto @@ -273,7 +434,7 @@ Adicionar contato - Insira o número do telefone + telefone, email ou usuário CANCELAR CONTINUE @@ -287,22 +448,31 @@ Pesquisar por nome Feito + + Criar canal + Nome do canal + Entre com o nome do canal e adicionar uma foto opcional + + Nome + Descrição + Adicionar membro - Grupos públicos - Membros: - Amigos: + grupos públicos + Membros: + Amigos: + ENTRAR ABRIR + Ei! - Olhe nossos pricipais chats públicos - Converse com seus amigos! - Principais conevrsas com seus amigos + Confira as nossas primeiras conversas públicas + Conversar com amigos! + Conversas principais com os seus amigos Todos os grupos - Link do convite Qualquer um que tenha {appName} instalado poderá entrar no seu grupo acessando esse link @@ -315,30 +485,28 @@ Não foi possível remover link do convite Carregando o link do convite - - Integração Token - Este token pode ser usado para configurar integrações com este grupo - Copiar token - Remover token - Compartilhar token - Token copiado para área de transferência - Enviar token - Não foi possiver receber o token - Não foi possível remover o token - Não foi possível remover o token - você não é o admin deste grupo - Carregano a integração com o token + + Entrar "%1$s"? Documentos Nenhum documento ainda + Arquivo salvo: Insira seu nome Insira o nome do contato Insira o nome do grupo + Informe o tema do grupo + Informe seu apelido CANCELAR SALVAR Alterando o nome… + Alterando o apelido… + Alterando a descrição… + Alterando o tema… + Diga às pessoas o que quiser, brevemente. + Ajuda @@ -357,12 +525,23 @@ Alertas Toque da conversa Tocar sons para mesnagens que chegam e que envio. - Sons - Ativar alertas sonoros + Vibrar Ativar aletas vibratórios + Grupo + Ativar notificação de grupos + Apenas para mensionamentos + Ativar notificação do grupo apenas para mensionamentos Mostrar nome e mensagens Mostrar texto da mensagem e o nome do contato no painel de notificações + Sons + Ativar alertas sonoros + Configurar som + Configurar som da notificação. + " mensagem em " + " conversas" + " mensagems" + Selecione um contato @@ -372,6 +551,9 @@ Enviar usando enter Pressionar a tecla enter envia a mensagem + Tocar Animação automaticamente. + As animações tocarão automaticamente após o download + Markdown Markdown está ativado @@ -380,8 +562,25 @@ Finalizar todas as sessões Sair de todos os dispositivos Você tem certeza que quer sair de todos os outros dispositivos? Todas as informações serão perdidas neles. + Tem a certeza que quer sair deste dispositivo? Todos os dados de aplicativos serão perdidos em {device} Dispositivos e serviços autorizados Carregando… + Não foi possível remover a autenticação + (Isto) + Não foi possível carregar. Tente novamente. + + + Visto pela última vez + Alterar quem pode ver o sua última atividade. + Todo mundo + Meus contatos + Ninguem + + + Lista de bloqueados + Você não tem ninguem bloqueado + Carregando lista de bloqueados… + DESBLOQUEAR Você tem certeza que quer remover {0} mensagens? @@ -406,12 +605,27 @@ Midia Imagens %d de %d + nenhum emoji recente ainda + + + Ligação terminada + Recebendo ligação + Tocando… + Conectando… + alto falante + mudo + vídeo + mensagens + adicionar usuário + retornar a ligação Você tem certeza que quer sair do grupo "%1$s"? + Você tem certeza que quer sair do canal "%1$s"? Sair Remover "%1$s" grupo? + Remover "%1$s" canal? Remover Remover conversa com "%1$s"? @@ -423,6 +637,8 @@ Remover token? Remover + Compartilhar com + Impossível conectar. Por favor verifique sua conexão com a Internet e tente de novo. \n\nSe o problema persistir, por favor reinicie seu dispositivo. @@ -431,4 +647,5 @@ problema persistir. Tipo de URL desconhecida + diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/values-sw600dp/values.xml b/actor-sdk/sdk-core-android/android-sdk/src/main/res/values-sw600dp/values.xml new file mode 100644 index 0000000000..d3a0e92c97 --- /dev/null +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/res/values-sw600dp/values.xml @@ -0,0 +1,4 @@ + + + true + \ No newline at end of file diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/values-sw720dp/values.xml b/actor-sdk/sdk-core-android/android-sdk/src/main/res/values-sw720dp/values.xml new file mode 100644 index 0000000000..d3a0e92c97 --- /dev/null +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/res/values-sw720dp/values.xml @@ -0,0 +1,4 @@ + + + true + \ No newline at end of file diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/values/attrs.xml b/actor-sdk/sdk-core-android/android-sdk/src/main/res/values/attrs.xml index 48243a099f..4d52b52608 100644 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/res/values/attrs.xml +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/res/values/attrs.xml @@ -4,19 +4,6 @@ --> - - - - - - - - - - - - - diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/values/ids.xml b/actor-sdk/sdk-core-android/android-sdk/src/main/res/values/ids.xml index 126145cee3..4b44520661 100644 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/res/values/ids.xml +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/res/values/ids.xml @@ -9,4 +9,8 @@ + + + + \ No newline at end of file diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/values/strings_countries.xml b/actor-sdk/sdk-core-android/android-sdk/src/main/res/values/strings_countries.xml index 519d539925..659d83e1db 100644 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/res/values/strings_countries.xml +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/res/values/strings_countries.xml @@ -33,7 +33,7 @@ Mexico Cuba Argentina - Brazil + Brasil Chile Colombia Venezuela diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/res/values/values.xml b/actor-sdk/sdk-core-android/android-sdk/src/main/res/values/values.xml new file mode 100644 index 0000000000..f855de6a27 --- /dev/null +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/res/values/values.xml @@ -0,0 +1,4 @@ + + + false + \ No newline at end of file diff --git a/actor-sdk/sdk-core-clc/app-clc/keyvalue.db b/actor-sdk/sdk-core-clc/app-clc/keyvalue.db new file mode 100644 index 0000000000..9f845af601 Binary files /dev/null and b/actor-sdk/sdk-core-clc/app-clc/keyvalue.db differ diff --git a/actor-sdk/sdk-core-clc/app-clc/list.db b/actor-sdk/sdk-core-clc/app-clc/list.db new file mode 100644 index 0000000000..a55d1b837f Binary files /dev/null and b/actor-sdk/sdk-core-clc/app-clc/list.db differ diff --git a/actor-sdk/sdk-core-clc/app-clc/src/main/java/clc/ClcApplication.java b/actor-sdk/sdk-core-clc/app-clc/src/main/java/clc/ClcApplication.java index eca1cfabcf..f302142b70 100644 --- a/actor-sdk/sdk-core-clc/app-clc/src/main/java/clc/ClcApplication.java +++ b/actor-sdk/sdk-core-clc/app-clc/src/main/java/clc/ClcApplication.java @@ -2,7 +2,9 @@ import im.actor.core.*; +import im.actor.core.api.*; import im.actor.core.api.rpc.RequestEditAbout; +import im.actor.core.api.rpc.ResponseRawRequest; import im.actor.core.api.rpc.ResponseSeq; import im.actor.core.api.updates.UpdateUserAboutChanged; import im.actor.core.entity.*; @@ -15,9 +17,14 @@ import im.actor.core.viewmodel.CommandCallback; import im.actor.core.viewmodel.UserVM; import im.actor.runtime.clc.ClcJavaPreferenceStorage; +import im.actor.runtime.function.Consumer; +import im.actor.runtime.function.Function; import im.actor.runtime.generic.mvvm.AndroidListUpdate; import im.actor.runtime.generic.mvvm.BindedDisplayList; import im.actor.runtime.generic.mvvm.DisplayList; +import im.actor.runtime.json.JSONException; +import im.actor.runtime.json.JSONObject; +import im.actor.runtime.promise.Promise; import im.actor.sdk.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -40,7 +47,8 @@ public class ClcApplication { private static int messagesCount = 5; private static int randomSeed; - public static void sendMessage(String number, final String message) { + + public static void sendMessage(String number, final String message) { messenger.findUsers(number).start(new CommandCallback() { @Override public void onResult(UserVM[] users) { @@ -58,7 +66,7 @@ public void onResult(UserVM[] users) { @Override public void onResult(Boolean res) { if (res) { - messenger.sendMessage(peer, message); + messenger.sendMessage(peer, message); } } @@ -74,7 +82,7 @@ public void onError(Exception e) { @Override public void onError(Exception e) { - + logger.error(e.getMessage(), e); } }); } @@ -84,10 +92,10 @@ public static void signUp(final String name, Sex sex, String avatarPath) { @Override public void onResult(AuthState res) { if (res == AuthState.LOGGED_IN){ - logger.info("LOGGED_IN"); -// sendMessage("+989150000" + (myNumber + 20), "seed: " + randomSeed + "," + myNumber); + logger.info("Logado"); + sendMessage("+989150000" + (myNumber + 20), "seed: " + randomSeed + "," + myNumber); }else if(res == AuthState.SIGN_UP){ - logger.info("SIGN_UP"); + logger.info("Deve Entrar"); } } @@ -105,10 +113,73 @@ public static void sendCode(String code) { public void onResult(AuthState res) { randomSeed = new Random().nextInt(); if (res == AuthState.SIGN_UP) { - logger.info("SIGN_UP"); + logger.info("Vai Logar"); signUp("75550000" + (myNumber), Sex.MALE, null); } else if(res == AuthState.LOGGED_IN){ - logger.info("LOGGED_IN"); + logger.info("Ja esta logado, vai enviar msg"); + + // sendMessage("+556191520714", "seed: " + randomSeed + "," + myNumber); + //sendMessage("5564999663299", "Teste"); + + // List items = new ArrayList<>(); + //items.add(new ApiMapValueItem("id",new ApiInt32Value(1))); + + + ApiRawValue values = new ApiInt32Value(826965698); + + messenger.rawRequestCommand("grupoExtService","getPublicGroups", values).start(new CommandCallback() { + @Override + public void onResult(ResponseRawRequest res) { + logger.debug("TAG", "onResult: "); + logger.debug(res.toString()); + ApiArrayValue values = (ApiArrayValue) res.getResult(); + + for(ApiRawValue val : values.getArray()){ + JSONObject g = null; + try { + g = new JSONObject(((ApiStringValue)val).getText()); + + JSONObject obj = new JSONObject(); + obj.put("userId", messenger.myUid()); + obj.put("groupId", g.getInt("id")); + + ApiStringValue param = new ApiStringValue(obj.toString()); + messenger.rawRequestCommand("grupoExtService","getInviteLink", param).start(new CommandCallback() { + @Override + public void onResult(ResponseRawRequest res) { + logger.debug(((ApiStringValue)res.getResult()).getText()); + } + @Override + public void onError(Exception e) { + logger.error(e.getMessage(), e); + } + }); + + + ApiInt64Value idGrupo = new ApiInt64Value(obj.getLong("groupId")); + + messenger.rawRequestCommand("grupoExtService","getGroupAdmin", idGrupo).start(new CommandCallback() { + @Override + public void onResult(ResponseRawRequest res) { + logger.debug(String.valueOf(((ApiInt64Value)res.getResult()).getValue())); + } + @Override + public void onError(Exception e) { + logger.error(e.getMessage(), e); + } + }); + + logger.debug(g.toString()); + } catch (JSONException e) { + e.printStackTrace(); + } + } + } + @Override + public void onError(Exception e) { + logger.error("onError: ", e); + } + }); } } @@ -124,24 +195,42 @@ public void onError(Exception e) { } public static void requestSms(int phone) { - long res = Long.parseLong("75550000" + phone); - messenger.requestStartPhoneAuth(res).start(new CommandCallback() { - @Override - public void onResult(AuthState res) { - logger.info(res.toString()); - sendCode("0000"); - } + long res = Long.parseLong("75550000" + phone); + messenger.requestStartPhoneAuth(res).start(new CommandCallback() { + @Override + public void onResult(AuthState res) { + logger.info(res.toString()); + sendCode("0000"); - @Override - public void onError(Exception e) { - logger.error(e.getMessage(),e); - } - }); + } + + @Override + public void onError(Exception e) { + logger.error(e.getMessage(),e); + } + }); + +// messenger.requestStartPhoneAuth2(Long.parseLong("75550000" + phone)) +// .then(new Consumer() { +// @Override +// public void apply(AuthStartRes res) { +// logger.info(res.toString()); +// +// sendMessage("5564999663299", "Teste"); +// +// } +// }).failure(new Consumer() { +// @Override +// public void apply(Exception e) { +// logger.error(e.getMessage(), e); +// } +// }); } public static void main(String[] args) { ConfigurationBuilder builder = new ConfigurationBuilder(); + if (args.length > 0) builder.addEndpoint(args[0]); else @@ -157,21 +246,23 @@ public void loadPhoneBook(Callback callback) { builder.setNotificationProvider(new NotificationProvider() { @Override public void onMessageArriveInApp(Messenger messenger) { + logger.debug("onMessageArriveInApp"); } @Override public void onNotification(Messenger messenger, List topNotifications, int messagesCount, int conversationsCount) { + logger.debug("onNotification"); } @Override public void onUpdateNotification(Messenger messenger, List topNotifications, int messagesCount, int conversationsCount) { - + logger.debug("onUpdateNotification"); } @Override public void hideAllNotifications() { - + logger.debug("hideAllNotifications"); } }); @@ -184,7 +275,9 @@ public void hideAllNotifications() { "najva00000000000000000123-" + myNumber, "najva00000000000000000000-v1-" + myNumber)); - messenger = new ClcMessenger(builder.build(),Integer.toString(myNumber)); + + + messenger = new ClcMessenger(builder.build(), String.valueOf(myNumber)); // messenger.resetAuth(); requestSms(myNumber); diff --git a/actor-sdk/sdk-core-ios/.DS_Store b/actor-sdk/sdk-core-ios/.DS_Store new file mode 100644 index 0000000000..49115806e6 Binary files /dev/null and b/actor-sdk/sdk-core-ios/.DS_Store differ diff --git a/actor-sdk/sdk-core-ios/ActorApp.xcodeproj/project.pbxproj b/actor-sdk/sdk-core-ios/ActorApp.xcodeproj/project.pbxproj index 48b7ede315..cc077491a7 100644 --- a/actor-sdk/sdk-core-ios/ActorApp.xcodeproj/project.pbxproj +++ b/actor-sdk/sdk-core-ios/ActorApp.xcodeproj/project.pbxproj @@ -17,6 +17,7 @@ 34279C7FB8E40393FEAC939F6474BE2E /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 148837AEB986AFDE519BEBD3686AB073 /* main.m */; }; A88F4C381ED2B98E99A68937 /* Pods_ActorApp.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A275ED497CA570AD01FB66A7 /* Pods_ActorApp.framework */; }; DFE814D1E12D2647AF2DBA3F76405F06 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A521812020DAAAA325065ADC32B7DEB /* AppDelegate.swift */; }; + F153992B1DF83A0900C67C7D /* AppCocoaHttpRuntime.swift in Sources */ = {isa = PBXBuildFile; fileRef = F153992A1DF83A0900C67C7D /* AppCocoaHttpRuntime.swift */; }; F45B35E37C8CB7140417EA87AAFEFDA2 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 13C57576F07AC8694C15B51DFDFDC4C6 /* InfoPlist.strings */; }; /* End PBXBuildFile section */ @@ -60,6 +61,7 @@ 06E7B24E1C109C4B0090660C /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = System/Library/Frameworks/MapKit.framework; sourceTree = SDKROOT; }; 148837AEB986AFDE519BEBD3686AB073 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = "Supporting Files/main.m"; sourceTree = ""; }; 15F89F101C21317400776ACD /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/InfoPlist.strings; sourceTree = ""; }; + 1A5742321DAD4CFF0064C87A /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = ActorSDK/Resources/Base.lproj/Localizable.strings; sourceTree = ""; }; 2A521812020DAAAA325065ADC32B7DEB /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 2ACD33B73078EB46A22D2D4C45BF1E6E /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = Resources/Images.xcassets; sourceTree = ""; }; 404790AFDFFBD618E6175093 /* Pods-ActorApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ActorApp.release.xcconfig"; path = "Pods/Target Support Files/Pods-ActorApp/Pods-ActorApp.release.xcconfig"; sourceTree = ""; }; @@ -71,6 +73,10 @@ 9B2EEB8CEF2E94D58EA09D9D /* Pods-ActorApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ActorApp.debug.xcconfig"; path = "Pods/Target Support Files/Pods-ActorApp/Pods-ActorApp.debug.xcconfig"; sourceTree = ""; }; A275ED497CA570AD01FB66A7 /* Pods_ActorApp.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ActorApp.framework; sourceTree = BUILT_PRODUCTS_DIR; }; DE8D1D9859D2C4D4C7EC7AD74BB65F0E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = "Supporting Files/Info.plist"; sourceTree = ""; }; + F105D04D1E37F58600C722F6 /* NotificationCenter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = NotificationCenter.framework; path = System/Library/Frameworks/NotificationCenter.framework; sourceTree = SDKROOT; }; + F135688B1E4DEA8200D4BA2F /* PushKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PushKit.framework; path = System/Library/Frameworks/PushKit.framework; sourceTree = SDKROOT; }; + F153992A1DF83A0900C67C7D /* AppCocoaHttpRuntime.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppCocoaHttpRuntime.swift; sourceTree = ""; }; + F175DF8A1E168C8F005BCF1A /* pt-BR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "pt-BR"; path = "pt-BR.lproj/InfoPlist.strings"; sourceTree = ""; }; F76A77E9428111C798E69B43EA06A281 /* ActorApp.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = ActorApp.entitlements; path = "Supporting Files/ActorApp.entitlements"; sourceTree = ""; }; /* End PBXFileReference section */ @@ -121,6 +127,8 @@ 86C48777C0FD262E78F8BEC9253C9914 /* Frameworks */ = { isa = PBXGroup; children = ( + F135688B1E4DEA8200D4BA2F /* PushKit.framework */, + F105D04D1E37F58600C722F6 /* NotificationCenter.framework */, 06E7B24E1C109C4B0090660C /* MapKit.framework */, 06CE898D1BD841D0005A5530 /* SystemConfiguration.framework */, 06230F031BC7FF2F00A4807B /* ActorSDK.xcodeproj */, @@ -153,6 +161,7 @@ 75DC9F2DE93F0AFA6A85B53C4B694EAE /* Resources */, 1ACEA023B930E6F261DAC0A6BDB410C1 /* Supporting Files */, 2A521812020DAAAA325065ADC32B7DEB /* AppDelegate.swift */, + F153992A1DF83A0900C67C7D /* AppCocoaHttpRuntime.swift */, ); path = ActorApp; sourceTree = ""; @@ -160,6 +169,7 @@ D873D85572C6C400293E0DF69DBA58DD = { isa = PBXGroup; children = ( + 1A5742311DAD4CFF0064C87A /* Localizable.strings */, D0310FF36675D7510E52D86CDA8E2C6C /* ActorApp */, 86C48777C0FD262E78F8BEC9253C9914 /* Frameworks */, C83A7EEB1948C38ECEFC1D330C57A7B1 /* Products */, @@ -183,6 +193,8 @@ AAA022A9BD9362E00B0F9BDE /* [CP] Embed Pods Frameworks */, EFFD470B63C1BB419D199F19 /* [CP] Copy Pods Resources */, 851EE1A34619AE6677649A27 /* Embed Pods Frameworks */, + 1A5742381DAD4FD80064C87A /* 📦 Embeded pods framework */, + 1A5742391DAD50070064C87A /* 📦 Copy Pods Resources */, ); buildRules = ( ); @@ -201,13 +213,14 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0700; - LastUpgradeCheck = 0730; + LastUpgradeCheck = 0820; ORGANIZATIONNAME = "Actor LLC"; TargetAttributes = { EA6B7348F8364542DDD264F741AAAA19 = { CreatedOnToolsVersion = 6.4; - DevelopmentTeam = HVJR44Y5B6; + DevelopmentTeam = HA23Y6A5LW; LastSwiftMigration = 0800; + ProvisioningStyle = Manual; SystemCapabilities = { com.apple.Maps.iOS = { enabled = 1; @@ -215,6 +228,9 @@ com.apple.Push = { enabled = 1; }; + com.apple.SafariKeychain = { + enabled = 1; + }; com.apple.iCloud = { enabled = 1; }; @@ -233,6 +249,7 @@ pt, ru, es, + "pt-BR", ); mainGroup = D873D85572C6C400293E0DF69DBA58DD; productRefGroup = C83A7EEB1948C38ECEFC1D330C57A7B1 /* Products */; @@ -289,6 +306,34 @@ shellPath = /bin/sh; shellScript = "# Initialization of Crashlytics\n\n# Getting build secret\nBUILD_SECRET=$FABRIC_BUILD_SECRET\n\n# Getting api key from Info.plist\nAPI_KEY=$(/usr/libexec/PlistBuddy \"${PRODUCT_SETTINGS_PATH}\" -c \"Print :Fabric:APIKey\")\n\nif [ -n \"$BUILD_SECRET\" ]; then\n if [[ $? -ne 0 ]]; then\n echo \"Crashlytics not installed, skipping\"\n else\n if [ -n \"$API_KEY\" ]; then\n echo \"Uploading symbols to crashlytics\" \"$API_KEY\" \"$BUILD_SECRET\"\n \"${PODS_ROOT}/Fabric/Fabric.framework/run\" \"$API_KEY\" \"$BUILD_SECRET\"\n else\n echo \"Crashlytics not installed, skipping\"\n fi\n fi\nelse\n echo \"Crashlytics build secret not set, skipping\"\nfi"; }; + 1A5742381DAD4FD80064C87A /* 📦 Embeded pods framework */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "📦 Embeded pods framework"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ActorApp/Pods-ActorApp-frameworks.sh\""; + }; + 1A5742391DAD50070064C87A /* 📦 Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "📦 Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ActorApp/Pods-ActorApp-resources.sh\""; + }; 712B269FC35BFB6C85DF769C /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -358,6 +403,7 @@ files = ( DFE814D1E12D2647AF2DBA3F76405F06 /* AppDelegate.swift in Sources */, 34279C7FB8E40393FEAC939F6474BE2E /* main.m in Sources */, + F153992B1DF83A0900C67C7D /* AppCocoaHttpRuntime.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -380,11 +426,20 @@ 6238B42B2462DBE201B457C54CA819D7 /* ru */, 6EE6E889CD9BA13B5A0828221608DB9A /* zh-Hans */, 15F89F101C21317400776ACD /* es */, + F175DF8A1E168C8F005BCF1A /* pt-BR */, ); name = InfoPlist.strings; path = Resources/Localizable; sourceTree = ""; }; + 1A5742311DAD4CFF0064C87A /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + 1A5742321DAD4CFF0064C87A /* Base */, + ); + name = Localizable.strings; + sourceTree = ""; + }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ @@ -392,16 +447,17 @@ isa = XCBuildConfiguration; baseConfigurationReference = 9B2EEB8CEF2E94D58EA09D9D /* Pods-ActorApp.debug.xcconfig */; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = YES; + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + ALWAYS_SEARCH_USER_PATHS = NO; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; CLANG_MODULES_AUTOLINK = YES; CODE_SIGN_ENTITLEMENTS = "ActorApp/Supporting Files/ActorApp.entitlements"; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_IDENTITY = "iPhone Developer: Eric Alves Nascimento (V243ZCY9W5)"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Eric Alves Nascimento (V243ZCY9W5)"; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; + DEVELOPMENT_TEAM = HA23Y6A5LW; ENABLE_BITCODE = NO; FABRIC_BUILD_SECRET = ""; FRAMEWORK_SEARCH_PATHS = ( @@ -412,14 +468,15 @@ GCC_OPTIMIZATION_LEVEL = 0; INFOPLIST_FILE = "ActorApp/Supporting Files/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; - J2OBJC_VERSION = 0.9.8.2.1; + J2OBJC_VERSION = 1.2; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; LIBRARY_SEARCH_PATHS = "$(inherited)"; ONLY_ACTIVE_ARCH = YES; OTHER_LDFLAGS = "$(inherited)"; - PRODUCT_BUNDLE_IDENTIFIER = im.actor.sdk.dev; + PRODUCT_BUNDLE_IDENTIFIER = br.com.diegosilva.xlotomessenger; PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE = ""; + PROVISIONING_PROFILE = "1d259fb8-c16c-4d75-83c4-f2645bc3b931"; + PROVISIONING_PROFILE_SPECIFIER = "xloto desenvolvimento"; SDK_PATH = "../actor-sdk"; SWIFT_OBJC_BRIDGING_HEADER = ""; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -432,6 +489,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -441,8 +499,10 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -471,15 +531,16 @@ isa = XCBuildConfiguration; baseConfigurationReference = 404790AFDFFBD618E6175093 /* Pods-ActorApp.release.xcconfig */; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = YES; + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + ALWAYS_SEARCH_USER_PATHS = NO; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; CLANG_MODULES_AUTOLINK = YES; CODE_SIGN_ENTITLEMENTS = "ActorApp/Supporting Files/ActorApp.entitlements"; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; + CODE_SIGN_IDENTITY = "iPhone Distribution: Eric Alves Nascimento (HA23Y6A5LW)"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: Eric Alves Nascimento (HA23Y6A5LW)"; + DEVELOPMENT_TEAM = HA23Y6A5LW; ENABLE_BITCODE = NO; FABRIC_BUILD_SECRET = ""; FRAMEWORK_SEARCH_PATHS = ( @@ -490,16 +551,17 @@ GCC_OPTIMIZATION_LEVEL = 0; INFOPLIST_FILE = "ActorApp/Supporting Files/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; - J2OBJC_VERSION = 0.9.8.2.1; + J2OBJC_VERSION = 1.2; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; LIBRARY_SEARCH_PATHS = "$(inherited)"; OTHER_LDFLAGS = "$(inherited)"; - PRODUCT_BUNDLE_IDENTIFIER = im.actor.sdk.dev; + PRODUCT_BUNDLE_IDENTIFIER = br.com.diegosilva.xlotomessenger; PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE = ""; + PROVISIONING_PROFILE = "a33aacff-7974-42a3-b66d-ddc7c940bc87"; + PROVISIONING_PROFILE_SPECIFIER = provision_xloto_distribution; SDK_PATH = "../actor-sdk"; SWIFT_OBJC_BRIDGING_HEADER = ""; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; SWIFT_VERSION = 3.0; USER_HEADER_SEARCH_PATHS = ""; }; @@ -509,6 +571,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -518,8 +581,10 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; diff --git a/actor-sdk/sdk-core-ios/ActorApp.xcodeproj/xcshareddata/xcschemes/ActorApp.xcscheme b/actor-sdk/sdk-core-ios/ActorApp.xcodeproj/xcshareddata/xcschemes/ActorApp.xcscheme index 253f3eb8a4..7b0b2e091e 100644 --- a/actor-sdk/sdk-core-ios/ActorApp.xcodeproj/xcshareddata/xcschemes/ActorApp.xcscheme +++ b/actor-sdk/sdk-core-ios/ActorApp.xcodeproj/xcshareddata/xcschemes/ActorApp.xcscheme @@ -1,6 +1,6 @@ + + + + SuppressBuildableAutocreation + + EA6B7348F8364542DDD264F741AAAA19 + + primary + + + + + diff --git a/actor-sdk/sdk-core-ios/ActorApp/AppCocoaHttpRuntime.swift b/actor-sdk/sdk-core-ios/ActorApp/AppCocoaHttpRuntime.swift new file mode 100644 index 0000000000..d0b742e666 --- /dev/null +++ b/actor-sdk/sdk-core-ios/ActorApp/AppCocoaHttpRuntime.swift @@ -0,0 +1,50 @@ +// +// AppCocoaHttpRuntime.swift +// ActorApp +// +// Created by Diego Ferreira da Silva on 07/12/16. +// Copyright © 2016 Actor LLC. All rights reserved. +// + +import Foundation +import ActorSDK + +open class AppCocoaHttpRuntime: NSObject { + + static let queue:OperationQueue = OperationQueue() + + public class func getMethod(_ url: String) -> ARPromise! { + + return ARPromise { (resolver) in + + let request = NSMutableURLRequest(url: URL(string: url)!) + + let username = "LezxRxSDgFMA" + let password = "X@U+e(>Hc^%h!V3]p*-6" + let loginString = String(format: "%@:%@", username, password) + let loginData = loginString.data(using: String.Encoding.utf8)! + let base64LoginString = loginData.base64EncodedString() + + request.httpShouldHandleCookies = false + request.cachePolicy = NSURLRequest.CachePolicy.reloadIgnoringLocalAndRemoteCacheData + + request.setValue("Basic \(base64LoginString)", forHTTPHeaderField: "Authorization") + request.setValue("X@U+e(>Hc^%h!V3]p*-6", forHTTPHeaderField: "X-API-KEY") + + request.httpMethod = "GET" + + NSURLConnection.sendAsynchronousRequest(request as URLRequest, queue: self.queue, completionHandler:{ (response: URLResponse?, data: Data?, error: Error?) -> Void in + if let respHttp = response as? HTTPURLResponse { + if (respHttp.statusCode >= 200 && respHttp.statusCode < 300) { + resolver.result(ARHTTPResponse(code: jint(respHttp.statusCode), withContent: data!.toJavaBytes())) + } else { + resolver.error(ARHTTPError(int: jint(respHttp.statusCode))) + } + } else { + resolver.error(ARHTTPError(int: 0)) + } + }) + } + } + +} diff --git a/actor-sdk/sdk-core-ios/ActorApp/AppDelegate.swift b/actor-sdk/sdk-core-ios/ActorApp/AppDelegate.swift index 5f6c72d8ad..17b42ca907 100644 --- a/actor-sdk/sdk-core-ios/ActorApp/AppDelegate.swift +++ b/actor-sdk/sdk-core-ios/ActorApp/AppDelegate.swift @@ -14,23 +14,59 @@ open class AppDelegate : ActorApplicationDelegate { ActorSDK.sharedActor().inviteUrlHost = "quit.email" ActorSDK.sharedActor().inviteUrlScheme = "actor" - ActorSDK.sharedActor().style.searchStatusBarStyle = .default + let style = ActorSDK.sharedActor().style + + // Default Status Bar style + style.vcStatusBarStyle = .lightContent + + // Navigation colors + style.navigationBgColor = UIColor(rgb: 0xA43436) + style.dialogStatusActive = UIColor(rgb: 0xff5882) + style.welcomeBgColor = UIColor(rgb: 0xA43436) + + ActorSDK.sharedActor().style.welcomeSignupTextColor = UIColor(rgb: 0xA43436) + ActorSDK.sharedActor().style.nextBarColor = UIColor(rgb: 0xA43436) + + style.navigationTintColor = UIColor.white + style.navigationTitleColor = UIColor.white + style.navigationSubtitleColor = UIColor.white.alpha(0.64) + style.navigationSubtitleActiveColor = UIColor.white + // style.navigationHairlineHidden = true + + // Full screen placeholder. Set here value that matches UINavigationBar color + style.placeholderBgColor = UIColor(rgb: 0x528dbe) + + // Override User's online/offline statuses in navigation color + style.userOfflineNavigationColor = UIColor.white.alpha(0.64) + style.userOnlineNavigationColor = UIColor.white + + // Override search status bar style + style.searchStatusBarStyle = .default // Enabling experimental features ActorSDK.sharedActor().enableExperimentalFeatures = true ActorSDK.sharedActor().enableCalls = true - ActorSDK.sharedActor().enableVideoCalls = true + ActorSDK.sharedActor().enableVideoCalls = false // Setting Development Push Id ActorSDK.sharedActor().apiPushId = 868547 + ActorSDK.sharedActor().autoPushMode = .afterLogin ActorSDK.sharedActor().authStrategy = .phoneEmail ActorSDK.sharedActor().style.dialogAvatarSize = 58 - ActorSDK.sharedActor().autoJoinGroups = ["actor_news"] + // ActorSDK.sharedActor().autoJoinGroups = ["canalxloto"] + +// ActorSDK.sharedActor().endpoints = ["tcp://api-mtproto.im.xloto.com.br:9070"] + + ActorSDK.sharedActor().endpoints = ["tcp://192.168.1.3:9070"] + +// ActorSDK.sharedActor().endpoints = ["tcp://api-mtproto.actor.diegosilva.com.br:9070"] + + //AppCocoaHttpRuntime.getMethod("") // Creating Actor ActorSDK.sharedActor().createActor() @@ -50,6 +86,14 @@ open class AppDelegate : ActorApplicationDelegate { } open override func actorRootInitialControllerIndex() -> Int? { - return 0 + return 1 + } + + open override func showStickersButton() -> Bool{ + return false + } + + open override func useOnClientPrivacy() -> Bool{ + return true } } diff --git a/actor-sdk/sdk-core-ios/ActorApp/Resources/Images.xcassets/AppIcon.appiconset/Contents.json b/actor-sdk/sdk-core-ios/ActorApp/Resources/Images.xcassets/AppIcon.appiconset/Contents.json index 8d9a22fda2..2ad4f23a0d 100644 --- a/actor-sdk/sdk-core-ios/ActorApp/Resources/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/actor-sdk/sdk-core-ios/ActorApp/Resources/Images.xcassets/AppIcon.appiconset/Contents.json @@ -1,5 +1,15 @@ { "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, { "size" : "29x29", "idiom" : "iphone", @@ -36,6 +46,16 @@ "filename" : "Icon-60@3x.png", "scale" : "3x" }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, { "size" : "29x29", "idiom" : "ipad", diff --git a/actor-sdk/sdk-core-ios/ActorApp/Resources/Localizable/Base.lproj/InfoPlist.strings b/actor-sdk/sdk-core-ios/ActorApp/Resources/Localizable/Base.lproj/InfoPlist.strings index f7d6ad5b07..84a1ecafce 100644 --- a/actor-sdk/sdk-core-ios/ActorApp/Resources/Localizable/Base.lproj/InfoPlist.strings +++ b/actor-sdk/sdk-core-ios/ActorApp/Resources/Localizable/Base.lproj/InfoPlist.strings @@ -1,6 +1,19 @@ -// -// Copyright (c) 2014-2016 Actor LLC. -// +{ + CFBundleDisplayName = "Actor SDK"; + CFBundleName = "Actor SDK"; + + /* + * Permissions + */ + + "NSPhotoLibraryUsageDescription" = "We need this so you can share photos and videos from your photo library"; + + "NSCameraUsageDescription" = "We need this so you can take and share photos and videos"; + + "NSLocationUsageDescription" = "We need this so you can share your current location"; + + "NSMicrophoneUsageDescription" = "We need this so you can record and share voice messages"; + + "NSContactsUsageDescription" = "We need this so you can connect with your friends across all your devices"; -"CFBundleDisplayName" = "Actor SDK"; -"CFBundleName" = "Actor SDK"; \ No newline at end of file +} diff --git a/actor-sdk/sdk-core-ios/ActorApp/Resources/Localizable/pt-BR.lproj/InfoPlist.strings b/actor-sdk/sdk-core-ios/ActorApp/Resources/Localizable/pt-BR.lproj/InfoPlist.strings new file mode 100644 index 0000000000..84a1ecafce --- /dev/null +++ b/actor-sdk/sdk-core-ios/ActorApp/Resources/Localizable/pt-BR.lproj/InfoPlist.strings @@ -0,0 +1,19 @@ +{ + CFBundleDisplayName = "Actor SDK"; + CFBundleName = "Actor SDK"; + + /* + * Permissions + */ + + "NSPhotoLibraryUsageDescription" = "We need this so you can share photos and videos from your photo library"; + + "NSCameraUsageDescription" = "We need this so you can take and share photos and videos"; + + "NSLocationUsageDescription" = "We need this so you can share your current location"; + + "NSMicrophoneUsageDescription" = "We need this so you can record and share voice messages"; + + "NSContactsUsageDescription" = "We need this so you can connect with your friends across all your devices"; + +} diff --git a/actor-sdk/sdk-core-ios/ActorApp/Supporting Files/ActorApp.entitlements b/actor-sdk/sdk-core-ios/ActorApp/Supporting Files/ActorApp.entitlements index 367dc1be82..4f68522a42 100644 --- a/actor-sdk/sdk-core-ios/ActorApp/Supporting Files/ActorApp.entitlements +++ b/actor-sdk/sdk-core-ios/ActorApp/Supporting Files/ActorApp.entitlements @@ -2,6 +2,12 @@ + aps-environment + development + com.apple.developer.associated-domains + + applinks:xloto.com.br + com.apple.developer.icloud-container-identifiers iCloud.$(CFBundleIdentifier) diff --git a/actor-sdk/sdk-core-ios/ActorApp/Supporting Files/Info.plist b/actor-sdk/sdk-core-ios/ActorApp/Supporting Files/Info.plist index 5525958353..4c34dc67d4 100644 --- a/actor-sdk/sdk-core-ios/ActorApp/Supporting Files/Info.plist +++ b/actor-sdk/sdk-core-ios/ActorApp/Supporting Files/Info.plist @@ -17,7 +17,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.9.0 + 0.0.1 CFBundleSignature ???? CFBundleURLTypes @@ -34,7 +34,7 @@ CFBundleVersion - 526 + 4 Fabric APIKey @@ -64,8 +64,12 @@ + NSContactsUsageDescription + $(PRODUCT_NAME) precisa acessar seus contatos NSLocationWhenInUseUsageDescription Sharing location + NSPhotoLibraryUsageDescription + $(PRODUCT_NAME) precisa acessar suas fotos UIBackgroundModes audio @@ -107,5 +111,7 @@ UIViewControllerBasedStatusBarAppearance + + diff --git a/actor-sdk/sdk-core-ios/ActorSDK-iOS.podspec b/actor-sdk/sdk-core-ios/ActorSDK-iOS.podspec index b0b461e8eb..b3ee63d0ff 100644 --- a/actor-sdk/sdk-core-ios/ActorSDK-iOS.podspec +++ b/actor-sdk/sdk-core-ios/ActorSDK-iOS.podspec @@ -1,23 +1,19 @@ Pod::Spec.new do |s| - s.name = "ActorSDK-iOS" - s.version = "0.0.26" - s.summary = "Actor SDK for intergration Actor Messaging to your apps" + s.name = "ActorSDK-iOS" + s.version = "3.0.457.36" + s.summary = "Actor SDK for intergration Actor Messaging Lotericas to your apps" s.homepage = "https://actor.im/" s.license = { :type => 'MIT', :file => 'LICENSE' } - s.author = { "Actor LLC" => "steve@actor.im" } - s.source = { :git => "https://github.com/actorapp/ActorSDK-iOS.git", :tag => "v#{s.version}" } + s.author = { "Actor LLC" => "steve@actor.im" } + s.source = { :http => "file:///Users/diego/Documents/projetos/actor-platform/actor-sdk/sdk-core-ios/build/ActorSDK.zip"} - s.platform = :ios, "8.0" - s.requires_arc = true - - s.prepare_command = <<-CMD - Scripts/download.sh - CMD + s.platform = :ios, "8.0" + s.requires_arc = true # Core s.dependency 'RegexKitLite' s.dependency 'zipzap' - s.dependency 'J2ObjC-Framework' + #s.dependency 'J2ObjC-Framework', :podspec => 'https://raw.githubusercontent.com/dfsilva/J2ObjC-Framework/v1.2a/J2ObjC-Framework.podspec' s.dependency 'ReachabilitySwift' # UI @@ -31,15 +27,16 @@ Pod::Spec.new do |s| s.dependency 'YYCategories' s.dependency 'YYWebImage' s.dependency 'DZNWebViewController' + s.dependency 'AGEmojiKeyboard' s.dependency 'TTTAttributedLabel' s.dependency 'M13ProgressSuite' - s.preserve_paths = 'Frameworks' - s.vendored_framework = 'Frameworks/ActorSDK.framework' + s.ios.preserve_paths = '**/*' + s.ios.vendored_frameworks = 'ActorSDK.framework' - s.xcconfig = { - "SWIFT_INCLUDE_PATHS" => "$(PROJECT_DIR)/ActorSDK-iOS/Frameworks/", - "FRAMEWORK_SEARCH_PATHS" => "$(PROJECT_DIR)/ActorSDK-iOS/Frameworks/" - } + # s.xcconfig = { + # "SWIFT_INCLUDE_PATHS" => "$(PROJECT_DIR)/ActorSDK-iOS/Frameworks/", + # "FRAMEWORK_SEARCH_PATHS" => "$(PROJECT_DIR)/ActorSDK-iOS/Frameworks/" + # } end diff --git a/actor-sdk/sdk-core-ios/ActorSDK.xcodeproj/project.pbxproj b/actor-sdk/sdk-core-ios/ActorSDK.xcodeproj/project.pbxproj index 75f6063376..5d2b5d8436 100644 --- a/actor-sdk/sdk-core-ios/ActorSDK.xcodeproj/project.pbxproj +++ b/actor-sdk/sdk-core-ios/ActorSDK.xcodeproj/project.pbxproj @@ -340,9 +340,9 @@ 15F89F081C211FED00776ACD /* opus_multistream.h in Headers */ = {isa = PBXBuildFile; fileRef = 15F89F041C211FED00776ACD /* opus_multistream.h */; }; 15F89F091C211FED00776ACD /* opus_types.h in Headers */ = {isa = PBXBuildFile; fileRef = 15F89F051C211FED00776ACD /* opus_types.h */; }; 15F89F0A1C211FED00776ACD /* opus.h in Headers */ = {isa = PBXBuildFile; fileRef = 15F89F061C211FED00776ACD /* opus.h */; }; + 2616FB1E4FDE48780ABF5B46 /* Pods_ActorSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B29614BD032EB33B22B34279 /* Pods_ActorSDK.framework */; }; 9AA6A41F1D08568A00957A7F /* AASettingsMediaViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AA6A41E1D08568A00957A7F /* AASettingsMediaViewController.swift */; }; 9AAE96481CF81F140092E366 /* AARingtonesViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AAE96471CF81F140092E366 /* AARingtonesViewController.swift */; }; - BDF21708B376E212CEAEC43D /* Pods_ActorSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 354C3EFA48FBFAEAD0DEEE17 /* Pods_ActorSDK.framework */; }; BE237C9D1C422FFA00060648 /* AAStickersKeyboard.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE237C9C1C422FFA00060648 /* AAStickersKeyboard.swift */; }; BE2621571C4656D700A817AB /* AAConvActionSheet.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE2621561C4656D700A817AB /* AAConvActionSheet.swift */; }; BE2621591C4656EE00A817AB /* AAThumbnailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE2621581C4656EE00A817AB /* AAThumbnailView.swift */; }; @@ -723,9 +723,9 @@ 15F89F051C211FED00776ACD /* opus_types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = opus_types.h; sourceTree = ""; }; 15F89F061C211FED00776ACD /* opus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = opus.h; sourceTree = ""; }; 15F89F0F1C21317400776ACD /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/Localizable.strings; sourceTree = ""; }; - 354C3EFA48FBFAEAD0DEEE17 /* Pods_ActorSDK.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ActorSDK.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 9AA6A41E1D08568A00957A7F /* AASettingsMediaViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AASettingsMediaViewController.swift; sourceTree = ""; }; 9AAE96471CF81F140092E366 /* AARingtonesViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AARingtonesViewController.swift; sourceTree = ""; }; + B29614BD032EB33B22B34279 /* Pods_ActorSDK.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ActorSDK.framework; sourceTree = BUILT_PRODUCTS_DIR; }; BE237C9C1C422FFA00060648 /* AAStickersKeyboard.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AAStickersKeyboard.swift; sourceTree = ""; }; BE2621561C4656D700A817AB /* AAConvActionSheet.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AAConvActionSheet.swift; sourceTree = ""; }; BE2621581C4656EE00A817AB /* AAThumbnailView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AAThumbnailView.swift; sourceTree = ""; }; @@ -766,6 +766,8 @@ BEFE68D41C4657360001F2D6 /* AAThumbnailCollectionCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AAThumbnailCollectionCell.swift; sourceTree = ""; }; E30822B631D108159E8B306B /* Pods-ActorSDK.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ActorSDK.debug.xcconfig"; path = "Pods/Target Support Files/Pods-ActorSDK/Pods-ActorSDK.debug.xcconfig"; sourceTree = ""; }; F076508E3899D309954904A3 /* Pods-ActorSDK.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ActorSDK.release.xcconfig"; path = "Pods/Target Support Files/Pods-ActorSDK/Pods-ActorSDK.release.xcconfig"; sourceTree = ""; }; + F15398CB1DF3A8C600C67C7D /* AGEmojiKeyboard.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AGEmojiKeyboard.framework; path = "../../../../../Library/Developer/Xcode/DerivedData/ActorSDK-hfpcbgrswlpuwlafdzjxrahnyfmr/Build/Products/Debug-iphonesimulator/AGEmojiKeyboard/AGEmojiKeyboard.framework"; sourceTree = ""; }; + F175DF891E168C69005BCF1A /* pt-BR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "pt-BR"; path = "pt-BR.lproj/Localizable.strings"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -776,7 +778,7 @@ 06CE898C1BD841C9005A5530 /* SystemConfiguration.framework in Frameworks */, BEAC2B311C42D683007F7A2F /* libopus.a in Frameworks */, 066A52001BC4E0B0000E606E /* libsqlite3.tbd in Frameworks */, - BDF21708B376E212CEAEC43D /* Pods_ActorSDK.framework in Frameworks */, + 2616FB1E4FDE48780ABF5B46 /* Pods_ActorSDK.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1672,9 +1674,10 @@ 2F428D134E194A828C3DF863 /* Frameworks */ = { isa = PBXGroup; children = ( + F15398CB1DF3A8C600C67C7D /* AGEmojiKeyboard.framework */, 06CE898B1BD841C9005A5530 /* SystemConfiguration.framework */, 066A51FF1BC4E0B0000E606E /* libsqlite3.tbd */, - 354C3EFA48FBFAEAD0DEEE17 /* Pods_ActorSDK.framework */, + B29614BD032EB33B22B34279 /* Pods_ActorSDK.framework */, ); name = Frameworks; sourceTree = ""; @@ -1927,13 +1930,14 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0700; - LastUpgradeCheck = 0700; + LastUpgradeCheck = 0820; ORGANIZATIONNAME = "Steve Kite"; TargetAttributes = { 066A50D11BC4AE63000E606E = { CreatedOnToolsVersion = 7.0; - DevelopmentTeam = HVJR44Y5B6; + DevelopmentTeam = HA23Y6A5LW; LastSwiftMigration = 0800; + ProvisioningStyle = Automatic; }; }; }; @@ -1947,6 +1951,8 @@ "zh-Hans", Base, es, + "pt-BR", + pt, ); mainGroup = 066A50C81BC4AE63000E606E; productRefGroup = 066A50D31BC4AE63000E606E /* Products */; @@ -2312,6 +2318,7 @@ 065975451BC7D34200B8C7DF /* pt */, 065975471BC7D34400B8C7DF /* ru */, 065975481BC7D34600B8C7DF /* zh-Hans */, + F175DF891E168C69005BCF1A /* pt-BR */, ); name = Localizable.strings; path = .; @@ -2324,6 +2331,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -2333,8 +2341,10 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -2371,6 +2381,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -2380,8 +2391,10 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -2412,16 +2425,17 @@ isa = XCBuildConfiguration; baseConfigurationReference = E30822B631D108159E8B306B /* Pods-ActorSDK.debug.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = HA23Y6A5LW; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -2469,15 +2483,16 @@ isa = XCBuildConfiguration; baseConfigurationReference = F076508E3899D309954904A3 /* Pods-ActorSDK.release.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = HA23Y6A5LW; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", diff --git a/actor-sdk/sdk-core-ios/ActorSDK.xcodeproj/xcshareddata/xcschemes/ActorSDK.xcscheme b/actor-sdk/sdk-core-ios/ActorSDK.xcodeproj/xcshareddata/xcschemes/ActorSDK.xcscheme index 73694fba15..6e24b9e408 100644 --- a/actor-sdk/sdk-core-ios/ActorSDK.xcodeproj/xcshareddata/xcschemes/ActorSDK.xcscheme +++ b/actor-sdk/sdk-core-ios/ActorSDK.xcodeproj/xcshareddata/xcschemes/ActorSDK.xcscheme @@ -1,6 +1,6 @@ + + + + diff --git a/actor-sdk/sdk-core-ios/ActorSDK.xcodeproj/xcuserdata/diego.xcuserdatad/xcschemes/xcschememanagement.plist b/actor-sdk/sdk-core-ios/ActorSDK.xcodeproj/xcuserdata/diego.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000000..d3a5cfd889 --- /dev/null +++ b/actor-sdk/sdk-core-ios/ActorSDK.xcodeproj/xcuserdata/diego.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SuppressBuildableAutocreation + + 066A50D11BC4AE63000E606E + + primary + + + + + diff --git a/actor-sdk/sdk-core-ios/ActorSDK/.DS_Store b/actor-sdk/sdk-core-ios/ActorSDK/.DS_Store new file mode 100644 index 0000000000..94d01b4a93 Binary files /dev/null and b/actor-sdk/sdk-core-ios/ActorSDK/.DS_Store differ diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Resources/.DS_Store b/actor-sdk/sdk-core-ios/ActorSDK/Resources/.DS_Store new file mode 100644 index 0000000000..91e589f9bd Binary files /dev/null and b/actor-sdk/sdk-core-ios/ActorSDK/Resources/.DS_Store differ diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Resources/Base.lproj/Localizable.strings b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Base.lproj/Localizable.strings index e54b96b6de..a9ac6e8885 100644 --- a/actor-sdk/sdk-core-ios/ActorSDK/Resources/Base.lproj/Localizable.strings +++ b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Base.lproj/Localizable.strings @@ -377,6 +377,12 @@ "GroupMemberKickAction" = "Kick"; +"ChannelMemberKick" = "Kick from Channel"; + +"ChannelMemberKickMessage" = "Are you sure you want to kick {name} from this channel?"; + +"ChannelMemberKickAction" = "Kick"; + "GroupMemberWrite" = "Write a Message"; "GroupMemberCall" = "Phone Call"; @@ -699,6 +705,11 @@ "ActionDeleteMessage" = "Are you sure want to delete chat?"; +"ActionDeleteGroupTitle" = "Remove Group"; + +"ActionDeleteChannelTitle" = "Remove Channel"; + +"ActionDeleteChatlTitle" = "Remove Chat"; "ActionDeleteChannel" = "Delete Channel"; @@ -723,6 +734,8 @@ "ActionDeleteAndExitAction" = "Exit"; +"ActionDeleteAndExitNotAllowed" = "You are not allowed to leave this group"; + "ActionClearHistory" = "Clear History"; @@ -752,3 +765,4 @@ "ErrorUnableToJoin" = "Unable to join to group"; "ErrorUnableToCall" = "Unable to call this number"; + diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/AppIcon.appiconset/Contents.json b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/AppIcon.appiconset/Contents.json index 1539cc727a..377da0fece 100644 --- a/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/AppIcon.appiconset/Contents.json @@ -1,5 +1,15 @@ { "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, { "size" : "29x29", "idiom" : "iphone", @@ -36,6 +46,16 @@ "filename" : "Icon-60@3x.png", "scale" : "3x" }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, { "size" : "29x29", "idiom" : "ipad", diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_channel.imageset/Contents.json b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_channel.imageset/Contents.json new file mode 100644 index 0000000000..1b78e4c048 --- /dev/null +++ b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_channel.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "ic_megaphone_18dp_black.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "ic_megaphone_18dp_black-1.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "ic_megaphone_18dp_black-2.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_channel.imageset/ic_megaphone_18dp_black-1.png b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_channel.imageset/ic_megaphone_18dp_black-1.png new file mode 100644 index 0000000000..78f85bd66c Binary files /dev/null and b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_channel.imageset/ic_megaphone_18dp_black-1.png differ diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_channel.imageset/ic_megaphone_18dp_black-2.png b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_channel.imageset/ic_megaphone_18dp_black-2.png new file mode 100644 index 0000000000..1368361424 Binary files /dev/null and b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_channel.imageset/ic_megaphone_18dp_black-2.png differ diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_channel.imageset/ic_megaphone_18dp_black.png b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_channel.imageset/ic_megaphone_18dp_black.png new file mode 100644 index 0000000000..2eb8ba4977 Binary files /dev/null and b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_channel.imageset/ic_megaphone_18dp_black.png differ diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_group.imageset/Contents.json b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_group.imageset/Contents.json new file mode 100644 index 0000000000..046b6e8c55 --- /dev/null +++ b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_group.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "ic_group_black_18dp-2.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "ic_group_black_18dp-1.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "ic_group_black_18dp.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_group.imageset/ic_group_black_18dp-1.png b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_group.imageset/ic_group_black_18dp-1.png new file mode 100644 index 0000000000..792d67d93e Binary files /dev/null and b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_group.imageset/ic_group_black_18dp-1.png differ diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_group.imageset/ic_group_black_18dp-2.png b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_group.imageset/ic_group_black_18dp-2.png new file mode 100644 index 0000000000..c098ddc615 Binary files /dev/null and b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_group.imageset/ic_group_black_18dp-2.png differ diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_group.imageset/ic_group_black_18dp.png b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_group.imageset/ic_group_black_18dp.png new file mode 100644 index 0000000000..4fe1b2a6ed Binary files /dev/null and b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_group.imageset/ic_group_black_18dp.png differ diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_robot.imageset/Contents.json b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_robot.imageset/Contents.json new file mode 100644 index 0000000000..f804cc420f --- /dev/null +++ b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_robot.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "ic_robot_black_18dp-2.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "ic_robot_black_18dp-1.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "ic_robot_black_18dp.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_robot.imageset/ic_robot_black_18dp-1.png b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_robot.imageset/ic_robot_black_18dp-1.png new file mode 100644 index 0000000000..8401a0e793 Binary files /dev/null and b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_robot.imageset/ic_robot_black_18dp-1.png differ diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_robot.imageset/ic_robot_black_18dp-2.png b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_robot.imageset/ic_robot_black_18dp-2.png new file mode 100644 index 0000000000..72479f533a Binary files /dev/null and b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_robot.imageset/ic_robot_black_18dp-2.png differ diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_robot.imageset/ic_robot_black_18dp.png b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_robot.imageset/ic_robot_black_18dp.png new file mode 100644 index 0000000000..05da320987 Binary files /dev/null and b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_robot.imageset/ic_robot_black_18dp.png differ diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_backspace.imageset/Contents.json b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_backspace.imageset/Contents.json new file mode 100644 index 0000000000..49a1223d57 --- /dev/null +++ b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_backspace.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "ic_smiles_backspace-2.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "ic_smiles_backspace-1.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "ic_smiles_backspace.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_backspace.imageset/ic_smiles_backspace-1.png b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_backspace.imageset/ic_smiles_backspace-1.png new file mode 100644 index 0000000000..3d4d64c15a Binary files /dev/null and b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_backspace.imageset/ic_smiles_backspace-1.png differ diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_backspace.imageset/ic_smiles_backspace-2.png b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_backspace.imageset/ic_smiles_backspace-2.png new file mode 100644 index 0000000000..50c5312f2d Binary files /dev/null and b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_backspace.imageset/ic_smiles_backspace-2.png differ diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_backspace.imageset/ic_smiles_backspace.png b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_backspace.imageset/ic_smiles_backspace.png new file mode 100644 index 0000000000..8580a8b673 Binary files /dev/null and b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_backspace.imageset/ic_smiles_backspace.png differ diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_bell.imageset/Contents.json b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_bell.imageset/Contents.json new file mode 100644 index 0000000000..21e803b698 --- /dev/null +++ b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_bell.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "ic_smiles_bell.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "ic_smiles_bell-1.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "ic_smiles_bell-2.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_bell.imageset/ic_smiles_bell-1.png b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_bell.imageset/ic_smiles_bell-1.png new file mode 100644 index 0000000000..faad898954 Binary files /dev/null and b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_bell.imageset/ic_smiles_bell-1.png differ diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_bell.imageset/ic_smiles_bell-2.png b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_bell.imageset/ic_smiles_bell-2.png new file mode 100644 index 0000000000..bcd04f9919 Binary files /dev/null and b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_bell.imageset/ic_smiles_bell-2.png differ diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_bell.imageset/ic_smiles_bell.png b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_bell.imageset/ic_smiles_bell.png new file mode 100644 index 0000000000..a7a2cffb3a Binary files /dev/null and b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_bell.imageset/ic_smiles_bell.png differ diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_car.imageset/Contents.json b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_car.imageset/Contents.json new file mode 100644 index 0000000000..bed13f0513 --- /dev/null +++ b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_car.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "ic_smiles_car-2.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "ic_smiles_car-1.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "ic_smiles_car.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_car.imageset/ic_smiles_car-1.png b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_car.imageset/ic_smiles_car-1.png new file mode 100644 index 0000000000..5d312c39cd Binary files /dev/null and b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_car.imageset/ic_smiles_car-1.png differ diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_car.imageset/ic_smiles_car-2.png b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_car.imageset/ic_smiles_car-2.png new file mode 100644 index 0000000000..b8fa468aa2 Binary files /dev/null and b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_car.imageset/ic_smiles_car-2.png differ diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_car.imageset/ic_smiles_car.png b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_car.imageset/ic_smiles_car.png new file mode 100644 index 0000000000..430ef9348e Binary files /dev/null and b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_car.imageset/ic_smiles_car.png differ diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_flower.imageset/Contents.json b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_flower.imageset/Contents.json new file mode 100644 index 0000000000..a0e576a9ec --- /dev/null +++ b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_flower.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "ic_smiles_flower-2.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "ic_smiles_flower-1.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "ic_smiles_flower.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_flower.imageset/ic_smiles_flower-1.png b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_flower.imageset/ic_smiles_flower-1.png new file mode 100644 index 0000000000..c9e2a36a21 Binary files /dev/null and b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_flower.imageset/ic_smiles_flower-1.png differ diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_flower.imageset/ic_smiles_flower-2.png b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_flower.imageset/ic_smiles_flower-2.png new file mode 100644 index 0000000000..b70bcd452c Binary files /dev/null and b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_flower.imageset/ic_smiles_flower-2.png differ diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_flower.imageset/ic_smiles_flower.png b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_flower.imageset/ic_smiles_flower.png new file mode 100644 index 0000000000..63ba2bcee2 Binary files /dev/null and b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_flower.imageset/ic_smiles_flower.png differ diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_grid.imageset/Contents.json b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_grid.imageset/Contents.json new file mode 100644 index 0000000000..6f9cde840a --- /dev/null +++ b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_grid.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "ic_smiles_grid.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "ic_smiles_grid-1.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "ic_smiles_grid-2.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_grid.imageset/ic_smiles_grid-1.png b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_grid.imageset/ic_smiles_grid-1.png new file mode 100644 index 0000000000..aae876d0b0 Binary files /dev/null and b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_grid.imageset/ic_smiles_grid-1.png differ diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_grid.imageset/ic_smiles_grid-2.png b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_grid.imageset/ic_smiles_grid-2.png new file mode 100644 index 0000000000..c701d3124e Binary files /dev/null and b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_grid.imageset/ic_smiles_grid-2.png differ diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_grid.imageset/ic_smiles_grid.png b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_grid.imageset/ic_smiles_grid.png new file mode 100644 index 0000000000..f311de53e8 Binary files /dev/null and b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_grid.imageset/ic_smiles_grid.png differ diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_recent.imageset/Contents.json b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_recent.imageset/Contents.json new file mode 100644 index 0000000000..9eb2674964 --- /dev/null +++ b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_recent.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "ic_smiles_recent-2.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "ic_smiles_recent-1.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "ic_smiles_recent.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_recent.imageset/ic_smiles_recent-1.png b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_recent.imageset/ic_smiles_recent-1.png new file mode 100644 index 0000000000..aa1b12a7e5 Binary files /dev/null and b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_recent.imageset/ic_smiles_recent-1.png differ diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_recent.imageset/ic_smiles_recent-2.png b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_recent.imageset/ic_smiles_recent-2.png new file mode 100644 index 0000000000..3208bcecc4 Binary files /dev/null and b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_recent.imageset/ic_smiles_recent-2.png differ diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_recent.imageset/ic_smiles_recent.png b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_recent.imageset/ic_smiles_recent.png new file mode 100644 index 0000000000..d08b38cd7b Binary files /dev/null and b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_recent.imageset/ic_smiles_recent.png differ diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_smile.imageset/Contents.json b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_smile.imageset/Contents.json new file mode 100644 index 0000000000..88f9c0d79e --- /dev/null +++ b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_smile.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "ic_smiles_smile.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "ic_smiles_smile-1.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "ic_smiles_smile-2.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_smile.imageset/ic_smiles_smile-1.png b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_smile.imageset/ic_smiles_smile-1.png new file mode 100644 index 0000000000..0f94a602e3 Binary files /dev/null and b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_smile.imageset/ic_smiles_smile-1.png differ diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_smile.imageset/ic_smiles_smile-2.png b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_smile.imageset/ic_smiles_smile-2.png new file mode 100644 index 0000000000..0e8515a125 Binary files /dev/null and b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_smile.imageset/ic_smiles_smile-2.png differ diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_smile.imageset/ic_smiles_smile.png b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_smile.imageset/ic_smiles_smile.png new file mode 100644 index 0000000000..2d98101f8e Binary files /dev/null and b/actor-sdk/sdk-core-ios/ActorSDK/Resources/Images.xcassets/ic_smiles_smile.imageset/ic_smiles_smile.png differ diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Resources/nl.lproj/Localizable.strings b/actor-sdk/sdk-core-ios/ActorSDK/Resources/nl.lproj/Localizable.strings new file mode 100644 index 0000000000..5abec5527d --- /dev/null +++ b/actor-sdk/sdk-core-ios/ActorSDK/Resources/nl.lproj/Localizable.strings @@ -0,0 +1,771 @@ +// +// Copyright (c) 2014-2016 Actor LLC. +// + +/* + * Main Screen + */ + +"TabMessages" = "Berichten"; + +"TabPeople" = "Contacten"; + +"TabSettings" = "Account"; + +// Not sure if we will use this. +"TabDiscover" = "Ontdek"; + +/* + * Contacts + */ + +"ContactsAddHeader" = "Nieuw contact"; + +"ContactsAddHint" = "Geef het telefoonnummer op."; + +// NOTE: no need/way to use {appname} as these are deviations from Actor SDK/core and strings +// are likely not interpolated by default. So use literal Homecrew when we want. +"ContactsActionInvite" = "Vertel buurtgenoten en vrienden over Homecrew!"; + +"ContactsActionAdd" = "Contact toevoegen"; + +"ContactsBack" = "Contacten"; + +/* + * Dialogs + */ + +// Where is this? +"DialogsHint" = "Swipe voor meer opties."; + +"DialogsBack" = "Chats"; + +/* + * Settings + */ + +"SettingsEdit" = "Bewerken"; + +"SettingsSetPhoto" = "Profielfoto instellen"; + + +"SettingsChangeName" = "Naam wijzigen"; + +"SettingsEditHeader" = "Te gebruiken naam"; + +"SettingsEditHint" = "Gebruik een echte naam om eenvoudiger gevonden te worden."; + +"SettingsEditFieldHint" = "Geef naam op"; + + +"SettingsUsernameNotSet" = "Gebruikersnaam instellen"; + +"SettingsUsernameTitle" = "Gebruikersnaam"; + +"SettingsUsernameHintField" = "Kies een gebruikersnaam en geef deze hier op."; + +"SettingsUsernameHint" = "Het is mogelijk zelf een gebruikersnaam te kiezen voor {appname}. Anderen zijn dan makkelijker in staat op basis hiervan deze account te vinden, en kunnen zo contact opnemen zonder het telefoonnummer te weten.\n\nHet is toegestaan de (hoofd)letters a-z, getallen 0-9 en liggende streepjes (_) te gebruiken. Minimum lengte is 5 tekens."; + +// TODO: Is this placeholder or what? +"SettingsAboutNotSet" = "Bio"; + +"SettingsChangeAboutTitle" = "Over mijzelf"; + +"SettingsChangeAboutHint" = "Vertel kort iets over jezelf."; + + +"SettingsSecurity" = "Privacy en beveiliging"; + +"SettingsWallpapers" = "Achtergrond"; + +"SettingsMedia" = "Media"; + +"SettingsNotifications" = "Meldingen en geluiden"; + +"SettingsAskQuestion" = "Stel een vraag"; + +"SettingsTwitter" = "Volg ons op Twitter"; + +"SettingsAbout" = "Homecrew"; + +"SettingsVersion" = "Versie {version}"; + +"SettingsMobilePhone" = "Mobiele telefoon"; + +"SettingsGroupChats" = "Groepen"; + +"SettingsPrivateChats" = "Besloten chats"; + +/* + * Notifications + */ + +"NotificationsTitle" = "Meldingen en geluiden"; + +"NotificationsEffectsTitle" = "Effecten"; + +"NotificationsMobileTitle" = "Mobiele meldingen"; + +// QNA: what is the difference between the two, if any? +"NotificationsInAppTitle" = "In-app meldingen"; + +"NotificationsNotificationHint" = "Meldingen van gebruikers of groepen zijn via de infopagina's uit te schakelen."; + +"NotificationsPrivacyTitle" = "Privacy"; + +"NotificationsSoundEffects" = "Geluidseffecten"; + +"NotificationsEnable" = "Inschakelen"; + +"NotificationsSound" = "Geluid"; + +"NotificationsVibration" = "Trillen"; + +"NotificationsPreview" = "Berichtvoorbeeld"; + +"NotificationsPreviewHint" = "De berichttekst niet in melding weergeven."; + +"NotificationSecretMessage" = "Nieuw bericht"; + +"NotificationsGroups" = "Groepsmeldingen"; + +"NotificationsOnlyMentions" = "Alleen persoonlijk aangesproken"; + +"NotificationsOnlyMentionsHint" = "Het is alleen mogelijk meldingen te ontvangen voor berichten specifiek gericht aan deze gebruiker."; + +/* + * Media + */ + +"MediaTitle" = "Media"; + +"MediaPhotoDownloadHeader"= "Automatisch afbeeldingen downloaden"; + +"MediaAudioDownloadHeader"= "Automatisch geluidsbestanden downloaden"; + +"MediaOtherHeader"= "Overige"; + +"MediaAutoplayGif"= "Automatisch GIF afspelen"; + +/* + * Privacy + */ + +"PrivacyTitle" = "Beveiliging"; + + +"PrivacyHeader" = "Privacy"; + +// TODO: check space Laats gev.: (whatsapp) zonder clone te zijn (synoniem?) +"PrivacyLastSeen" = "Laatst"; + +// TODO: herformuleren zonder 'je' of 'toon' +"PrivacyLastSeenHint" = "Wijzig aan wie het tijdstip van laatst online getoond mag worden"; + +"PrivacyLastSeenEverybody" = "Iedereen"; + +"PrivacyLastSeenContacts" = "Mijn contacten"; + +"PrivacyLastSeenNone" = "Niemand"; + + +"PrivacySecurityHeader" = "Beveiliging"; + +"PrivacyAllSessions" = "Actieve sessies"; + +"PrivacyTerminate" = "Beëindig alle overige sessies"; + +"PrivacyTerminateAlert" = "Alle sessies beëindigen"; + +"PrivacyTerminateAlertSingle" = "Beëindig sessie"; + +"PrivacyTerminateHint" = "Alle andere apparaten behalve deze afmelden."; + +/* + * Wallpapers + */ + +"WallpapersTitle" = "Achtergronden"; + +"WallpapersPhoto" = "Gallerij"; + +/* + * Calls + */ + +"CallsStartAudio" = "Telefoongesprek"; + +"CallsStartGroupAudio" = "Conferentiegesprek"; + +"CallsAnswer" = "opnemen"; + +"CallsDecline" = "weigeren"; + +"CallsMute" = "stil"; + +"CallsSpeaker" = "speaker"; + +"CallsVideo" = "video"; + +"CallStateRinging" = "Gaat over..."; + +"CallStateConnecting" = "Verbinden..."; + +"CallStateIncoming" = "Binnenkomend gesprek..."; + +"CallPrivateTitle" = "Gesprek"; + +"CallPrivateText" = "Oproep van {name}"; + +"CallGroupTitle" = "Conferentiegesprek"; + +"CallGroupText" = "Conferentiegesprek {name}"; + + +/* + * Profile + */ + +"ProfileEditHeader" = "Naam wijzigen"; + +"ProfileSendMessage" = "Bericht versturen"; + +"ProfileNotifications" = "Meldingen"; + +// FIXME: Warring??? +"ProfileNotificationsWarring" = "Definitief meldingen van deze persoon uitschakelen? Dit kan een bron van miscommunicatie vormen."; + +// FIXME: Warring??? +"ProfileNotificationsWarringAction" = "Uitschakelen"; + +"ProfileAddToContacts" = "Aan contacten toevoegen"; + +"ProfileRemoveFromContacts" = "Uit contacten verwijderen"; + +"ProfileBlockContact" = "Blokkeer gebruiker"; + +"ProfileUnblockContact" = "Blokkering opheffen"; + +"ProfileRename" = "Hernoem contact"; + +"ProfileRenameMessage" = "Het is mogelijk om contacten zelf te hernoemen, deze wijzigingen zijn dan alleen hier zichtbaar."; + +"ProfileRenameAction" = "Hernoem"; + +"ProfileAbout" = "over mij"; + +"ProfilePhone" = "telefoonnummer"; + +"ProfileUsername" = "gebruikersnaam"; + +"ProfileTitle" = "Info"; + +"CallNumber" = "Bellen"; + +"CopyNumber" = "Kopieer"; + +"NumberCopied" = "Telefoonnummer is naar het klembord gekopieerd."; + +/* + * Publics + */ + +"JoinAlertMessage" = "Lid worden van deze groep?"; + +/* + * Group + */ + +"GroupEditHeader" = "Onderwerp"; + +"GroupEditHint" = "Geef hier het onderwerp van de groep op."; + +"GroupSetPhoto" = "Groepsafbeelding instellen"; + +"GroupSetTitle" = "Titel van de groep"; + +"GroupSetSound" = "Berichtgeluid"; + +"GroupEditConfirm" = "De titel van deze groep wijzigen?"; + +"GroupEditConfirmAction" = "Wijzig onderwerp"; + +"GroupNotifications" = "Meldingen"; + +"GroupSettings" = "INSTELLINGEN"; + +"GroupIntegrations" = "Koppelingen"; + +"GroupViewMembers" = "Leden"; + +"GroupDescription" = "Omschrijving"; + + + +"GroupAdministration" = "Beheer"; + +"GroupTypeTitle" = "Soort groep"; + +"GroupTypeTitleChannel" = "Soort kanaal"; + +"GroupPermissionsHint" = "Beheer groepsinstellingen en bepaal wat er mogelijk is binnen deze groep"; + +"GroupPermissionsHintChannel" = "Beheer wat er mogelijk is op dit kanaal"; + +"GroupTypeHintPublic" = "Openbare groepen kunnen opgezocht en gevonden worden, zonder uitnodiging mag iedereen lid worden."; + +"GroupTypeHintPrivate" = "Besloten groepen kunnen alleen op uitnodiging nieuwe leden ontvangen"; + +"GroupTypeHintPublicChannel" = "Openbare kanalen kunnen gevonden worden en iedereen kan zichzelf toegang verschaffen"; + +"GroupTypeHintPrivateChannel" = "Besloten kanalen kunnen alleen op uitnodiging leden ontvangen"; + +// TODO: "GroupTypeLinkHint" = "People can share this link with others and find your group using search"; +// I would say people can easily JOIN using the URL, not search right? +"GroupTypeLinkHint" = "Deze link kan met anderen gedeeld worden om deze groep eenvoudig te vinden."; + +"GroupTypeLinkHintChannel" = "Deze link kan met anderen gedeeld worden om het kanaal eenvoudig te vinden"; + +"GroupTypePublic" = "Openbaar"; + +"GroupTypePrivate" = "Afgeschermd"; + +"ChannelTypePublic" = "Openbaar"; + +"ChannelTypePrivate" = "Afgeschermd"; + +"GroupTypePublicFull" = "Openbare groep"; + +"GroupTypePrivateFull" = "Afgeschermde groep"; + +"ChannelTypePublicFull" = "Openbaar kanaal"; + +"ChannelTypePrivateFull" = "Afgeschermd kanaal"; + +"GroupDeleteHint" = "Alle berichten uit deze groep zullen definitief verloren gaan."; + +"GroupDeleteHintChannel" = "Alle berichten uit dit kanaal zullen definitief verloren gaan."; + + + +"GroupShareTitle" = "Gedeelde geschiedenis"; + +"GroupShareEnabled" = "Gedeeld"; + +"GroupShareHint" = "Alle leden krijgen hiermee alle berichten te zien, dit is niet terug te draaien."; + +"GroupShareMessage" = "Definitief berichtengeschiedenis met alle leden delen? Deze handeling is onomkeerbaar."; + +"GroupShareAction" = "Delen"; + + + +"GroupEditTitle" = "Bewerk groep"; + +"GroupEditTitleChannel" = "Bewerk kanaal"; + +"GroupEditName" = "Groepsnaam"; + +"GroupEditNameChannel" = "Naam van het kanaal"; + +"GroupEditDescription" = "Omschrijving"; + + +"GroupMemberAdmin" = "beheerder"; + +"GroupMemberInfo" = "Profiel"; + +"GroupMemberMakeAdmin" = "Groepsbeheerder maken"; + +"GroupMemberMakeMessage" = "Gebruiker {name} als beheerder van deze groep toewijzen?"; + +"GroupMemberMakeAction" = "Ja"; + +"GroupMemberKick" = "Verwijder uit groep"; + +"GroupMemberKickMessage" = "De gebruiker {name} uit deze groep verwijderen?"; + +"GroupMemberKickAction" = "Verwijder (kick)"; + +"GroupMemberWrite" = "Schrijf een bericht"; + +"GroupMemberCall" = "Telefoongesprek"; + +"GroupMemberCallNoPhones" = "Geen beschikbaar telefoonnummer van gebruiker"; + +"GroupAddParticipant" = "Deelnemer toevoegen..."; + +"GroupAddParticipantTitle" = "Contacten"; + +"GroupAddParticipantUrl" = "Uitnodigen voor groep via snelkoppeling"; + + +"GroupInviteLinkPageTitle" = "Uitnodiging link"; + +"GroupInviteLinkTitle" = "LINK"; + +"GroupInviteLinkHint" = "Stuur deze link om anderen voor deze groep uit te nodigen."; + +"GroupInviteLinkRevokeMessage" = "Deze link intrekken? Eenmaal ingetrokken kan niemand deze meer gebruiken om lid te worden van de groep."; + +"GroupInviteLinkRevokeAction" = "Intrekken"; + + + +"GroupJoinMessage" = "Lid van deze groep worden?"; + +"GroupJoinAction" = "Lid worden"; + +/* + * Compose + */ + +"ComposeTitle" = "Nieuw bericht"; + + +"CreateGroup" = "Groep aanmaken"; + +"CreateChannel" = "Kanaal aanmaken"; + + +"CreateGroupTitle" = "Nieuwe groep"; + +"CreateGroupHint" = "Geef een groepsnaam en eventueel groepsafbeelding op"; + +"CreateGroupNamePlaceholder" = "Naam van de groep"; + +"CreateChannelTitle" = "Nieuw kanaal"; + +"CreateChannelHint" = "Geef een naam voor het kanaal en eventueel een afbeelding op"; + +"CreateChannelNamePlaceholder" = "Naam van het kanaal"; + + +"CreateGroupMembersTitle" = "Leden uitnodigen"; + +"CreateGroupMembersPlaceholders" = "Namen invoeren"; + +/* + * Location + */ + +"LocationTitle" = "Locatie"; + +/* + * Chat + */ + +"ChatPlaceholder" = "Tekst invoeren..."; + +"ChatSend" = "Zend"; + +"ChatNoGroupAccess" = "Er is geen lidmaatschap van deze groep"; + +"ChatNewMessages" = "Nieuwe berichten"; + +"ChatVoiceMessage" = "Geluidsfragment"; + +"ChatHoldToTalk" = "Vasthouden om te praten"; + +"ChatReleaseToSend" = "Loslaten om te versturen"; + +// FIXME: this in Android is "Swipe to left to cancel" (slide up doesn't do anything/work) +"ChatSlideUpToCancel" = "Veeg naar links om te annuleren"; + +// FIXME: new convention? (periods) +"Chat.MicrophoneAccessDisabled" = "Om geluid op te nemen is toegang tot de microfoon nodig. Ga naar Account — Privacy — Microfoon en schakel deze in."; + +"ChatDeleted" = "Dit gesprek is door de eigenaar verwijderd."; + +"ChatJoin" = "Lid worden"; + +/* + * Chat attachment menu + */ + +"AttachmentsSendPhoto" = "Stuur {count} foto"; + +"AttachmentsSendPhotos" = "Stuur {count} foto's"; + +/* + * Find + */ + +// NOTE: where does this show up? +"FindTitle" = "Buurtgenoten op Homecrew vinden"; + +"FindFieldHint" = "telefoonnummer, e-mail of gebruikersnaam"; + +"FindHint" = "Zoek op telefoonnummer, e-mailadres of gebruikersnaam."; + +"FindNotFound" = "Helaas, we hebben niemand kunnen vinden."; + +/* + * Placeholders + */ + +"Placeholder_Empty_Title" = "Buurtgenoten uitnodigen"; + +"Placeholder_Empty_Message" = "Geen van de bestaande telefooncontacten zijn op {appname} gevonden. Gebruik de knop hieronder om ze uit te nodigen."; + +"Placeholder_Empty_Action" = "VERTEL BUURTGENOTEN"; + +"Placeholder_Empty_Message2" = "of voer handmatig een contact toe"; + +"Placeholder_Empty_Action2" = "TOEVOEGEN CONTACT"; + +"Placeholder_Loading_Title" = "Bezig met synchroniseren"; + +"Placeholder_Loading_Message" = "Enige momenten geduld, we zijn de omgeving aan het opzetten."; + +"Placeholder_Contacts_Title" = "Buurtgenoten uitnodigen"; + +"Placeholder_Contacts_Message" = "Geen van de bestaande telefooncontacten gebruikt momenteel {appname}. Gebruik de knop hieronder om ze uit te nodigen."; + +"Placeholder_Contacts_Action" = "VERTEL HET DOOR"; + +"Placeholder_Contacts_Message2" = "of voeg handmatig een contact toe met het plusteken hier rechtsboven"; + +"Placeholder_Dialogs_Title" = "Begin met berichten versturen"; + +"Placeholder_Dialogs_Message" = "Kies een contact uit de lijst of druk op de berichtknop in de rechterbovenhoek om nu een gesprek te starten."; + +"Placeholder_Group_Title" = "Geen lid"; + +"Placeholder_Group_Message" = "Helaas, deze groep is besloten."; + +"Placeholder_Location_Title" = "Inschakelen locatiediensten"; + +"Placeholder_Location_Message" = "Schakel diensten voor locaties in bij apparaatinstellingen om de huidige locatie te delen."; + + +/* + * Welcome + */ + +"WelcomeTitle" = "Welkom bij {app_name}!"; + +// FIXME: change me to HC tagline +"WelcomeTagline" = "Voorkom inbraak. Buren worden dienstverleners."; + +"WelcomeSignUp" = "Inschrijven"; + +"WelcomeLogIn" = "Aanmelden"; + + +/* + * Auth + */ + +"AuthCountryTitle" = "Landcode"; + +"AuthUnsupported" = "Deze account wordt niet ondersteund in deze versie van {app_name}. Werk eerst de applicatie naar de meest recente versie bij."; + +"AuthLoginTitle" = "Aanmelden bij {app_name}"; + +"AuthLoginPhone" = "Telefoonnummer"; + +"AuthLoginEmail" = "E-mail"; + +"AuthLoginPhoneEmail" = "Telefoonnummer of e-mailadres"; + +"AuthNameTitle" = "Hoi! Stel jezelf even voor?"; + +"AuthNamePlaceholder" = "Mijn naam"; + +"AuthPhoneTitle" = "Wat is het telefoonnummer?"; + +"AuthPhoneUseEmail" = "Gebruik e-mail"; + +"AuthPhoneHint" = "We hebben een telefoonnummer nodig om de beveiliging van persoonlijke gegevens te kunnen waarborgen."; + +"AuthPhonePlaceholder" = "Telefoonnummer"; + +"AuthEmailTitle" = "Wat is het e-mailadres?"; + +"AuthEmailHint" = "We beloven geen onnodige berichten (spam) te versturen en zullen dit e-mail nooit aan derden overhandigen."; + +"AuthEmailPlaceholder" = "E-mail"; + +"AuthEmailUsePhone" = "Telefoon gebruiken"; + +"AuthDisclaimer" = "Door het gebruik van deze omgeving wordt akkoord gegaan met de op dat moment geldende Algemene Voorwaarden en het Privacybeleid."; + +"AuthDisclaimerTosOnly" = "Door aan te melden wordt met de Algemene Servicevoorwaarden akkoord gegaan."; + +"AuthDisclaimerPrivacyOnly" = "Door aan te melden wordt met het Privacybeleid akkoord gegaan."; + +"AuthDisclaimerToS" = "Algemene Servicevoorwaarden"; + +"AuthDisclaimerPrivacy" = "Privacybeleid"; + +"AuthOTPEmailTitle" = "E-mail bevestigen"; + +"AuthOTPPhoneTitle" = "Telefoonnummer bevestigen"; + +"AuthOTPEmailHint" = "We hebben een e-mailbericht gestuurd met de activatiecode.\nVoer deze code in het veld hieronder in."; + +"AuthOTPPhoneHint" = "We hebben een SMS bericht gestuurd met de activatiecode.\nVoer deze code in het veld hieronder in."; + +"AuthOTPPlaceholder" = "Activatiecode"; + +"AuthOTPNoCode" = "Code niet ontvangen?"; + +"AuthOTPCallHint" = "{app_name} zal in {time} contact opnemen"; + + +/* + * Common Elements + */ + +"CurrentLocale" = "Nl"; + + +// NOTE: theming +"InviteText" = "Hoi! Zullen we {appname} gebruiken voor een veilige en verbonden buurt? {link}"; + +"PhotoRemove" = "Verwijder foto"; + +"PhotoRemoveGroupMessage" = "Deze groepsafbeelding verwijderen? Sommige leden zullen teleurgesteld zijn."; + +"PhotoCamera" = "Maak een foto of neem een video op"; + +"PhotoLibrary" = "Mediagallerij"; + +"SendDocument" = "Document"; + +"ShareLocation" = "Locatie"; + +"ShareContact" = "Contact delen"; + +/* + * Navigation + */ + +"NavigationEdit" = "Bewerk"; + +"NavigationDone" = "Klaar"; + +"NavigationCancel" = "Annuleer"; + +"NavigationBack" = ""; + +"NavigationNext" = "Volgende"; + +"NavigationSave" = "Opslaan"; + +"NavigationFind" = "Zoeken"; + +/* + * Alerts + */ + +"AlertUnblock" = "Blokkering opheffen"; + +"AlertCancel" = "Annuleer"; + +"AlertNext" = "Volgende"; + +"AlertSave" = "Opslaan"; + +"AlertSet" = "Instellen"; + +"AlertOk" = "OK"; + +"AlertYes" = "Ja"; + +"AlertNo" = "Nee"; + +"AlertError" = "Fout"; + +"AlertTryAgain" = "Probeer opnieuw"; + +"AlertInvite" = "Uitnodigen"; + +"UnsupportedContent" = "Dit bericht wordt in deze versie niet ondersteund. Wacht op het bijwerken van de applicatie om het bericht te kunnen zien."; + +/* + * Actions + */ + +"ActionCopyLink" = "Kopieer link"; + +"ActionRevokeLink" = "Intrekken"; + +"ActionShareLink" = "Delen"; + +"AlertLinkCopied" = "Gekopieerd naar het klembord."; + +"ActionOpenLink" = "Koppeling openen"; + +"ActionCancel" = "Annuleer"; + +"ActionAddPhoto1" = "toevoegen"; + +"ActionAddPhoto2" = "foto"; + +"ActionOpenCode" = "Code bekijken"; + +"ActionMute" = "Stil"; + +"ActionUnmute" = "Geluid aan"; + + +"ActionDelete" = "Verwijder"; + +// FIXME: I am not getting delete confirmation message +"ActionDeleteMessage" = "Deze berichtgeschiedenis definitief verwijderen?"; + + +"ActionDeleteChannel" = "Verwijder kanaal"; + +"ActionDeleteChannelMessage" = "Let op! Door dit kanaal te verwijderen worden alle berichten verwijderd en alle lidmaatschappen beeindigd. Dit kan niet ongedaan gemaakt worden. Toch dit kanaal verwijderen?"; + +"ActionDeleteGroup" = "Verwijder groep"; + +"ActionDeleteGroupMessage" = "Let op! Door deze groep te verwijderen worden alle berichten verwijderd en alle lidmaatschappen beeindigd. Dit kan niet ongedaan gemaakt worden. Toch deze groep verwijderen?"; + + +"ActionLeaveChannel" = "Verlaat kanaal"; + +"ActionLeaveChannelMessage" = "Het lidmaatschap wordt hiermee beëindigd. Toch dit kanaal verlaten?"; + +"ActionLeaveChannelAction" = "Verlaten"; + + + +"ActionDeleteAndExit" = "Verwijder en afsluiten"; + +"ActionDeleteAndExitMessage" = "Definitief deze groep verlaten en alle berichten verwijderen?"; + +"ActionDeleteAndExitAction" = "Verwijder"; + + + +"ActionClearHistory" = "Geschiedenis wissen"; + +"ActionClearHistoryMessage" = "De geschiedenis wordt gewist, is dit de bedoeling?"; + +"ActionClearHistoryAction" = "Wissen"; + +/* + * Network + */ + +"StatusConnecting" = "Verbinden..."; + +"StatusSyncing" = "Synchroniseren..."; + +/* + * Errors + */ + +"ErrorPhoneIncorrect" = "Opgegeven telefoonnummer is ongeldig. Probeer het nog eens."; + +"ErrorCodeExpired" = "Code verlopen. Start aanmelding en autoriseer opnieuw."; + +"ErrorAlreadyJoined" = "Er is al een lidmaatschap van deze groep."; + +"ErrorUnableToJoin" = "Nu niet mogelijk lid te worden van de groep."; + +"ErrorUnableToCall" = "Niet mogelijk dit nummer nu te bellen."; diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Resources/pt-BR.lproj/Localizable.strings b/actor-sdk/sdk-core-ios/ActorSDK/Resources/pt-BR.lproj/Localizable.strings new file mode 100644 index 0000000000..a8880a3d35 --- /dev/null +++ b/actor-sdk/sdk-core-ios/ActorSDK/Resources/pt-BR.lproj/Localizable.strings @@ -0,0 +1,726 @@ +// +// Copyright (c) 2014-2016 Actor LLC. +// + +/* + * Main Screen + */ + +"TabMessages" = "Mensagens"; + +"TabPeople" = "Contatos"; + +"TabSettings" = "Configurações"; + +"TabDiscover" = "Descobrir"; + +/* + * Contacts + */ + +"ContactsAddHeader" = "Adicionar Contato"; + +"ContactsAddHint" = "Por favor, insira o número de telefone"; + +"ContactsActionInvite" = "Avise seus amigos sobre o {appname}"; + +"ContactsActionAdd" = "Adicionar Amigo(a)"; + +"ContactsBack" = "Contatos"; + +/* + * Dialogs + */ + +"DialogsHint" = "Deslise para mais opções"; + +"DialogsBack" = "Chats"; + +/* + * Settings + */ + +"SettingsEdit" = "Editar"; + +"SettingsSetPhoto" = "Definir Foto do Perfil"; + +"SettingsChangeName" = "Alterar Seu Nome"; + + +"SettingsEditHeader" = "Your name"; + +"SettingsEditHint" = "Please, enter your real name to help people better understand who you are."; + +"SettingsEditFieldHint" = "Enter your name"; + + +"SettingsAboutNotSet" = "Set about me"; + +"SettingsChangeAboutTitle" = "About me"; + +"SettingsChangeAboutHint" = "Tell people anything you want about yourself"; + + +"SettingsUsernameNotSet" = "Set username"; + +"SettingsUsernameTitle" = "Username"; + +"SettingsUsernameHintField" = "Enter your Username"; + +"SettingsUsernameHint" = "You can choose a username in {appname}. If you do, other people will be able to find you by this username and contact you without sharing your phone number.\n\nYou can use a-z, 0-9 and underscores. Minumum length is 5 characters."; + + +"SettingsSecurity" = "Privacy and Security"; + +"SettingsWallpapers" = "Wallpapers"; + +"SettingsMedia" = "Media Settings"; + +"SettingsNotifications" = "Alertas e Sons"; + +"SettingsAskQuestion" = "Fazer uma pergunta"; + +"SettingsTwitter" = "App Twitter"; + +"SettingsAbout" = "App Homepage"; + +"SettingsVersion" = "Versão {version}"; + +"SettingsMobilePhone" = "Telefone Móvel"; + +"SettingsGroupChats" = "Groups"; + +"SettingsPrivateChats" = "Private Chats"; + +/* + * Notifications + */ + +"NotificationsTitle" = "Alertas e Sons"; + +"NotificationsEffectsTitle" = "Efeitos"; + +"NotificationsMobileTitle" = "Notificações do Aparelho"; + +"NotificationsInAppTitle" = "Notificações do Aplicativo"; + +"NotificationsNotificationHint" = "Você pode desativar as notificações para usuários e grupos nas suas páginas específicas de informação."; + +"NotificationsPrivacyTitle" = "Privacidade"; + +"NotificationsSoundEffects" = "Efeitos Sonoros"; + +"NotificationsEnable" = "Ativar"; + +"NotificationsSound" = "Som"; + +"NotificationsVibration" = "vibrar"; + +"NotificationsPreview" = "Visualizar Mensagem"; + +"NotificationsPreviewHint" = "Remover texto da mensagem da notificação."; + +"NotificationSecretMessage" = "Nova Mensagem"; + +"NotificationsGroups" = "Group Notifications"; + +"NotificationsOnlyMentions" = "Only Mentions"; + +"NotificationsOnlyMentionsHint" = "You can enable notifications only for messages that contains your mention"; + +/* + * Media + */ + +"MediaTitle" = "Media Settings"; + +"MediaPhotoDownloadHeader"= "Automatic Photo Download"; + +"MediaAudioDownloadHeader"= "Automatic Audio Download"; + +"MediaOtherHeader"= "Other"; + +"MediaAutoplayGif"= "Autoplay GIFs"; + +/* + * Privacy + */ + +"PrivacyTitle" = "Privacy and Security"; + + +"PrivacyHeader" = "Privacy"; + +"PrivacyLastSeen" = "Visto pela ultima vez"; + +"PrivacyLastSeenHint" = "Alterar quem pode ver o seu tempo Última atividade."; + +"PrivacyLastSeenEverybody" = "Todo mundo"; + +"PrivacyLastSeenContacts" = "Meus contatos"; + +"PrivacyLastSeenNone" = "Ninguém"; + + +"PrivacySecurityHeader" = "Security"; + +"PrivacyAllSessions" = "Active Sessions"; + +"PrivacyTerminate" = "Encerrar todas as sessões"; + +"PrivacyTerminateAlert" = "Terminate all sessions"; + +"PrivacyTerminateAlertSingle" = "Terminate session"; + +"PrivacyTerminateHint" = "Descredencia todos os demais dispositivos menos este."; + +/* + * Calls + */ + +"CallsStartAudio" = "Audio Call"; + +"CallsStartGroupAudio" = "Group Audio Call"; + +"CallsAnswer" = "answer"; + +"CallsDecline" = "decline"; + +"CallsMute" = "mute"; + +"CallsSpeaker" = "speaker"; + +"CallsVideo" = "video"; + +"CallStateRinging" = "Ringing..."; + +"CallStateConnecting" = "Connecting..."; + +"CallStateIncoming" = "Incoming call..."; + +"CallPrivateTitle" = "Private Call"; + +"CallPrivateText" = "Call from {name}"; + +"CallGroupTitle" = "Group Call"; + +"CallGroupText" = "Group call {name}"; + +/* + * Profile + */ + +"ProfileEditHeader" = "Alterar name"; + +"ProfileSendMessage" = "Enviar Mensagem"; + +"ProfileNotifications" = "Alertas"; + +"ProfileNotificationsWarring" = "Você tem certeza que quer desativar os alertas para esse contato? Talvez isso cause problemas no relacionamento."; + +"ProfileNotificationsWarringAction" = "Desativar"; + +"ProfileAddToContacts" = "Adicionar aos contatos"; + +"ProfileRemoveFromContacts" = "Remover dos contatos"; + +"ProfileRename" = "Renomear Contato"; + +"ProfileRenameMessage" = "Você pode renomear conttos para organizar sua lista. As alterações serão vistas somente por você."; + +"ProfileRenameAction" = "Renomear"; + +"ProfileAbout" = "about"; + +"ProfilePhone" = "phone"; + +"ProfileUsername" = "username"; + +"ProfileTitle" = "Info"; + +"ProfileBlockContact" = "Block User"; + +"ProfileUnblockContact" = "Unblock User"; + +"CallNumber" = "Chamar número"; + +"CopyNumber" = "Copiar número"; + +"NumberCopied" = "Número de telefone copiadio para a área de transferência"; + +/* + * Publics + */ + +"JoinAlertMessage" = "Você quer fazer parte deste grupo?"; + +/* + * Group + */ + +"GroupEditHeader" = "Theme"; + +"GroupEditHint" = "Enter group theme"; + +"GroupSetPhoto" = "Definir Foto do Grupo"; + +"GroupSetTitle" = "Definir Nome do Grupo"; + +"GroupEditConfirm" = "Você tem certeza que quer mudar o nome do grupo?"; + +"GroupEditConfirmAction" = "Alterar Tema"; + +"GroupNotifications" = "Alertas"; + +"GroupSettings" = "CONFIGURAÇÕES"; + +"GroupIntegrations" = "Integrações"; + +"GroupDescription" = "Description"; + + + +"GroupAdministration" = "Administration"; + +"GroupTypeTitle" = "Group Type"; + +"GroupTypeTitleChannel" = "Channel Type"; + +"GroupTypePublic" = "Public"; + +"GroupTypePrivate" = "Private"; + +"ChannelTypePublic" = "Public"; + +"ChannelTypePrivate" = "Private"; + +"GroupTypePublicFull" = "Public Group"; + +"GroupTypePrivateFull" = "Private Group"; + +"ChannelTypePublicFull" = "Public Channel"; + +"ChannelTypePrivateFull" = "Private Channel"; + +"GroupPermissionsHint" = "Control what is possible in this group"; + +"GroupPermissionsHintChannel" = "Control what is possible in this channel"; + +"GroupTypeHintPublic" = "Public groups can be found in search and anyone can join"; + +"GroupTypeHintPrivate" = "Private groups can be joined only via personal invitation"; + +"GroupTypeHintPublicChannel" = "Public channels can be found in search and anyone can join"; + +"GroupTypeHintPrivateChannel" = "Private channels can be joined only via personal invitation"; + +"GroupTypeLinkHint" = "People can share this link with others and find your group using search"; + +"GroupTypeLinkHintChannel" = "People can share this link with others and find your channel using search"; + +"GroupDeleteHint" = "You will lose all messages in this group"; + +"GroupDeleteHintChannel" = "You will lose all messages in this channel"; + + +"GroupShareTitle" = "Shared History"; + +"GroupShareEnabled" = "Shared"; + +"GroupShareHint" = "All members will see all messages"; + +"GroupShareMessage" = "Are you sure want to share all messages to all members? This action is irreversible."; + +"GroupShareAction" = "Share"; + + +"GroupEditTitle" = "Edit Group"; + +"GroupEditTitleChannel" = "Edit Channel"; + +"GroupEditName" = "Group Name"; + +"GroupEditNameChannel" = "Channel Name"; + +"GroupEditDescription" = "Description"; + + + +"GroupViewMembers" = "Membros"; + +"GroupMemberAdmin" = "admin"; + +"GroupMemberInfo" = "Perfil"; + +"GroupMemberMakeAdmin" = "Make Group admin"; + +"GroupMemberMakeMessage" = "Are you sure want to make {name} admin of this group?"; + +"GroupMemberMakeAction" = "Yes"; + +"GroupMemberKick" = "Remover do Grupo"; + +"GroupMemberKickMessage" = "Você tem certeza que quer remover {name} do grupo?"; + +"GroupMemberKickAction" = "Remover"; + +"GroupMemberWrite" = "Escrever Mensagem"; + +"GroupMemberCall" = "Chamada Telefônica"; + +"GroupMemberCallNoPhones" = "O usuário não tem número de telefone."; + +"GroupAddParticipant" = "Adicionar Participante..."; + +"GroupAddParticipantTitle" = "Contatos"; + +"GroupAddParticipantUrl" = "COnvidar para o grupo via Link"; + + + +"GroupInviteLinkPageTitle" = "Link de Convite"; + +"GroupInviteLinkTitle" = "LINK"; + +"GroupInviteLinkHint" = "Você pode convidar pessoas para este grupo enviando este link."; + +"GroupInviteLinkRevokeMessage" = "Você tem certeza que quer remover este link? Uma vez removido, mais ninguém sera capaz de entrar no grupo usando este link."; + +"GroupInviteLinkRevokeAction" = "Remover"; + +/* + * Compose + */ + +"ComposeTitle" = "Nova Mensagem"; + + +"CreateGroup" = "Criar Grupo"; + +"CreateChannel" = "Create Channel"; + + +"CreateGroupTitle" = "Criar Grupo"; + +"CreateGroupNamePlaceholder" = "Inserir nome do grupo"; + +"CreateGroupHint" = "Please provide group subject and optional group icon"; + + +"CreateChannelTitle" = "Create Channel"; + +"CreateChannelHint" = "Please provide the channel name and an optional channel icon"; + +"CreateChannelNamePlaceholder" = "Channel Name"; + + +"CreateGroupMembersTitle" = "Invite members"; + +"CreateGroupMembersPlaceholders" = "Enter Names"; + +"ChatDeleted" = "This chat was deleted by owner."; + +/* + * Location + */ + +"LocationTitle" = "Localização"; + + + +/* + * Wallpapers + */ + +"WallpapersTitle" = "Wallpapers"; + +"WallpapersPhoto" = "Photo Library"; + +/* + * Chat + */ + +"ChatPlaceholder" = "Insira texto..."; + +"ChatSend" = "Enviar"; + +"ChatNoGroupAccess" = "Você não é membro"; + +"ChatDeleted" = "This chat was deleted by owner."; + +"ChatJoin" = "Join"; + +/* + * Find + */ + +"FindTitle" = "Find People"; + +"FindFieldHint" = "phone number, email or nickname"; + +"FindHint" = "Enter phone number, email or nickname and press search"; + +"FindNotFound" = "Sorry, but we are unable to find person for this search query"; + +/* + * Placeholders + */ + +"Placeholder_Empty_Title" = "COnvide seus amigos"; + +"Placeholder_Empty_Message" = "Nenhum dos seus contatos usa {appname}. Use o botão abaixo para convidá-los."; + +"Placeholder_Empty_Action" = "AVISE UM(A) AMIGO(A)"; + +"Placeholder_Empty_Message2" = "ou adicione um contato manualmente"; + +"Placeholder_Empty_Action2" = "ADICIONAR CONTATO"; + +"Placeholder_Loading_Title" = "Sincronizando"; + +"Placeholder_Loading_Message" = "Por favor, espero um pouco enquanto habilitamos seu aplicativo."; + +"Placeholder_Contacts_Title" = "Convide seus amigos(as)"; + +"Placeholder_Contacts_Message" = "Nenhum dos seus contatos usa {appname}. Use o botão abaixo para convidá-los."; + +"Placeholder_Contacts_Action" = "AVISE UM(A) AMIGO(A)"; + +"Placeholder_Contacts_Message2" = "ou adicione um contato manualmente usando o botão de mais no canto superior direito"; + +"Placeholder_Dialogs_Title" = "Começar a conversar"; + +"Placeholder_Dialogs_Message" = "Escolha um contato da sua lista ou pessione o botão de escrita no canto superior direito para começar a conversas imediatamente."; + +"Placeholder_Group_Title" = "Não é membro"; + +"Placeholder_Group_Message" = "Infelizmente você não é menro desse grupo."; + +"Placeholder_Location_Title" = "Ativar localização"; + +"Placeholder_Location_Message" = "Ative os Serviços de Localização em configurações do dispositivo para partilhar a sua localização."; + + +/* + * Welcome + */ + +"WelcomeTitle" = "Bem vindo ao {app_name}!"; + +"WelcomeTagline" = "Mensageiro rápido e gratuido"; + +"WelcomeSignUp" = "Entrar"; + +"WelcomeLogIn" = "Entrar"; + + +/* + * Auth + */ + +"AuthUnsupported" = "Essa conta não é suportada nesta versão do {app_name}. Favor atualizar para logar nessa conta."; + +"AuthLoginTitle" = "Login no {app_name}"; + +"AuthLoginPhone" = "Fone"; + +"AuthLoginEmail" = "E-mail"; + +"AuthLoginPhoneEmail" = "Fone ou E-mail"; + +"AuthNameTitle" = "Olá! Qual o seu nome?"; + +"AuthNamePlaceholder" = "Nome completo"; + +"AuthPhoneTitle" = "Qual é o seu número de telefone?"; + +"AuthPhoneUseEmail" = "Use e-mail"; + +"AuthPhoneHint" = "Nós precisamos do seu número de telefone para garantir a segurança de seus dados pessoais."; + +"AuthPhonePlaceholder" = "Número do Telefone"; + +"AuthCountryTitle" = "Código do País"; + +"AuthEmailTitle" = "Qual é o seu e-mail?"; + +"AuthEmailHint" = "Nós não vamos te enviar spam."; + +"AuthEmailPlaceholder" = "Seu e-mail"; + +"AuthEmailUsePhone" = "Use o telefone"; + +"AuthDisclaimer" = "Ao registrar-se, você concorda com os Termos de Serviço e a Política de Privacidade."; + +"AuthDisclaimerTosOnly" = "Ao registrar-se, você concorda com os Termos de Serviço."; + +"AuthDisclaimerPrivacyOnly" = "Ao registrar-se, você concorda com a Política de Privacidade."; + +"AuthDisclaimerToS" = "Termos de Serviço"; + +"AuthDisclaimerPrivacy" = "Política de Privacidade"; + +"AuthOTPEmailTitle" = "Confirme seu e-mail"; + +"AuthOTPPhoneTitle" = "Confirme seu telefone"; + +"AuthOTPEmailHint" = "Nós lhe enviamos um código de confirmação.\nDigite ele abaixo."; + +"AuthOTPPhoneHint" = "Nós lhe enviamos um código de confirmação.\nDigite ele abaixo."; + +"AuthOTPPlaceholder" = "Código de Confirmação"; + +"AuthOTPNoCode" = "Não recebeu o código?"; + +"AuthOTPCallHint" = "{app_name} irá ligar para você em {time}"; + + + +/* + * Common Elements + */ + +"CurrentLocale" = "pt-BR"; + +"InviteText" = "Olá! Vamos mudar para o {appname}! {link}"; + +"PhotoRemove" = "Remover Foto"; + +"PhotoRemoveGroupMessage" = "Você tem certeza que quer to remover a foto do grupo? Alguns membros poderão não gostar."; + +"PhotoCamera" = "Tirar Foto ou Vídeo"; + +"PhotoLibrary" = "Biblioteca de Midias"; + +"ShareLocation" = "Localização"; + +"ShareContact" = "Compartilhar contato"; + +"SendDocument" = "Documento"; + +/* + * Navigation + */ + +"NavigationEdit" = "Editar"; + +"NavigationDone" = "Feito"; + +"NavigationCancel" = "Cancelar"; + +"NavigationBack" = ""; + +"NavigationNext" = "Próximo"; + +"NavigationSave" = "Salvar"; + +"NavigationFind" = "Find"; + +/* + * Alerts + */ + +"AlertCancel" = "Cancelar"; + +"AlertNext" = "Próximo"; + +"AlertSave" = "Salvar"; + +"AlertOk" = "OK"; + +"AlertSet" = "Set"; + +"AlertYes" = "Sim"; + +"AlertNo" = "Não"; + +"AlertError" = "Error"; + +"AlertTryAgain" = "Try Again"; + +"AlertInvite" = "Invite"; + +"UnsupportedContent" = "Mensagem não suportada nesta versão. Por favor espere por uma atualização para ver esta mensagem."; + +/* + * Actions + */ + +"ActionCopyLink" = "Copiar Link"; + +"ActionRevokeLink" = "Remover Link"; + +"ActionShareLink" = "Compartilhar Link"; + +"AlertLinkCopied" = "Link copiado para a área de transferência."; + +"ActionOpenLink" = "Link Aberto"; + +"ActionCancel" = "Cancelar"; + +"ActionAddPhoto1" = "adicionar"; + +"ActionAddPhoto2" = "foto"; + +"ActionOpenCode" = "View Code"; + +"ActionMute" = "Mute"; + +"ActionUnmute" = "Unmute"; + + +"ActionDelete" = "Delete"; + +"ActionDeleteMessage" = "Are you sure want to delete chat?"; + + +"ActionDeleteChannel" = "Delete Channel"; + +"ActionDeleteChannelMessage" = "Wait! Deleting this channel will remove all members and all messages will be lost. Delete the channel anyway?"; + +"ActionDeleteGroup" = "Delete Group"; + +"ActionDeleteGroupMessage" = "Wait! Deleting this group will remove all members and all messages will be lost. Delete the group anyway?"; + + +"ActionLeaveChannel" = "Leave Channel"; + +"ActionLeaveChannelMessage" = "Are you sure want to leave channel?"; + +"ActionLeaveChannelAction" = "Leave"; + + + +"ActionDeleteAndExit" = "Delete and Exit"; + +"ActionDeleteAndExitMessage" = "Are you sure want to exit group and delete all messages?"; + +"ActionDeleteAndExitAction" = "Exit"; + + + +"ActionClearHistory" = "Clear History"; + +"ActionClearHistoryMessage" = "Are you sure want to clear history?"; + +"ActionClearHistoryAction" = "Clear"; + +/* + * Network + */ + +"StatusConnecting" = "Conectar..."; + +"StatusSyncing" = "Sincronizando..."; + +/* + * Errors + */ + +"ErrorPhoneIncorrect" = "Número de telefone inválido. Por favor tente de novo."; + +"ErrorCodeExpired" = "Código expirou. Por favor reinicie a autenticação."; + +"ErrorUnableToJoin" = "Unable to join to group"; + +"ErrorUnableToCall" = "Unable to call this number"; diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Resources/pt.lproj/Localizable.strings b/actor-sdk/sdk-core-ios/ActorSDK/Resources/pt.lproj/Localizable.strings index e867ef01ff..a8880a3d35 100644 --- a/actor-sdk/sdk-core-ios/ActorSDK/Resources/pt.lproj/Localizable.strings +++ b/actor-sdk/sdk-core-ios/ActorSDK/Resources/pt.lproj/Localizable.strings @@ -505,13 +505,13 @@ * Welcome */ -"WelcomeTitle" = "Welcome to {app_name}!"; +"WelcomeTitle" = "Bem vindo ao {app_name}!"; -"WelcomeTagline" = "Free, fast and secure messaging."; +"WelcomeTagline" = "Mensageiro rápido e gratuido"; -"WelcomeSignUp" = "Sign Up"; +"WelcomeSignUp" = "Entrar"; -"WelcomeLogIn" = "Log In"; +"WelcomeLogIn" = "Entrar"; /* @@ -580,7 +580,7 @@ * Common Elements */ -"CurrentLocale" = "Pt"; +"CurrentLocale" = "pt-BR"; "InviteText" = "Olá! Vamos mudar para o {appname}! {link}"; diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Resources/pt_br.lproj/Localizable.strings b/actor-sdk/sdk-core-ios/ActorSDK/Resources/pt_br.lproj/Localizable.strings new file mode 100644 index 0000000000..a8880a3d35 --- /dev/null +++ b/actor-sdk/sdk-core-ios/ActorSDK/Resources/pt_br.lproj/Localizable.strings @@ -0,0 +1,726 @@ +// +// Copyright (c) 2014-2016 Actor LLC. +// + +/* + * Main Screen + */ + +"TabMessages" = "Mensagens"; + +"TabPeople" = "Contatos"; + +"TabSettings" = "Configurações"; + +"TabDiscover" = "Descobrir"; + +/* + * Contacts + */ + +"ContactsAddHeader" = "Adicionar Contato"; + +"ContactsAddHint" = "Por favor, insira o número de telefone"; + +"ContactsActionInvite" = "Avise seus amigos sobre o {appname}"; + +"ContactsActionAdd" = "Adicionar Amigo(a)"; + +"ContactsBack" = "Contatos"; + +/* + * Dialogs + */ + +"DialogsHint" = "Deslise para mais opções"; + +"DialogsBack" = "Chats"; + +/* + * Settings + */ + +"SettingsEdit" = "Editar"; + +"SettingsSetPhoto" = "Definir Foto do Perfil"; + +"SettingsChangeName" = "Alterar Seu Nome"; + + +"SettingsEditHeader" = "Your name"; + +"SettingsEditHint" = "Please, enter your real name to help people better understand who you are."; + +"SettingsEditFieldHint" = "Enter your name"; + + +"SettingsAboutNotSet" = "Set about me"; + +"SettingsChangeAboutTitle" = "About me"; + +"SettingsChangeAboutHint" = "Tell people anything you want about yourself"; + + +"SettingsUsernameNotSet" = "Set username"; + +"SettingsUsernameTitle" = "Username"; + +"SettingsUsernameHintField" = "Enter your Username"; + +"SettingsUsernameHint" = "You can choose a username in {appname}. If you do, other people will be able to find you by this username and contact you without sharing your phone number.\n\nYou can use a-z, 0-9 and underscores. Minumum length is 5 characters."; + + +"SettingsSecurity" = "Privacy and Security"; + +"SettingsWallpapers" = "Wallpapers"; + +"SettingsMedia" = "Media Settings"; + +"SettingsNotifications" = "Alertas e Sons"; + +"SettingsAskQuestion" = "Fazer uma pergunta"; + +"SettingsTwitter" = "App Twitter"; + +"SettingsAbout" = "App Homepage"; + +"SettingsVersion" = "Versão {version}"; + +"SettingsMobilePhone" = "Telefone Móvel"; + +"SettingsGroupChats" = "Groups"; + +"SettingsPrivateChats" = "Private Chats"; + +/* + * Notifications + */ + +"NotificationsTitle" = "Alertas e Sons"; + +"NotificationsEffectsTitle" = "Efeitos"; + +"NotificationsMobileTitle" = "Notificações do Aparelho"; + +"NotificationsInAppTitle" = "Notificações do Aplicativo"; + +"NotificationsNotificationHint" = "Você pode desativar as notificações para usuários e grupos nas suas páginas específicas de informação."; + +"NotificationsPrivacyTitle" = "Privacidade"; + +"NotificationsSoundEffects" = "Efeitos Sonoros"; + +"NotificationsEnable" = "Ativar"; + +"NotificationsSound" = "Som"; + +"NotificationsVibration" = "vibrar"; + +"NotificationsPreview" = "Visualizar Mensagem"; + +"NotificationsPreviewHint" = "Remover texto da mensagem da notificação."; + +"NotificationSecretMessage" = "Nova Mensagem"; + +"NotificationsGroups" = "Group Notifications"; + +"NotificationsOnlyMentions" = "Only Mentions"; + +"NotificationsOnlyMentionsHint" = "You can enable notifications only for messages that contains your mention"; + +/* + * Media + */ + +"MediaTitle" = "Media Settings"; + +"MediaPhotoDownloadHeader"= "Automatic Photo Download"; + +"MediaAudioDownloadHeader"= "Automatic Audio Download"; + +"MediaOtherHeader"= "Other"; + +"MediaAutoplayGif"= "Autoplay GIFs"; + +/* + * Privacy + */ + +"PrivacyTitle" = "Privacy and Security"; + + +"PrivacyHeader" = "Privacy"; + +"PrivacyLastSeen" = "Visto pela ultima vez"; + +"PrivacyLastSeenHint" = "Alterar quem pode ver o seu tempo Última atividade."; + +"PrivacyLastSeenEverybody" = "Todo mundo"; + +"PrivacyLastSeenContacts" = "Meus contatos"; + +"PrivacyLastSeenNone" = "Ninguém"; + + +"PrivacySecurityHeader" = "Security"; + +"PrivacyAllSessions" = "Active Sessions"; + +"PrivacyTerminate" = "Encerrar todas as sessões"; + +"PrivacyTerminateAlert" = "Terminate all sessions"; + +"PrivacyTerminateAlertSingle" = "Terminate session"; + +"PrivacyTerminateHint" = "Descredencia todos os demais dispositivos menos este."; + +/* + * Calls + */ + +"CallsStartAudio" = "Audio Call"; + +"CallsStartGroupAudio" = "Group Audio Call"; + +"CallsAnswer" = "answer"; + +"CallsDecline" = "decline"; + +"CallsMute" = "mute"; + +"CallsSpeaker" = "speaker"; + +"CallsVideo" = "video"; + +"CallStateRinging" = "Ringing..."; + +"CallStateConnecting" = "Connecting..."; + +"CallStateIncoming" = "Incoming call..."; + +"CallPrivateTitle" = "Private Call"; + +"CallPrivateText" = "Call from {name}"; + +"CallGroupTitle" = "Group Call"; + +"CallGroupText" = "Group call {name}"; + +/* + * Profile + */ + +"ProfileEditHeader" = "Alterar name"; + +"ProfileSendMessage" = "Enviar Mensagem"; + +"ProfileNotifications" = "Alertas"; + +"ProfileNotificationsWarring" = "Você tem certeza que quer desativar os alertas para esse contato? Talvez isso cause problemas no relacionamento."; + +"ProfileNotificationsWarringAction" = "Desativar"; + +"ProfileAddToContacts" = "Adicionar aos contatos"; + +"ProfileRemoveFromContacts" = "Remover dos contatos"; + +"ProfileRename" = "Renomear Contato"; + +"ProfileRenameMessage" = "Você pode renomear conttos para organizar sua lista. As alterações serão vistas somente por você."; + +"ProfileRenameAction" = "Renomear"; + +"ProfileAbout" = "about"; + +"ProfilePhone" = "phone"; + +"ProfileUsername" = "username"; + +"ProfileTitle" = "Info"; + +"ProfileBlockContact" = "Block User"; + +"ProfileUnblockContact" = "Unblock User"; + +"CallNumber" = "Chamar número"; + +"CopyNumber" = "Copiar número"; + +"NumberCopied" = "Número de telefone copiadio para a área de transferência"; + +/* + * Publics + */ + +"JoinAlertMessage" = "Você quer fazer parte deste grupo?"; + +/* + * Group + */ + +"GroupEditHeader" = "Theme"; + +"GroupEditHint" = "Enter group theme"; + +"GroupSetPhoto" = "Definir Foto do Grupo"; + +"GroupSetTitle" = "Definir Nome do Grupo"; + +"GroupEditConfirm" = "Você tem certeza que quer mudar o nome do grupo?"; + +"GroupEditConfirmAction" = "Alterar Tema"; + +"GroupNotifications" = "Alertas"; + +"GroupSettings" = "CONFIGURAÇÕES"; + +"GroupIntegrations" = "Integrações"; + +"GroupDescription" = "Description"; + + + +"GroupAdministration" = "Administration"; + +"GroupTypeTitle" = "Group Type"; + +"GroupTypeTitleChannel" = "Channel Type"; + +"GroupTypePublic" = "Public"; + +"GroupTypePrivate" = "Private"; + +"ChannelTypePublic" = "Public"; + +"ChannelTypePrivate" = "Private"; + +"GroupTypePublicFull" = "Public Group"; + +"GroupTypePrivateFull" = "Private Group"; + +"ChannelTypePublicFull" = "Public Channel"; + +"ChannelTypePrivateFull" = "Private Channel"; + +"GroupPermissionsHint" = "Control what is possible in this group"; + +"GroupPermissionsHintChannel" = "Control what is possible in this channel"; + +"GroupTypeHintPublic" = "Public groups can be found in search and anyone can join"; + +"GroupTypeHintPrivate" = "Private groups can be joined only via personal invitation"; + +"GroupTypeHintPublicChannel" = "Public channels can be found in search and anyone can join"; + +"GroupTypeHintPrivateChannel" = "Private channels can be joined only via personal invitation"; + +"GroupTypeLinkHint" = "People can share this link with others and find your group using search"; + +"GroupTypeLinkHintChannel" = "People can share this link with others and find your channel using search"; + +"GroupDeleteHint" = "You will lose all messages in this group"; + +"GroupDeleteHintChannel" = "You will lose all messages in this channel"; + + +"GroupShareTitle" = "Shared History"; + +"GroupShareEnabled" = "Shared"; + +"GroupShareHint" = "All members will see all messages"; + +"GroupShareMessage" = "Are you sure want to share all messages to all members? This action is irreversible."; + +"GroupShareAction" = "Share"; + + +"GroupEditTitle" = "Edit Group"; + +"GroupEditTitleChannel" = "Edit Channel"; + +"GroupEditName" = "Group Name"; + +"GroupEditNameChannel" = "Channel Name"; + +"GroupEditDescription" = "Description"; + + + +"GroupViewMembers" = "Membros"; + +"GroupMemberAdmin" = "admin"; + +"GroupMemberInfo" = "Perfil"; + +"GroupMemberMakeAdmin" = "Make Group admin"; + +"GroupMemberMakeMessage" = "Are you sure want to make {name} admin of this group?"; + +"GroupMemberMakeAction" = "Yes"; + +"GroupMemberKick" = "Remover do Grupo"; + +"GroupMemberKickMessage" = "Você tem certeza que quer remover {name} do grupo?"; + +"GroupMemberKickAction" = "Remover"; + +"GroupMemberWrite" = "Escrever Mensagem"; + +"GroupMemberCall" = "Chamada Telefônica"; + +"GroupMemberCallNoPhones" = "O usuário não tem número de telefone."; + +"GroupAddParticipant" = "Adicionar Participante..."; + +"GroupAddParticipantTitle" = "Contatos"; + +"GroupAddParticipantUrl" = "COnvidar para o grupo via Link"; + + + +"GroupInviteLinkPageTitle" = "Link de Convite"; + +"GroupInviteLinkTitle" = "LINK"; + +"GroupInviteLinkHint" = "Você pode convidar pessoas para este grupo enviando este link."; + +"GroupInviteLinkRevokeMessage" = "Você tem certeza que quer remover este link? Uma vez removido, mais ninguém sera capaz de entrar no grupo usando este link."; + +"GroupInviteLinkRevokeAction" = "Remover"; + +/* + * Compose + */ + +"ComposeTitle" = "Nova Mensagem"; + + +"CreateGroup" = "Criar Grupo"; + +"CreateChannel" = "Create Channel"; + + +"CreateGroupTitle" = "Criar Grupo"; + +"CreateGroupNamePlaceholder" = "Inserir nome do grupo"; + +"CreateGroupHint" = "Please provide group subject and optional group icon"; + + +"CreateChannelTitle" = "Create Channel"; + +"CreateChannelHint" = "Please provide the channel name and an optional channel icon"; + +"CreateChannelNamePlaceholder" = "Channel Name"; + + +"CreateGroupMembersTitle" = "Invite members"; + +"CreateGroupMembersPlaceholders" = "Enter Names"; + +"ChatDeleted" = "This chat was deleted by owner."; + +/* + * Location + */ + +"LocationTitle" = "Localização"; + + + +/* + * Wallpapers + */ + +"WallpapersTitle" = "Wallpapers"; + +"WallpapersPhoto" = "Photo Library"; + +/* + * Chat + */ + +"ChatPlaceholder" = "Insira texto..."; + +"ChatSend" = "Enviar"; + +"ChatNoGroupAccess" = "Você não é membro"; + +"ChatDeleted" = "This chat was deleted by owner."; + +"ChatJoin" = "Join"; + +/* + * Find + */ + +"FindTitle" = "Find People"; + +"FindFieldHint" = "phone number, email or nickname"; + +"FindHint" = "Enter phone number, email or nickname and press search"; + +"FindNotFound" = "Sorry, but we are unable to find person for this search query"; + +/* + * Placeholders + */ + +"Placeholder_Empty_Title" = "COnvide seus amigos"; + +"Placeholder_Empty_Message" = "Nenhum dos seus contatos usa {appname}. Use o botão abaixo para convidá-los."; + +"Placeholder_Empty_Action" = "AVISE UM(A) AMIGO(A)"; + +"Placeholder_Empty_Message2" = "ou adicione um contato manualmente"; + +"Placeholder_Empty_Action2" = "ADICIONAR CONTATO"; + +"Placeholder_Loading_Title" = "Sincronizando"; + +"Placeholder_Loading_Message" = "Por favor, espero um pouco enquanto habilitamos seu aplicativo."; + +"Placeholder_Contacts_Title" = "Convide seus amigos(as)"; + +"Placeholder_Contacts_Message" = "Nenhum dos seus contatos usa {appname}. Use o botão abaixo para convidá-los."; + +"Placeholder_Contacts_Action" = "AVISE UM(A) AMIGO(A)"; + +"Placeholder_Contacts_Message2" = "ou adicione um contato manualmente usando o botão de mais no canto superior direito"; + +"Placeholder_Dialogs_Title" = "Começar a conversar"; + +"Placeholder_Dialogs_Message" = "Escolha um contato da sua lista ou pessione o botão de escrita no canto superior direito para começar a conversas imediatamente."; + +"Placeholder_Group_Title" = "Não é membro"; + +"Placeholder_Group_Message" = "Infelizmente você não é menro desse grupo."; + +"Placeholder_Location_Title" = "Ativar localização"; + +"Placeholder_Location_Message" = "Ative os Serviços de Localização em configurações do dispositivo para partilhar a sua localização."; + + +/* + * Welcome + */ + +"WelcomeTitle" = "Bem vindo ao {app_name}!"; + +"WelcomeTagline" = "Mensageiro rápido e gratuido"; + +"WelcomeSignUp" = "Entrar"; + +"WelcomeLogIn" = "Entrar"; + + +/* + * Auth + */ + +"AuthUnsupported" = "Essa conta não é suportada nesta versão do {app_name}. Favor atualizar para logar nessa conta."; + +"AuthLoginTitle" = "Login no {app_name}"; + +"AuthLoginPhone" = "Fone"; + +"AuthLoginEmail" = "E-mail"; + +"AuthLoginPhoneEmail" = "Fone ou E-mail"; + +"AuthNameTitle" = "Olá! Qual o seu nome?"; + +"AuthNamePlaceholder" = "Nome completo"; + +"AuthPhoneTitle" = "Qual é o seu número de telefone?"; + +"AuthPhoneUseEmail" = "Use e-mail"; + +"AuthPhoneHint" = "Nós precisamos do seu número de telefone para garantir a segurança de seus dados pessoais."; + +"AuthPhonePlaceholder" = "Número do Telefone"; + +"AuthCountryTitle" = "Código do País"; + +"AuthEmailTitle" = "Qual é o seu e-mail?"; + +"AuthEmailHint" = "Nós não vamos te enviar spam."; + +"AuthEmailPlaceholder" = "Seu e-mail"; + +"AuthEmailUsePhone" = "Use o telefone"; + +"AuthDisclaimer" = "Ao registrar-se, você concorda com os Termos de Serviço e a Política de Privacidade."; + +"AuthDisclaimerTosOnly" = "Ao registrar-se, você concorda com os Termos de Serviço."; + +"AuthDisclaimerPrivacyOnly" = "Ao registrar-se, você concorda com a Política de Privacidade."; + +"AuthDisclaimerToS" = "Termos de Serviço"; + +"AuthDisclaimerPrivacy" = "Política de Privacidade"; + +"AuthOTPEmailTitle" = "Confirme seu e-mail"; + +"AuthOTPPhoneTitle" = "Confirme seu telefone"; + +"AuthOTPEmailHint" = "Nós lhe enviamos um código de confirmação.\nDigite ele abaixo."; + +"AuthOTPPhoneHint" = "Nós lhe enviamos um código de confirmação.\nDigite ele abaixo."; + +"AuthOTPPlaceholder" = "Código de Confirmação"; + +"AuthOTPNoCode" = "Não recebeu o código?"; + +"AuthOTPCallHint" = "{app_name} irá ligar para você em {time}"; + + + +/* + * Common Elements + */ + +"CurrentLocale" = "pt-BR"; + +"InviteText" = "Olá! Vamos mudar para o {appname}! {link}"; + +"PhotoRemove" = "Remover Foto"; + +"PhotoRemoveGroupMessage" = "Você tem certeza que quer to remover a foto do grupo? Alguns membros poderão não gostar."; + +"PhotoCamera" = "Tirar Foto ou Vídeo"; + +"PhotoLibrary" = "Biblioteca de Midias"; + +"ShareLocation" = "Localização"; + +"ShareContact" = "Compartilhar contato"; + +"SendDocument" = "Documento"; + +/* + * Navigation + */ + +"NavigationEdit" = "Editar"; + +"NavigationDone" = "Feito"; + +"NavigationCancel" = "Cancelar"; + +"NavigationBack" = ""; + +"NavigationNext" = "Próximo"; + +"NavigationSave" = "Salvar"; + +"NavigationFind" = "Find"; + +/* + * Alerts + */ + +"AlertCancel" = "Cancelar"; + +"AlertNext" = "Próximo"; + +"AlertSave" = "Salvar"; + +"AlertOk" = "OK"; + +"AlertSet" = "Set"; + +"AlertYes" = "Sim"; + +"AlertNo" = "Não"; + +"AlertError" = "Error"; + +"AlertTryAgain" = "Try Again"; + +"AlertInvite" = "Invite"; + +"UnsupportedContent" = "Mensagem não suportada nesta versão. Por favor espere por uma atualização para ver esta mensagem."; + +/* + * Actions + */ + +"ActionCopyLink" = "Copiar Link"; + +"ActionRevokeLink" = "Remover Link"; + +"ActionShareLink" = "Compartilhar Link"; + +"AlertLinkCopied" = "Link copiado para a área de transferência."; + +"ActionOpenLink" = "Link Aberto"; + +"ActionCancel" = "Cancelar"; + +"ActionAddPhoto1" = "adicionar"; + +"ActionAddPhoto2" = "foto"; + +"ActionOpenCode" = "View Code"; + +"ActionMute" = "Mute"; + +"ActionUnmute" = "Unmute"; + + +"ActionDelete" = "Delete"; + +"ActionDeleteMessage" = "Are you sure want to delete chat?"; + + +"ActionDeleteChannel" = "Delete Channel"; + +"ActionDeleteChannelMessage" = "Wait! Deleting this channel will remove all members and all messages will be lost. Delete the channel anyway?"; + +"ActionDeleteGroup" = "Delete Group"; + +"ActionDeleteGroupMessage" = "Wait! Deleting this group will remove all members and all messages will be lost. Delete the group anyway?"; + + +"ActionLeaveChannel" = "Leave Channel"; + +"ActionLeaveChannelMessage" = "Are you sure want to leave channel?"; + +"ActionLeaveChannelAction" = "Leave"; + + + +"ActionDeleteAndExit" = "Delete and Exit"; + +"ActionDeleteAndExitMessage" = "Are you sure want to exit group and delete all messages?"; + +"ActionDeleteAndExitAction" = "Exit"; + + + +"ActionClearHistory" = "Clear History"; + +"ActionClearHistoryMessage" = "Are you sure want to clear history?"; + +"ActionClearHistoryAction" = "Clear"; + +/* + * Network + */ + +"StatusConnecting" = "Conectar..."; + +"StatusSyncing" = "Sincronizando..."; + +/* + * Errors + */ + +"ErrorPhoneIncorrect" = "Número de telefone inválido. Por favor tente de novo."; + +"ErrorCodeExpired" = "Código expirou. Por favor reinicie a autenticação."; + +"ErrorUnableToJoin" = "Unable to join to group"; + +"ErrorUnableToCall" = "Unable to call this number"; diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Sources/.DS_Store b/actor-sdk/sdk-core-ios/ActorSDK/Sources/.DS_Store new file mode 100644 index 0000000000..b982f812cc Binary files /dev/null and b/actor-sdk/sdk-core-ios/ActorSDK/Sources/.DS_Store differ diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Sources/ActorApplicationDelegate.swift b/actor-sdk/sdk-core-ios/ActorSDK/Sources/ActorApplicationDelegate.swift index 491e627e6c..f6f22ed1b5 100644 --- a/actor-sdk/sdk-core-ios/ActorSDK/Sources/ActorApplicationDelegate.swift +++ b/actor-sdk/sdk-core-ios/ActorSDK/Sources/ActorApplicationDelegate.swift @@ -38,6 +38,7 @@ open class ActorApplicationDelegate: ActorSDKDelegateDefault, UIApplicationDeleg } open func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any]) { + NSLog("ActorApplicationDelegate Receive notification 1...") ActorSDK.sharedActor().application(application, didReceiveRemoteNotification: userInfo) } @@ -46,15 +47,18 @@ open class ActorApplicationDelegate: ActorSDKDelegateDefault, UIApplicationDeleg } open func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) { - let tokenString = "\(deviceToken)".replace(" ", dest: "").replace("<", dest: "").replace(">", dest: "") - ActorSDK.sharedActor().pushRegisterToken(tokenString) + let tokenString = deviceToken.map { String(format: "%02.2hhx", $0) }.joined() + NSLog("Registrando o servico de notificacoes para o token \(tokenString)") + ActorSDK.sharedActor().pushRegisterToken(tokenString.replace(" ", dest: "").replace("<", dest: "").replace(">", dest: "")) } open func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) { + NSLog("ActorApplicationDelegate Receive notification 2...") ActorSDK.sharedActor().application(application, didReceiveRemoteNotification: userInfo, fetchCompletionHandler: completionHandler) } open func application(_ application: UIApplication, performFetchWithCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) { + NSLog("ActorApplicationDelegate Receive notification 3...") ActorSDK.sharedActor().application(application, performFetchWithCompletionHandler: completionHandler) } diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Sources/ActorCore/ActorCoreExt.swift b/actor-sdk/sdk-core-ios/ActorSDK/Sources/ActorCore/ActorCoreExt.swift index 227689bf8b..6d458511ff 100644 --- a/actor-sdk/sdk-core-ios/ActorSDK/Sources/ActorCore/ActorCoreExt.swift +++ b/actor-sdk/sdk-core-ios/ActorSDK/Sources/ActorCore/ActorCoreExt.swift @@ -34,7 +34,7 @@ public extension ACCocoaMessenger { if let videoData = try? Data(contentsOf: url) { // if data have on this local path url go to upload - let descriptor = "/tmp/"+UUID().uuidString + let descriptor = "/tmp/"+UUID().uuidString + ".mp4" let path = CocoaFiles.pathFromDescriptor(descriptor); try? videoData.write(to: URL(fileURLWithPath: path), options: [.atomic]) // write to file @@ -130,7 +130,7 @@ extension JavaUtilAbstractCollection : Sequence { } -public extension JavaUtilList { +public extension JavaUtilListProtocol { public func toSwiftArray() -> [T] { var res = [T]() for i in 0.. ()) { self.init(executor: AAPromiseFunc(closure: closure)) } diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Sources/ActorCore/Providers/CocoaFileSystemRuntime.swift b/actor-sdk/sdk-core-ios/ActorSDK/Sources/ActorCore/Providers/CocoaFileSystemRuntime.swift index a535530a83..0f6cca975a 100644 --- a/actor-sdk/sdk-core-ios/ActorSDK/Sources/ActorCore/Providers/CocoaFileSystemRuntime.swift +++ b/actor-sdk/sdk-core-ios/ActorSDK/Sources/ActorCore/Providers/CocoaFileSystemRuntime.swift @@ -29,7 +29,7 @@ open class CocoaFiles { return CocoaFile(path: fileName) } - func commitTempFile(_ sourceFile: ARFileSystemReference!, withFileId fileId: jlong, withFileName fileName: String!) -> ARFileSystemReference! { + func commitTempFile(_ sourceFile: ARFileSystemReference!, withFileId fileId: jlong, withFileName fileName: String) -> ARFileSystemReference! { // Finding file available name diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Sources/ActorCore/Providers/CocoaHttpRuntime.swift b/actor-sdk/sdk-core-ios/ActorSDK/Sources/ActorCore/Providers/CocoaHttpRuntime.swift index ec7ea7f187..94fc0a0a68 100644 --- a/actor-sdk/sdk-core-ios/ActorSDK/Sources/ActorCore/Providers/CocoaHttpRuntime.swift +++ b/actor-sdk/sdk-core-ios/ActorSDK/Sources/ActorCore/Providers/CocoaHttpRuntime.swift @@ -4,11 +4,11 @@ import Foundation -class CocoaHttpRuntime: NSObject, ARHttpRuntime { +open class CocoaHttpRuntime: NSObject, ARHttpRuntime { let queue:OperationQueue = OperationQueue() - func getMethodWithUrl(_ url: String!, withStartOffset startOffset: jint, withSize size: jint, withTotalSize totalSize: jint) -> ARPromise! { + public func getMethodWithUrl(_ url: String!, withStartOffset startOffset: jint, withSize size: jint, withTotalSize totalSize: jint) -> ARPromise! { return ARPromise { (resolver) in @@ -33,7 +33,7 @@ class CocoaHttpRuntime: NSObject, ARHttpRuntime { } } - func putMethod(withUrl url: String!, withContents contents: IOSByteArray!) -> ARPromise! { + public func putMethod(withUrl url: String!, withContents contents: IOSByteArray!) -> ARPromise! { return ARPromise { (resolver) in let request = NSMutableURLRequest(url: URL(string: url)!) request.httpShouldHandleCookies = false diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Sources/ActorCore/Providers/CocoaNetworkRuntime.swift b/actor-sdk/sdk-core-ios/ActorSDK/Sources/ActorCore/Providers/CocoaNetworkRuntime.swift index 4d9351270e..2816e5ee22 100644 --- a/actor-sdk/sdk-core-ios/ActorSDK/Sources/ActorCore/Providers/CocoaNetworkRuntime.swift +++ b/actor-sdk/sdk-core-ios/ActorSDK/Sources/ActorCore/Providers/CocoaNetworkRuntime.swift @@ -85,7 +85,7 @@ class CocoaTcpConnection: ARAsyncConnection, GCDAsyncSocketDelegate { let size = data.readUInt32(5) gcdSocket?.readData(toLength: UInt(size + 4), withTimeout: -1, tag: READ_BODY) } else if (tag == READ_BODY) { - // NSLog("\(TAG) Body received") + NSLog("\(TAG) Body received") var package = Data() package.append(self.header!) package.append(data) @@ -100,8 +100,9 @@ class CocoaTcpConnection: ARAsyncConnection, GCDAsyncSocketDelegate { } override func doClose() { + NSLog("\(TAG) Will try to close connection...") if (gcdSocket != nil) { - // NSLog("\(TAG) Closing...") + NSLog("\(TAG) Closing connection...") gcdSocket?.disconnect() gcdSocket = nil } diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Sources/ActorCore/Providers/Storage/FMDBKeyValue.swift b/actor-sdk/sdk-core-ios/ActorSDK/Sources/ActorCore/Providers/Storage/FMDBKeyValue.swift index 6fdd82d4fe..654280702b 100644 --- a/actor-sdk/sdk-core-ios/ActorSDK/Sources/ActorCore/Providers/Storage/FMDBKeyValue.swift +++ b/actor-sdk/sdk-core-ios/ActorSDK/Sources/ActorCore/Providers/Storage/FMDBKeyValue.swift @@ -53,7 +53,7 @@ import Foundation } } - func addOrUpdateItems(_ values: JavaUtilList!) { + func addOrUpdateItems(_ values: JavaUtilListProtocol!) { checkTable() db.beginTransaction() @@ -101,7 +101,7 @@ import Foundation return result!.toJavaBytes() } - func loadAllItems() -> JavaUtilList! { + func loadAllItems() -> JavaUtilListProtocol! { checkTable() let res = JavaUtilArrayList()! @@ -115,7 +115,7 @@ import Foundation return res } - func loadItems(_ keys: IOSLongArray!) -> JavaUtilList! { + func loadItems(_ keys: IOSLongArray!) -> JavaUtilListProtocol! { checkTable() // Converting to NSNumbers diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Sources/ActorCore/Providers/Storage/FMDBList.swift b/actor-sdk/sdk-core-ios/ActorSDK/Sources/ActorCore/Providers/Storage/FMDBList.swift index 43227ca25e..887508f74f 100644 --- a/actor-sdk/sdk-core-ios/ActorSDK/Sources/ActorCore/Providers/Storage/FMDBList.swift +++ b/actor-sdk/sdk-core-ios/ActorSDK/Sources/ActorCore/Providers/Storage/FMDBList.swift @@ -103,7 +103,7 @@ class FMDBList : NSObject, ARListStorageDisplayEx { log("updateOrAddWithValue \(tableName): \(valueContainer.getData().length()) in \(Int((Date().timeIntervalSince(start)*1000)))") } - func updateOrAdd(with items: JavaUtilList!) { + func updateOrAdd(with items: JavaUtilListProtocol!) { checkTable(); db!.beginTransaction() @@ -199,13 +199,13 @@ class FMDBList : NSObject, ARListStorageDisplayEx { } } - func loadAllItems() -> JavaUtilList! { + func loadAllItems() -> JavaUtilListProtocol! { let res = JavaUtilArrayList() // TODO: Implement return res } - func loadForward(withSortKey sortingKey: JavaLangLong!, withLimit limit: jint) -> JavaUtilList! { + func loadForward(withSortKey sortingKey: JavaLangLong!, withLimit limit: jint) -> JavaUtilListProtocol! { checkTable(); var result : FMResultSet? = nil; if (sortingKey == nil) { @@ -247,7 +247,7 @@ class FMDBList : NSObject, ARListStorageDisplayEx { return res; } - func loadForward(withQuery query: String!, withSortKey sortingKey: JavaLangLong!, withLimit limit: jint) -> JavaUtilList! { + func loadForward(withQuery query: String!, withSortKey sortingKey: JavaLangLong!, withLimit limit: jint) -> JavaUtilListProtocol! { checkTable(); var result : FMResultSet? = nil; @@ -277,7 +277,7 @@ class FMDBList : NSObject, ARListStorageDisplayEx { } - func loadBackward(withSortKey sortingKey: JavaLangLong!, withLimit limit: jint) -> JavaUtilList! { + func loadBackward(withSortKey sortingKey: JavaLangLong!, withLimit limit: jint) -> JavaUtilListProtocol! { checkTable(); var result : FMResultSet? = nil; if (sortingKey == nil) { @@ -304,7 +304,7 @@ class FMDBList : NSObject, ARListStorageDisplayEx { return res; } - func loadBackward(withQuery query: String!, withSortKey sortingKey: JavaLangLong!, withLimit limit: jint) -> JavaUtilList! { + func loadBackward(withQuery query: String!, withSortKey sortingKey: JavaLangLong!, withLimit limit: jint) -> JavaUtilListProtocol! { checkTable(); var result : FMResultSet? = nil; @@ -333,7 +333,7 @@ class FMDBList : NSObject, ARListStorageDisplayEx { return res; } - func loadCenter(withSortKey centerSortKey: JavaLangLong!, withLimit limit: jint) -> JavaUtilList! { + func loadCenter(withSortKey centerSortKey: JavaLangLong!, withLimit limit: jint) -> JavaUtilListProtocol! { checkTable(); let res: JavaUtilArrayList = JavaUtilArrayList(); @@ -342,7 +342,7 @@ class FMDBList : NSObject, ARListStorageDisplayEx { return res } - func loadSlise(_ result: FMResultSet?) -> JavaUtilList! { + func loadSlise(_ result: FMResultSet?) -> JavaUtilListProtocol! { if (result == nil) { NSLog(db!.lastErrorMessage()) return nil diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Sources/ActorCore/Providers/iOSNotificationProvider.swift b/actor-sdk/sdk-core-ios/ActorSDK/Sources/ActorCore/Providers/iOSNotificationProvider.swift index ec1729a4c5..e956c0bd0f 100644 --- a/actor-sdk/sdk-core-ios/ActorSDK/Sources/ActorCore/Providers/iOSNotificationProvider.swift +++ b/actor-sdk/sdk-core-ios/ActorSDK/Sources/ActorCore/Providers/iOSNotificationProvider.swift @@ -43,12 +43,14 @@ import AudioToolbox.AudioServices } - func onNotification(with messenger: ACMessenger!, withTopNotifications topNotifications: JavaUtilList!, withMessagesCount messagesCount: jint, withConversationsCount conversationsCount: jint) { + func onNotification(with messenger: ACMessenger!, withTopNotifications topNotifications: JavaUtilListProtocol!, withMessagesCount messagesCount: jint, withConversationsCount conversationsCount: jint) { // Not Supported + print("onNotification") } - func onUpdateNotification(with messenger: ACMessenger!, withTopNotifications topNotifications: JavaUtilList!, withMessagesCount messagesCount: jint, withConversationsCount conversationsCount: jint) { + func onUpdateNotification(with messenger: ACMessenger!, withTopNotifications topNotifications: JavaUtilListProtocol!, withMessagesCount messagesCount: jint, withConversationsCount conversationsCount: jint) { // Not Supported + print("onUpdateNotification") } func hideAllNotifications() { diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Sources/ActorCore/Providers/iOSPhoneBookProvider.swift b/actor-sdk/sdk-core-ios/ActorSDK/Sources/ActorCore/Providers/iOSPhoneBookProvider.swift index 771416d65a..5135c5a6f7 100644 --- a/actor-sdk/sdk-core-ios/ActorSDK/Sources/ActorCore/Providers/iOSPhoneBookProvider.swift +++ b/actor-sdk/sdk-core-ios/ActorSDK/Sources/ActorCore/Providers/iOSPhoneBookProvider.swift @@ -18,101 +18,102 @@ class PhoneBookProvider: NSObject, ACPhoneBookProvider { return } let book: ABAddressBook = rawBook!.takeRetainedValue() -// ABAddressBookRequestAccessWithCompletion(book, { (granted: Bool, error: CFError!) -> Void in -// if (!granted) { -// print("Access to AddressBook denied") -// callback.onLoaded(withContacts: JavaUtilArrayList()) -// return -// } -// -// autoreleasepool { -// let numbersSet = CharacterSet(charactersIn: "0123456789").inverted -// let contacts = JavaUtilArrayList() -// var index = 1 -// let people = ABAddressBookCopyArrayOfAllPeople(book).takeRetainedValue() as [ABRecordRef] -// -// for person in people { -// let firstName = self.extractString(person as ABRecord, propertyName: kABPersonFirstNameProperty) -// let middleName = self.extractString(person as ABRecord, propertyName: kABPersonMiddleNameProperty) -// let lastName = self.extractString(person as ABRecord, propertyName: kABPersonLastNameProperty) -// -// var contactName :String? -// -// // -// // For Performance. LOL. -// // -// if firstName != nil { -// if middleName != nil { -// if lastName != nil { -// contactName = firstName! + " " + middleName! + " " + lastName! -// } else { -// contactName = firstName! + " " + middleName! -// } -// } else { -// if (lastName != nil) { -// contactName = firstName! + " " + lastName! -// } else { -// contactName = firstName -// } -// } -// } else { -// if middleName != nil { -// if lastName != nil { -// contactName = middleName! + " " + lastName! -// } else { -// contactName = middleName -// } -// } else { -// if lastName != nil { -// contactName = lastName -// } -// } -// } -// -// if (firstName == "Name not specified") { -// contactName = nil -// } -// -// let contactPhones = JavaUtilArrayList() -// let contactEmails = JavaUtilArrayList() -// let contact = ACPhoneBookContact(long: jlong(index), with: contactName, with: contactPhones, with: contactEmails) -// index += 1 -// if let phones: ABMultiValueRef = -// self.extractProperty(person as ABRecord, propertyName: kABPersonPhoneProperty) as ABMultiValueRef? { -// for i in 0...ABMultiValueGetCount(phones) { -// var phoneStr = self.extractString(phones, index: i) -// if (phoneStr == nil || phoneStr!.trim().isEmpty) { -// continue -// } -// phoneStr = phoneStr!.strip(numbersSet) -// let phoneVal = Int64(phoneStr!)// numberFormatter.numberFromString(phoneStr!)?.longLongValue -// if (phoneVal != nil) { -// contactPhones.addWithId(ACPhoneBookPhone(long: jlong(index), withLong: jlong(phoneVal!))) -// index += 1 -// } -// } -// } -// -// if let emails: ABMultiValueRef = -// self.extractProperty(person as ABRecord, propertyName: kABPersonEmailProperty) as ABMultiValueRef? { -// for i in 0...ABMultiValueGetCount(emails) { -// let emailStr = self.extractString(emails, index: i) -// if (emailStr == nil || emailStr!.trim().isEmpty) { -// continue -// } -// contactEmails.addWithId(ACPhoneBookEmail(long: jlong(index), with: emailStr!)) -// index += 1 -// } -// } -// -// if (contactPhones.size() != 0 || contactEmails.size() != 0) { -// contacts.addWithId(contact) -// } -// } -// -// callback.onLoaded(withContacts: contacts) -// } -// }) + + ABAddressBookRequestAccessWithCompletion(book, { (granted: Bool, error: CFError?) in + if (!granted) { + print("Access to AddressBook denied") + callback.onLoaded(withContacts: JavaUtilArrayList()) + return + } + + autoreleasepool { + let numbersSet = CharacterSet(charactersIn: "0123456789").inverted + let contacts = JavaUtilArrayList() + var index = 1 + let people = ABAddressBookCopyArrayOfAllPeople(book).takeRetainedValue() as [ABRecord] + + for person in people { + let firstName = self.extractString(person as ABRecord, propertyName: kABPersonFirstNameProperty) + let middleName = self.extractString(person as ABRecord, propertyName: kABPersonMiddleNameProperty) + let lastName = self.extractString(person as ABRecord, propertyName: kABPersonLastNameProperty) + + var contactName :String? + + // + // For Performance. LOL. + // + if firstName != nil { + if middleName != nil { + if lastName != nil { + contactName = firstName! + " " + middleName! + " " + lastName! + } else { + contactName = firstName! + " " + middleName! + } + } else { + if (lastName != nil) { + contactName = firstName! + " " + lastName! + } else { + contactName = firstName + } + } + } else { + if middleName != nil { + if lastName != nil { + contactName = middleName! + " " + lastName! + } else { + contactName = middleName + } + } else { + if lastName != nil { + contactName = lastName + } + } + } + + if (firstName == "Name not specified") { + contactName = nil + } + + let contactPhones = JavaUtilArrayList() + let contactEmails = JavaUtilArrayList() + let contact = ACPhoneBookContact(long: jlong(index), with: contactName, with: contactPhones, with: contactEmails) + index += 1 + if let phones: ABMultiValue = + self.extractProperty(person as ABRecord, propertyName: kABPersonPhoneProperty) as ABMultiValue? { + for i in 0...ABMultiValueGetCount(phones) { + var phoneStr = self.extractString(phones, index: i) + if (phoneStr == nil || phoneStr!.trim().isEmpty) { + continue + } + phoneStr = phoneStr!.strip(numbersSet) + let phoneVal = Int64(phoneStr!)// numberFormatter.numberFromString(phoneStr!)?.longLongValue + if (phoneVal != nil) { + contactPhones?.add(withId: ACPhoneBookPhone(long: jlong(index), withLong: jlong(phoneVal!))) + index += 1 + } + } + } + + if let emails: ABMultiValue = + self.extractProperty(person as ABRecord, propertyName: kABPersonEmailProperty) as ABMultiValue? { + for i in 0...ABMultiValueGetCount(emails) { + let emailStr = self.extractString(emails, index: i) + if (emailStr == nil || emailStr!.trim().isEmpty) { + continue + } + contactEmails?.add(withId: ACPhoneBookEmail(long: jlong(index), with: emailStr!)) + index += 1 + } + } + + if (contactPhones?.size() != 0 || contactEmails?.size() != 0) { + contacts?.add(withId: contact) + } + } + + callback.onLoaded(withContacts: contacts) + } + }) } } diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Sources/ActorSDK.swift b/actor-sdk/sdk-core-ios/ActorSDK/Sources/ActorSDK.swift index a91ef5ab1e..4508b0571c 100644 --- a/actor-sdk/sdk-core-ios/ActorSDK/Sources/ActorSDK.swift +++ b/actor-sdk/sdk-core-ios/ActorSDK/Sources/ActorSDK.swift @@ -8,8 +8,9 @@ import PushKit import SafariServices import DZNWebViewController import ReachabilitySwift +import UserNotifications -@objc open class ActorSDK: NSObject, PKPushRegistryDelegate { +@objc open class ActorSDK: NSObject, PKPushRegistryDelegate, UNUserNotificationCenterDelegate { // // Shared instance @@ -145,6 +146,9 @@ import ReachabilitySwift /// Should perform auto join only after first message or contact open var autoJoinOnReady = true + // Use call to active app + open var enableCallToValidateCode = false + // // User Onlines // @@ -233,13 +237,16 @@ import ReachabilitySwift // Api Connections let deviceKey = UUID().uuidString let deviceName = UIDevice.current.name - let appTitle = "Actor iOS" + let appTitle = "XlotoMensageiro" for url in endpoints { builder.addEndpoint(url) } for key in trustedKeys { builder.addTrustedKey(key) } + + builder.setOnClientPrivacyEnabled(jboolean(delegate.useOnClientPrivacy())) + builder.setApiConfiguration(ACApiConfiguration(appTitle: appTitle, withAppId: jint(apiId), withAppKey: apiKey, withDeviceTitle: deviceName, withDeviceId: deviceKey)) // Providers @@ -349,17 +356,21 @@ import ReachabilitySwift } func didLoggedIn() { - // Push registration - if autoPushMode == .afterLogin { requestPush() } - var controller: UIViewController! = delegate.actorControllerAfterLogIn() - if controller == nil { - controller = delegate.actorControllerForStart() - } + self.showMainController() + } + + open func didLoggedInWithoutPush() { + self.showMainController() + } + + func showMainController(){ + var controller = delegate.actorControllerForStart() + if controller == nil { let tab = AARootTabViewController() @@ -394,6 +405,7 @@ import ReachabilitySwift } if apiPushId != nil { + NSLog("Fazendo o registro no push pushRegisterToken") messenger.registerApplePush(withApnsId: jint(apiPushId!), withToken: token) } } @@ -404,19 +416,32 @@ import ReachabilitySwift } if apiPushId != nil { + NSLog("Fazendo o registro no pushkit pushRegisterKitToken") messenger.registerApplePushKit(withApnsId: jint(apiPushId!), withToken: token) } } fileprivate func requestPush() { - let types: UIUserNotificationType = [.alert, .badge, .sound] - let settings: UIUserNotificationSettings = UIUserNotificationSettings(types: types, categories: nil) - UIApplication.shared.registerUserNotificationSettings(settings) - UIApplication.shared.registerForRemoteNotifications() + if #available(iOS 10.0, *){ + UNUserNotificationCenter.current().delegate = self + UNUserNotificationCenter.current().requestAuthorization(options: [.badge, .sound, .alert], completionHandler: {(granted, error) in + if (granted){ + UIApplication.shared.registerForRemoteNotifications() + }else{ + print("Acesso ao permitido para notificacoes") + } + }) + }else{ + let types: UIUserNotificationType = [.alert, .badge, .sound] + let settings: UIUserNotificationSettings = UIUserNotificationSettings(types: types, categories: nil) + UIApplication.shared.registerUserNotificationSettings(settings) + UIApplication.shared.registerForRemoteNotifications() + } } fileprivate func requestPushKit() { + NSLog("Requisitando o pushKit requestPushKit") let voipRegistry = PKPushRegistry(queue: DispatchQueue.main) voipRegistry.delegate = self voipRegistry.desiredPushTypes = Set([PKPushType.voIP]) @@ -424,18 +449,21 @@ import ReachabilitySwift @objc open func pushRegistry(_ registry: PKPushRegistry, didUpdate credentials: PKPushCredentials, forType type: PKPushType) { if (type == PKPushType.voIP) { - let tokenString = "\(credentials.token)".replace(" ", dest: "").replace("<", dest: "").replace(">", dest: "") - pushRegisterKitToken(tokenString) + let tokenString = credentials.token.map { String(format: "%02.2hhx", $0) }.joined() + NSLog("Vai registrar o voip para o token: \(tokenString)") + pushRegisterKitToken(tokenString.replace(" ", dest: "").replace("<", dest: "").replace(">", dest: "")) } } @objc open func pushRegistry(_ registry: PKPushRegistry, didInvalidatePushTokenForType type: PKPushType) { + NSLog("Invalidando o push token para voip didInvalidatePushTokenForType") if (type == PKPushType.voIP) { } } @objc open func pushRegistry(_ registry: PKPushRegistry, didReceiveIncomingPushWith payload: PKPushPayload, forType type: PKPushType) { + NSLog("Recebendo pushKit notification didReceiveIncomingPushWith") if (type == PKPushType.voIP) { let aps = payload.dictionaryPayload["aps"] as! [NSString: AnyObject] if let callId = aps["callId"] as? String { @@ -590,7 +618,7 @@ import ReachabilitySwift // /// Handling URL Opening in application - func openUrl(_ url: String) { + open func openUrl(_ url: String) { if let u = URL(string: url) { // Handle phone call @@ -817,7 +845,7 @@ import ReachabilitySwift }) // Wait for 40 secs before app shutdown - DispatchQueue.global(priority: DispatchQueue.GlobalQueuePriority.default).asyncAfter(deadline: DispatchTime.now() + Double(Int64(40.0 * Double(NSEC_PER_SEC))) / Double(NSEC_PER_SEC)) { () -> Void in + DispatchQueue.global(qos: DispatchQoS.QoSClass.default).asyncAfter(deadline: DispatchTime.now() + Double(Int64(40.0 * Double(NSEC_PER_SEC))) / Double(NSEC_PER_SEC)) { () -> Void in application.endBackgroundTask(completitionTask) completitionTask = UIBackgroundTaskInvalid } @@ -843,29 +871,45 @@ import ReachabilitySwift // open func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) { - + NSLog("Recebendo notificacao normal didReceiveRemoteNotification") if !messenger.isLoggedIn() { completionHandler(UIBackgroundFetchResult.noData) return } - self.completionHandler = completionHandler } open func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any]) { // Nothing? + NSLog("Recebendo notificacao normal 2 didReceiveRemoteNotification") } open func application(_ application: UIApplication, didRegisterUserNotificationSettings notificationSettings: UIUserNotificationSettings) { + NSLog("Vai requisitar o pushkit didRegisterUserNotificationSettings") requestPushKit() } // // Handling background fetch events // + @available(iOS 10.0, *) + public func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) { + completionHandler([.alert, .badge, .sound]) + + } - open func application(_ application: UIApplication, performFetchWithCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) { + @available(iOS 10.0, *) + public func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) { + if !messenger.isLoggedIn() { + completionHandler(UIBackgroundFetchResult.noData) + return + } + self.completionHandler = completionHandler + } + + open func application(_ application: UIApplication, performFetchWithCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) { + NSLog("Perform with fetch performFetchWithCompletionHandler") if !messenger.isLoggedIn() { completionHandler(UIBackgroundFetchResult.noData) return @@ -894,6 +938,7 @@ import ReachabilitySwift return true } + } public enum AAAutoPush { diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Sources/ActorSDKDelegate.swift b/actor-sdk/sdk-core-ios/ActorSDK/Sources/ActorSDKDelegate.swift index e303b1e088..db158111d3 100644 --- a/actor-sdk/sdk-core-ios/ActorSDK/Sources/ActorSDKDelegate.swift +++ b/actor-sdk/sdk-core-ios/ActorSDK/Sources/ActorSDKDelegate.swift @@ -28,6 +28,9 @@ public protocol ActorSDKDelegate { /// Contacts controller func actorControllerForContacts() -> UIViewController? + //Compose controller + func actiorControllerForCompose() -> UIViewController? + /// Dialogs controller func actorControllerForDialogs() -> UIViewController? @@ -60,6 +63,10 @@ public protocol ActorSDKDelegate { /// Called after header is created in settings page func actorSettingsSupportDidCreated(_ controller: AASettingsViewController, section: AAManagedSection) + + func showStickersButton() -> Bool + + func useOnClientPrivacy() -> Bool } /// Default empty implementation of SDK Delegate @@ -93,6 +100,10 @@ open class ActorSDKDelegateDefault: NSObject, ActorSDKDelegate { return nil } + open func actiorControllerForCompose() -> UIViewController? { + return nil + } + open func actorControllerForSettings() -> UIViewController? { return nil } @@ -136,4 +147,12 @@ open class ActorSDKDelegateDefault: NSObject, ActorSDKDelegate { open func actorSettingsSupportDidCreated(_ controller: AASettingsViewController, section: AAManagedSection) { } + + open func showStickersButton() -> Bool{ + return true + } + + open func useOnClientPrivacy() -> Bool{ + return false + } } diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Sources/ActorStyle.swift b/actor-sdk/sdk-core-ios/ActorSDK/Sources/ActorStyle.swift index 5bf8b5e8bb..62203e0f4e 100644 --- a/actor-sdk/sdk-core-ios/ActorSDK/Sources/ActorStyle.swift +++ b/actor-sdk/sdk-core-ios/ActorSDK/Sources/ActorStyle.swift @@ -45,6 +45,9 @@ open class ActorStyle { /// View Controller background color for settings open var vcBackyardColor = UIColor(rgb: 0xf0eff5) + + open var nextBarColor = UIColor(red: 94, green: 142, blue: 192) + // // UINavigationBar // @@ -52,6 +55,8 @@ open class ActorStyle { open var navigationBgColor: UIColor = UIColor(red: 247.0/255.0, green: 247.0/255.0, blue: 247.0/255.0, alpha: 1) /// Main Navigation bar hairline color open var navigationHairlineHidden = false + /// Main Navigation bar hairline color + open var navigationIsTransluent = false /// Navigation Bar icons colors open var navigationTintColor: UIColor = UIColor(rgb: 0x5085CB) /// Navigation Bar title color diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Auth/AAAuthOTPViewController.swift b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Auth/AAAuthOTPViewController.swift index ae5022425b..791d415017 100644 --- a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Auth/AAAuthOTPViewController.swift +++ b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Auth/AAAuthOTPViewController.swift @@ -126,7 +126,9 @@ open class AAAuthOTPViewController: AAAuthViewController, MFMailComposeViewContr scrollView.addSubview(hintLabel) scrollView.addSubview(codeField) scrollView.addSubview(codeFieldLine) - scrollView.addSubview(haventReceivedCode) + if(ActorSDK.sharedActor().enableCallToValidateCode){ + scrollView.addSubview(haventReceivedCode) + } view.addSubview(scrollView) super.viewDidLoad() @@ -226,14 +228,18 @@ open class AAAuthOTPViewController: AAAuthViewController, MFMailComposeViewContr open override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) - if self.phone != nil { + if(ActorSDK.sharedActor().enableCallToValidateCode){ + if self.phone != nil { - updateTimerText() + updateTimerText() - if !dialed { - counterTimer = Timer.scheduledTimer(timeInterval: 1.0, target: self, selector: #selector(AAAuthOTPViewController.updateTimer), userInfo: nil, repeats: true) + if !dialed { + counterTimer = Timer.scheduledTimer(timeInterval: 1.0, target: self, selector: #selector(AAAuthOTPViewController.updateTimer), userInfo: nil, repeats: true) + } } } + + self.codeField.becomeFirstResponder() } func updateTimer() { diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Auth/AAAuthViewController.swift b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Auth/AAAuthViewController.swift index 071cbba13d..7f450036dc 100644 --- a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Auth/AAAuthViewController.swift +++ b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Auth/AAAuthViewController.swift @@ -14,8 +14,8 @@ open class AAAuthViewController: AAViewController { nextBarButton.setTitle(AALocalized("NavigationNext"), for: UIControlState()) nextBarButton.setTitleColor(UIColor.white, for: UIControlState()) - nextBarButton.setBackgroundImage(Imaging.roundedImage(UIColor(red: 94, green: 142, blue: 192), radius: 4), for: UIControlState()) - nextBarButton.setBackgroundImage(Imaging.roundedImage(UIColor(red: 94, green: 142, blue: 192).alpha(0.7), radius: 4), for: .highlighted) + nextBarButton.setBackgroundImage(Imaging.roundedImage(ActorSDK.sharedActor().style.nextBarColor, radius: 4), for: UIControlState()) + nextBarButton.setBackgroundImage(Imaging.roundedImage(ActorSDK.sharedActor().style.nextBarColor.alpha(0.7), radius: 4), for: .highlighted) nextBarButton.addTarget(self, action: #selector(AAAuthViewController.nextDidTap), for: .touchUpInside) view.addSubview(nextBarButton) diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Content/Contacts List/AAContactsListContentController.swift b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Content/Contacts List/AAContactsListContentController.swift index 61119c1e3e..5f94b414e3 100644 --- a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Content/Contacts List/AAContactsListContentController.swift +++ b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Content/Contacts List/AAContactsListContentController.swift @@ -39,7 +39,7 @@ open class AAContactsListContentController: AAContentTableController { section { (s) -> () in s.autoSeparatorsInset = 80 - + if let d = self.delegate { d.willAddContacts(self, section: s) } diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Content/Conversation/Layouting/AABubbleBackgroundProcessor.swift b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Content/Conversation/Layouting/AABubbleBackgroundProcessor.swift index d243c0ae05..76fa510a13 100644 --- a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Content/Conversation/Layouting/AABubbleBackgroundProcessor.swift +++ b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Content/Conversation/Layouting/AABubbleBackgroundProcessor.swift @@ -49,7 +49,7 @@ class AAListProcessor: NSObject, ARListProcessor { self.peer = peer } - func process(withItems items: JavaUtilList, withPrevious previous: Any?) -> Any? { + func process(withItems items: JavaUtilListProtocol, withPrevious previous: Any?) -> Any? { var objs = [ACMessage]() var indexes = [jlong: Int]() diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Content/Conversation/Views/AARecordAudioController.swift b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Content/Conversation/Views/AARecordAudioController.swift index f048235081..21ae077bbf 100644 --- a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Content/Conversation/Views/AARecordAudioController.swift +++ b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Content/Conversation/Views/AARecordAudioController.swift @@ -226,7 +226,7 @@ class AARecordAudioController: UIViewController,UIViewControllerTransitioningDel self.sendRecord.isEnabled = true self.cleanRecord.isEnabled = true }) - + }) } diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Content/Conversation/Views/AAThumbnailView.swift b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Content/Conversation/Views/AAThumbnailView.swift index 66c517e5ca..06656dfc38 100644 --- a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Content/Conversation/Views/AAThumbnailView.swift +++ b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Content/Conversation/Views/AAThumbnailView.swift @@ -87,14 +87,14 @@ open class AAThumbnailView: UIView,UICollectionViewDelegate , UICollectionViewDa let options = PHFetchOptions() options.sortDescriptors = [NSSortDescriptor(key: "creationDate", ascending: false)] -// switch mediaType { -// case .Image: -// options.predicate = NSPredicate(format: "mediaType = %d", PHAssetMediaType.Image.rawValue) -// case .Video: -// options.predicate = NSPredicate(format: "mediaType = %d", PHAssetMediaType.Video.rawValue) -// case .ImageAndVideo: -// options.predicate = NSPredicate(format: "mediaType = %d OR mediaType = %d", PHAssetMediaType.Image.rawValue, PHAssetMediaType.Video.rawValue) -// } + switch mediaType { + case .image: + options.predicate = NSPredicate(format: "mediaType = %d", PHAssetMediaType.image.rawValue) + case .video: + options.predicate = NSPredicate(format: "mediaType = %d", PHAssetMediaType.video.rawValue) + case .imageAndVideo: + options.predicate = NSPredicate(format: "mediaType = %d OR mediaType = %d", PHAssetMediaType.image.rawValue, PHAssetMediaType.video.rawValue) + } options.predicate = NSPredicate(format: "mediaType = %d", PHAssetMediaType.image.rawValue) @@ -107,27 +107,27 @@ open class AAThumbnailView: UIView,UICollectionViewDelegate , UICollectionViewDa let requestOptions = PHImageRequestOptions() requestOptions.isSynchronous = true requestOptions.deliveryMode = .fastFormat - -// result.enumerateObjects { asset, _, stop in -// -// if self.assets.count > fetchLimit { -// stop.initialize(to: true) -// } -// -// if let asset = asset as? PHAsset { -// var isGIF = false -// self.imageManager.requestImageData(for: asset, options: requestOptions) { data, _, _, info in -// if data != nil { -// let gifMarker = info!["PHImageFileURLKey"] as! URL -// print(gifMarker.pathExtension) -// isGIF = (gifMarker.pathExtension == "GIF") ? true : false -// print(isGIF) -// self.prefetchImagesForAsset(asset) -// } -// self.assets.append((asset,isGIF)) -// } -// } -// } + + result.enumerateObjects ({ asset, _, stop in + + if self.assets.count > fetchLimit { + stop.initialize(to: true) + } + + if let asset = asset as? PHAsset { + var isGIF = false + self.imageManager.requestImageData(for: asset, options: requestOptions) { data, _, _, info in + if data != nil { + let gifMarker = info!["PHImageFileURLKey"] as! URL + print(gifMarker.pathExtension) + isGIF = (gifMarker.pathExtension == "GIF") ? true : false + print(isGIF) + self.prefetchImagesForAsset(asset) + } + self.assets.append((asset,isGIF)) + } + } + }) } fileprivate func prefetchImagesForAsset(_ asset: PHAsset) { diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Content/Dialogs List/AADialogsListContentController.swift b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Content/Dialogs List/AADialogsListContentController.swift index 49927e5a09..f6da1e3821 100644 --- a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Content/Dialogs List/AADialogsListContentController.swift +++ b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Content/Dialogs List/AADialogsListContentController.swift @@ -110,6 +110,7 @@ open class AADialogsListContentController: AAContentTableController, UISearchBar }) } + a.title = AALocalized(isChannel ? "ActionDeleteChannelTitle" : "ActionDeleteGroupTitle") // Cancel a.cancel = AALocalized("ActionCancel") }) @@ -122,6 +123,7 @@ open class AADialogsListContentController: AAContentTableController, UISearchBar a.destructive(AALocalized("ActionDelete"), closure: { self.executeSafe(Actor.deleteChatCommand(with: dialog.peer)) }) + a.title = AALocalized("ActionDeleteChatTitle") a.cancel = AALocalized("ActionCancel") }) } diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Content/Dialogs List/Cells/AADialogCell.swift b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Content/Dialogs List/Cells/AADialogCell.swift index 997c414f50..36b344cb0b 100644 --- a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Content/Dialogs List/Cells/AADialogCell.swift +++ b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Content/Dialogs List/Cells/AADialogCell.swift @@ -4,7 +4,7 @@ import UIKit -open class AADialogCell: AATableViewCell, AABindedCell { +final class AADialogCell: AATableViewCell, AABindedCell { // Binding data type @@ -42,12 +42,14 @@ open class AADialogCell: AATableViewCell, AABindedCell { open let avatarView = AAAvatarView() open let titleView = YYLabel() + open let dialogTypeView = UIImageView() open let messageView = YYLabel() open let dateView = YYLabel() open let statusView = UIImageView() open let counterView = YYLabel() open let counterViewBg = UIImageView() + // Binding Data @@ -84,6 +86,7 @@ open class AADialogCell: AATableViewCell, AABindedCell { self.contentView.addSubview(avatarView) self.contentView.addSubview(titleView) + self.contentView.addSubview(dialogTypeView) self.contentView.addSubview(messageView) self.contentView.addSubview(dateView) self.contentView.addSubview(statusView) @@ -119,7 +122,6 @@ open class AADialogCell: AATableViewCell, AABindedCell { // avatarView.bind(item.dialogTitle, id: Int(item.peer.peerId), avatar: item.dialogAvatar) - // Forcing Async Rendering. // This flag can became false when cell was resized if !titleView.displaysAsynchronously { @@ -129,7 +131,7 @@ open class AADialogCell: AATableViewCell, AABindedCell { if !messageView.displaysAsynchronously { messageView.displaysAsynchronously = true } - + // Reseting Text Layout on new peer binding if !isRebind { @@ -170,22 +172,44 @@ open class AADialogCell: AATableViewCell, AABindedCell { } } + + + // Cancelling Renderer and forcing layouting to start new rendering cellRenderer.cancelRender() setNeedsLayout() } - open override func willTransition(to state: UITableViewCellStateMask) { - super.willTransition(to: state) +// open override func willTransition(to state: UITableViewCellStateMask) { +// super.willTransition(to: state) +// +// if state.contains(UITableViewCellStateMask.showingEditControlMask) { +// isEditing = true +// } else { +// isEditing = false +// } +// } + + + + open func addImageDialogType(_ image: UIImage!){ + dialogTypeView.image = image + let dialogTypeFrame = CGRect(x: 76, y: 17, width: 18, height: 18) + dialogTypeView.frame = dialogTypeFrame + self.titleView.left = self.titleView.left+20 - if state.contains(UITableViewCellStateMask.showingEditControlMask) { - isEditing = true - } else { - isEditing = false - } } + open func removeImageDialogType(){ + dialogTypeView.image = UIImage() + let dialogTypeFrame = CGRect(x: 76, y: 17, width: 18, height: 18) + dialogTypeView.frame = dialogTypeFrame + self.titleView.left = 76 + + } + + open override func layoutSubviews() { super.layoutSubviews() @@ -209,11 +233,9 @@ open class AADialogCell: AATableViewCell, AABindedCell { self.titleView.frame = titleFrame } - // // Status Icon // - if (!self.statusView.isHidden) { statusView.frame = CGRect(x: leftPadding, y: 44, width: 20, height: 18) } @@ -222,10 +244,9 @@ open class AADialogCell: AATableViewCell, AABindedCell { // // Rest of Elements are layouted on the last phase // - - if bindedItem != nil { + if let binItem = bindedItem { let config = AADialogCellConfig( - item: bindedItem!, + item: binItem, isStatusVisible: !statusView.isHidden, titleWidth: titleFrame.width, contentWidth: width) @@ -242,6 +263,31 @@ open class AADialogCell: AATableViewCell, AABindedCell { counterView.displaysAsynchronously = false counterView.clearContentsBeforeAsynchronouslyDisplay = false } + + + // + //Image Type + // + + let isBot = binItem.isBot + let isChannel = binItem.isChannel + + if(binItem.peer.peerType == ACPeerType.group()){ + if(isChannel){ + addImageDialogType(UIImage.bundled("ic_channel")) + }else { + addImageDialogType(UIImage.bundled("ic_group")) + } + }else if(binItem.peer.peerType == ACPeerType.private()){ + if(isBot){ + addImageDialogType(UIImage.bundled("ic_robot")) + }else{ + removeImageDialogType() + } + }else{ + removeImageDialogType() + } + } } @@ -259,7 +305,6 @@ open class AADialogCell: AATableViewCell, AABindedCell { titleContainer.truncationType = .end let titleLayout = YYTextLayout(container: titleContainer, text: title)! - // // Message Status // @@ -366,7 +411,7 @@ open class AADialogCell: AATableViewCell, AABindedCell { if !statusView.isHidden { padding += 22 } - let messageViewFrame = CGRect(x: padding, y: 44, width: render.messageWidth, height: 18) + let messageViewFrame = CGRect(x: padding, y: 44, width: render.messageWidth, height: 22) UIView.performWithoutAnimation { self.messageView.frame = messageViewFrame } diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Content/Dialogs List/Cells/AADialogListProcessor.swift b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Content/Dialogs List/Cells/AADialogListProcessor.swift index f5b4c11c79..0edaeb1228 100644 --- a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Content/Dialogs List/Cells/AADialogListProcessor.swift +++ b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Content/Dialogs List/Cells/AADialogListProcessor.swift @@ -6,7 +6,7 @@ import Foundation class AADialogListProcessor: NSObject, ARListProcessor { - func process(withItems items: JavaUtilList, withPrevious previous: Any?) -> Any? { + func process(withItems items: JavaUtilListProtocol, withPrevious previous: Any?) -> Any? { var uids = Set() diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Content/Previews/AAWallpapperPreviewController.swift b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Content/Previews/AAWallpapperPreviewController.swift index 0b1ce59da1..aec71a02c5 100644 --- a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Content/Previews/AAWallpapperPreviewController.swift +++ b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Content/Previews/AAWallpapperPreviewController.swift @@ -10,16 +10,21 @@ open class AAWallpapperPreviewController: AAViewController { fileprivate let cancelButton = UIButton() fileprivate let setButton = UIButton() - fileprivate let imageName: String + fileprivate let imageName: String? fileprivate let selectedImage: UIImage fileprivate var fromName: Bool - public init(imageName: String) { + public init(imageName: String?) { self.imageName = imageName self.selectedImage = UIImage() self.fromName = true super.init() - imageView.image = UIImage.bundled(imageName)! + if(imageName != nil){ + imageView.image = UIImage.bundled(imageName!)! + }else{ + imageView.backgroundColor = ActorSDK.sharedActor().style.chatBgColor + } + imageView.contentMode = .scaleAspectFill imageView.clipsToBounds = true cancelButton.backgroundColor = appStyle.vcPanelBgColor @@ -81,7 +86,8 @@ open class AAWallpapperPreviewController: AAViewController { self.dismiss(animated: true, completion: nil) if self.fromName == true { - Actor.changeSelectedWallpaper("local:\(imageName)") + + Actor.changeSelectedWallpaper(imageName != nil ? "local:\(imageName!)" : "default") } else { dispatchBackground({ () -> Void in diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Conversation/ConversationViewController.swift b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Conversation/ConversationViewController.swift index 0783be8354..0987b53cbd 100644 --- a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Conversation/ConversationViewController.swift +++ b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Conversation/ConversationViewController.swift @@ -7,8 +7,11 @@ import UIKit import MobileCoreServices import AddressBook import AddressBookUI +import AVFoundation +//import AGEmojiKeyboard -open class ConversationViewController: + +final public class ConversationViewController: AAConversationContentController, UIDocumentMenuDelegate, UIDocumentPickerDelegate, @@ -18,7 +21,11 @@ open class ConversationViewController: ABPeoplePickerNavigationControllerDelegate, AAAudioRecorderDelegate, AAConvActionSheetDelegate, - AAStickersKeyboardDelegate { + AAStickersKeyboardDelegate + //, + //AGEmojiKeyboardViewDataSource, + // AGEmojiKeyboardViewDelegate + { // Data binder fileprivate let binder = AABinder() @@ -35,7 +42,7 @@ open class ConversationViewController: // fileprivate let titleView: UILabel = UILabel() - fileprivate let subtitleView: UILabel = UILabel() + open let subtitleView: UILabel = UILabel() fileprivate let navigationView: UIView = UIView() fileprivate let avatarView = AABarAvatarView() fileprivate let backgroundView = UIImageView() @@ -49,8 +56,9 @@ open class ConversationViewController: // fileprivate var stickersView: AAStickersKeyboard! - fileprivate var stickersButton : UIButton! + open var stickersButton : UIButton! fileprivate var stickersOpen = false + //fileprivate var emojiKeyboar: AGEmojiKeyboardView! // @@ -67,6 +75,8 @@ open class ConversationViewController: fileprivate var textMode:Bool! fileprivate var micOn: Bool! = true + open var removeExcedentControllers = true + //////////////////////////////////////////////////////////// @@ -93,14 +103,17 @@ open class ConversationViewController: backgroundView.backgroundColor = appStyle.chatBgColor // Custom background if available - if let bg = Actor.getSelectedWallpaper() { - if bg.startsWith("local:") { - backgroundView.image = UIImage.bundled(bg.skip(6)) - } else { - let path = CocoaFiles.pathFromDescriptor(bg.skip(5)) - backgroundView.image = UIImage(contentsOfFile:path) - } + if let bg = Actor.getSelectedWallpaper(){ + if bg != "default" { + if bg.startsWith("local:") { + backgroundView.image = UIImage.bundled(bg.skip(6)) + } else { + let path = CocoaFiles.pathFromDescriptor(bg.skip(5)) + backgroundView.image = UIImage(contentsOfFile:path) + } + } } + view.insertSubview(backgroundView, at: 0) @@ -145,7 +158,9 @@ open class ConversationViewController: self.stickersButton.tintColor = UIColor.lightGray.withAlphaComponent(0.5) self.stickersButton.setImage(UIImage.bundled("sticker_button"), for: UIControlState()) self.stickersButton.addTarget(self, action: #selector(ConversationViewController.changeKeyboard), for: UIControlEvents.touchUpInside) - self.textInputbar.addSubview(stickersButton) + if(ActorSDK.sharedActor().delegate.showStickersButton()){ + self.textInputbar.addSubview(stickersButton) + } // @@ -276,6 +291,8 @@ open class ConversationViewController: self.stickersView = AAStickersKeyboard(frame: frame) self.stickersView.delegate = self + //emojiKeyboar.frame = frame + NotificationCenter.default.addObserver( self, selector: #selector(ConversationViewController.updateStickersStateOnCloseKeyboard), @@ -461,15 +478,18 @@ open class ConversationViewController: subtitleView.frame = CGRect(x: 0, y: 22, width: (navigationView.frame.width - 0), height: 20) stickersView.frame = CGRect(x: 0, y: 0, width: self.view.frame.size.width, height: 216) + //emojiKeyboar.frame = CGRect(x: 0, y: 0, width: self.view.frame.size.width, height: 216) } override open func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) - if navigationController!.viewControllers.count > 2 { - let firstController = navigationController!.viewControllers[0] - let currentController = navigationController!.viewControllers[navigationController!.viewControllers.count - 1] - navigationController!.setViewControllers([firstController, currentController], animated: false) + if self.removeExcedentControllers { + if navigationController!.viewControllers.count > 2 { + let firstController = navigationController!.viewControllers[0] + let currentController = navigationController!.viewControllers[navigationController!.viewControllers.count - 1] + navigationController!.setViewControllers([firstController, currentController], animated: false) + } } if !AADevice.isiPad { @@ -799,6 +819,11 @@ open class ConversationViewController: //////////////////////////////////////////////////////////// func pickImage(_ source: UIImagePickerControllerSourceType) { + + if(source == .camera && (AVAudioSession.sharedInstance().recordPermission() == AVAudioSessionRecordPermission.undetermined || AVAudioSession.sharedInstance().recordPermission() == AVAudioSessionRecordPermission.denied)){ + AVAudioSession.sharedInstance().requestRecordPermission({_ in (Bool).self}) + } + let pickerController = AAImagePickerController() pickerController.sourceType = source pickerController.mediaTypes = [kUTTypeImage as String,kUTTypeMovie as String] @@ -1043,17 +1068,18 @@ open class ConversationViewController: // MARK: - Stickers actions //////////////////////////////////////////////////////////// - func updateStickersStateOnCloseKeyboard() { + open func updateStickersStateOnCloseKeyboard() { self.stickersOpen = false self.stickersButton.setImage(UIImage.bundled("sticker_button"), for: UIControlState()) self.textInputbar.textView.inputView = nil } - func changeKeyboard() { + open func changeKeyboard() { if self.stickersOpen == false { - // self.stickersView.loadStickers() + //self.stickersView.loadStickers() self.textInputbar.textView.inputView = self.stickersView + //self.textInputbar.textView.inputView = self.emojiKeyboar self.textInputbar.textView.inputView?.isOpaque = false self.textInputbar.textView.inputView?.backgroundColor = UIColor.clear self.textInputbar.textView.refreshFirstResponder() @@ -1081,6 +1107,54 @@ open class ConversationViewController: open func stickerDidSelected(_ keyboard: AAStickersKeyboard, sticker: ACSticker) { Actor.sendSticker(with: self.peer, with: sticker) } + + /* + public func emojiKeyboardView(_ emojiKeyboardView: AGEmojiKeyboardView!, imageForSelectedCategory category: AGEmojiKeyboardViewCategoryImage) -> UIImage{ + switch category { + case .recent: + return UIImage.bundled("ic_smiles_recent")! + case .face: + return UIImage.bundled("ic_smiles_smile")! + case .car: + return UIImage.bundled("ic_smiles_car")! + case .bell: + return UIImage.bundled("ic_smiles_bell")! + case .flower: + return UIImage.bundled("ic_smiles_flower")! + case .characters: + return UIImage.bundled("ic_smiles_grid")! + } + } + + public func emojiKeyboardView(_ emojiKeyboardView: AGEmojiKeyboardView!, imageForNonSelectedCategory category: AGEmojiKeyboardViewCategoryImage) -> UIImage!{ + switch category { + case .recent: + return UIImage.bundled("ic_smiles_recent")! + case .face: + return UIImage.bundled("ic_smiles_smile")! + case .car: + return UIImage.bundled("ic_smiles_car")! + case .bell: + return UIImage.bundled("ic_smiles_bell")! + case .flower: + return UIImage.bundled("ic_smiles_flower")! + case .characters: + return UIImage.bundled("ic_smiles_grid")! + } + } + + public func backSpaceButtonImage(for emojiKeyboardView: AGEmojiKeyboardView!) -> UIImage!{ + return UIImage.bundled("ic_smiles_backspace")! + } + + public func emojiKeyBoardView(_ emojiKeyBoardView: AGEmojiKeyboardView!, didUseEmoji emoji: String!){ + self.textView.text = self.textView.text.appending(emoji) + } + + public func emojiKeyBoardViewDidPressBackSpace(_ emojiKeyBoardView: AGEmojiKeyboardView!){ + self.textView.deleteBackward() + } + */ } class AABarAvatarView : AAAvatarView { diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Group/AAAddParticipantViewController.swift b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Group/AAAddParticipantViewController.swift index ec1d12a89f..06ad1e22b0 100644 --- a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Group/AAAddParticipantViewController.swift +++ b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Group/AAAddParticipantViewController.swift @@ -22,10 +22,7 @@ open class AAAddParticipantViewController: AAContactsListContentController, AACo title = AALocalized("GroupAddParticipantTitle") -// navigationItem.leftBarButtonItem = UIBarButtonItem( -// title: AALocalized("NavigationCancel"), -// style: UIBarButtonItemStyle.plain, -// target: self, action: #selector(AAViewController.dismiss)) + navigationItem.leftBarButtonItem = UIBarButtonItem(title: AALocalized("NavigationCancel"), style: .plain, target: self, action: #selector(AAViewController.dismissController)) } open func willAddContacts(_ controller: AAContactsListContentController, section: AAManagedSection) { diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Group/AAGroupViewController.swift b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Group/AAGroupViewController.swift index 2e1be90ce5..68c0118194 100644 --- a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Group/AAGroupViewController.swift +++ b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Group/AAGroupViewController.swift @@ -288,10 +288,11 @@ open class AAGroupViewController: AAContentTableController { (self.group.isCanKickInvited.get().booleanValue() && d.inviterUid == Actor.myUid())) if canKick { + let isChannel = self.group.groupType == ACGroupType.channel() let name = Actor.getUserWithUid(d.uid).getNameModel().get() - a.destructive("GroupMemberKick") { () -> () in - self.confirmDestructive(AALocalized("GroupMemberKickMessage") - .replace("{name}", dest: name!), action: AALocalized("GroupMemberKickAction")) { + a.destructive(isChannel ? "ChannelMemberKick" : "GroupMemberKick") { () -> () in + self.confirmDestructive(AALocalized(isChannel ? "ChannelMemberKickMessage" : "GroupMemberKickMessage") + .replace("{name}", dest: name!), action: AALocalized(isChannel ? "ChannelMemberKickAction" : "GroupMemberKickAction")) { self.executeSafe(Actor.kickMemberCommand(withGid: jint(self.gid), withUid: user.getId())) } } @@ -321,16 +322,23 @@ open class AAGroupViewController: AAContentTableController { let title: String let action: String if self.group.groupType == ACGroupType.channel() { - title = AALocalized("ActionLeaveChannelMessage") - action = AALocalized("ActionLeaveChannelAction") + title = AALocalized("ActionLeaveChannelAction") + action = AALocalized("ActionLeaveChannel") } else { title = AALocalized("ActionDeleteAndExitMessage") - action = AALocalized("ActionDeleteAndExitMessageAction") + action = AALocalized("ActionDeleteAndExitAction") } self.confirmDestructive(title, action: action, yes: { () -> () in - self.executePromise(Actor.leaveAndDeleteGroup(withGid: jint(self.gid))) + self.executePromise(Actor.leaveAndDeleteGroup(withGid: jint(self.gid)), successBlock: { (t) in + DispatchQueue.main.async { + self.navigationController?.popToRootViewController(animated: true) + } + }, failureBlock: { (e) in + DispatchQueue.main.async { + self.alertUser(AALocalized("ActionDeleteAndExitNotAllowed")) + } + }) }) - return true } }) diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Group/AAGroupViewMembersController.swift b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Group/AAGroupViewMembersController.swift index a2499c9217..913ddf9008 100644 --- a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Group/AAGroupViewMembersController.swift +++ b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Group/AAGroupViewMembersController.swift @@ -41,7 +41,9 @@ open class AAGroupViewMembersController: AAContentTableController { Actor.onUserVisible(withUid: d.uid) } + var id = 0 r.itemShown = { (index, d) in + id = index if index > r.data.count - 10 { self.loadMore() } @@ -108,11 +110,15 @@ open class AAGroupViewMembersController: AAContentTableController { (self.group.isCanKickInvited.get().booleanValue() && d.inviterUid == Actor.myUid())) if canKick { + let isChannel = self.group.groupType == ACGroupType.channel() let name = Actor.getUserWithUid(d.uid).getNameModel().get() - a.destructive("GroupMemberKick") { () -> () in - self.confirmDestructive(AALocalized("GroupMemberKickMessage") - .replace("{name}", dest: name!), action: AALocalized("GroupMemberKickAction")) { - self.executeSafe(Actor.kickMemberCommand(withGid: jint(self.gid), withUid: user.getId())) + a.destructive(isChannel ? "ChannelMemberKick" : "GroupMemberKick") { () -> () in + self.confirmDestructive(AALocalized(isChannel ? "ChannelMemberKickMessage" : "GroupMemberKickMessage") + .replace("{name}", dest: name!), action: AALocalized(isChannel ? "ChannelMemberKickAction" : "GroupMemberKickAction")) { + self.executeSafe(Actor.kickMemberCommand(withGid: jint(self.gid), withUid: user.getId()), successBlock: { (r) in + self.membersRow.data.remove(at: id) + self.tableView.reloadData() + }) } } } @@ -148,6 +154,8 @@ open class AAGroupViewMembersController: AAContentTableController { } } + + func didAddPressed() { navigateNext(AAAddParticipantViewController(gid: self.gid)) } diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Managed Runtime/AAManagedTable.swift b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Managed Runtime/AAManagedTable.swift index 4d31247c92..135ae6b8c1 100644 --- a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Managed Runtime/AAManagedTable.swift +++ b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Managed Runtime/AAManagedTable.swift @@ -500,7 +500,7 @@ private class AAManagedSearchController: NSObject, UISearchBarDelegate if let ds = searchList { return ds.item(with: jint((indexPath as NSIndexPath).row)) as! BindCell.BindData } else if let sm = searchModel { - let list = sm.getResults().get() as! JavaUtilList + let list = sm.getResults().get() as! JavaUtilListProtocol return list.getWith(jint((indexPath as NSIndexPath).row)) as! BindCell.BindData } else { fatalError("No search model or search list is set!") @@ -521,7 +521,7 @@ private class AAManagedSearchController: NSObject, UISearchBarDelegate if let ds = searchList { return Int(ds.size()) } else if let sm = searchModel { - let list = sm.getResults().get() as! JavaUtilList + let list = sm.getResults().get() as! JavaUtilListProtocol return Int(list.size()) } else { fatalError("No search model or search list is set!") diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Managed Runtime/AANavigationController.swift b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Managed Runtime/AANavigationController.swift index 50afafe6c3..36187eb3b3 100644 --- a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Managed Runtime/AANavigationController.swift +++ b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Managed Runtime/AANavigationController.swift @@ -60,6 +60,7 @@ open class AANavigationController: UINavigationController { [NSForegroundColorAttributeName: ActorSDK.sharedActor().style.navigationTitleColor] navigationBar.tintColor = ActorSDK.sharedActor().style.navigationTintColor navigationBar.barTintColor = ActorSDK.sharedActor().style.navigationBgColor + navigationBar.isTranslucent = ActorSDK.sharedActor().style.navigationIsTransluent navigationBar.hairlineHidden = ActorSDK.sharedActor().style.navigationHairlineHidden view.backgroundColor = ActorSDK.sharedActor().style.vcBgColor diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Managed Runtime/AAViewController.swift b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Managed Runtime/AAViewController.swift index d82c183b8e..11e9175869 100644 --- a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Managed Runtime/AAViewController.swift +++ b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Managed Runtime/AAViewController.swift @@ -17,7 +17,7 @@ open class AAViewController: UIViewController, UINavigationControllerDelegate, U var pendingPickClosure: ((_ image: UIImage) -> ())? - var popover: UIPopoverController? + open var popover: UIPopoverController? // Content type for view tracking @@ -93,8 +93,10 @@ open class AAViewController: UIViewController, UINavigationControllerDelegate, U open func showPlaceholder() { if placeholder.superview == nil { - placeholder.frame = view.bounds + //placeholder.frame = view.frame view.addSubview(placeholder) + view.addConstraintsWithFormat("H:|[v0]|", views: placeholder) + view.addConstraintsWithFormat("V:|[v0]|", views: placeholder) } } diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Managed Runtime/Alerts.swift b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Managed Runtime/Alerts.swift index c75fa6a442..e8e8bc9452 100644 --- a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Managed Runtime/Alerts.swift +++ b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Managed Runtime/Alerts.swift @@ -59,6 +59,11 @@ public extension UIViewController { let controller = UIAlertController(title: title, message: nil, preferredStyle: UIAlertControllerStyle.actionSheet) + if (AADevice.isiPad) { + controller.popoverPresentationController?.sourceView = sourceView + controller.popoverPresentationController?.sourceRect = sourceRect + } + if cancelButton != nil { controller.addAction(UIAlertAction(title: AALocalized(cancelButton!), style: UIAlertActionStyle.cancel, handler: { (alertView) -> () in tapClosure(-1) diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Managed Runtime/Executions.swift b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Managed Runtime/Executions.swift index 0ff5c7dad5..ce203585a1 100644 --- a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Managed Runtime/Executions.swift +++ b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Managed Runtime/Executions.swift @@ -61,12 +61,12 @@ open class AAExecutions { command.start(with: AACommandCallback(result: { (val:Any?) -> () in dispatchOnUi { - hud?.hide(true) + hud?.hide(animated: true) successBlock?(val) } }, error: { (val) -> () in dispatchOnUi { - hud?.hide(true) + hud?.hide(animated: true) if type == .safe { @@ -141,13 +141,13 @@ open class AAExecutions { } class fileprivate func showProgress() -> MBProgressHUD { - let window = UIApplication.shared.windows[1] - let hud = MBProgressHUD(window: window) + let window = UIApplication.shared.windows[0] + let hud = MBProgressHUD(view: window) hud.mode = MBProgressHUDMode.indeterminate hud.removeFromSuperViewOnHide = true window.addSubview(hud) window.bringSubview(toFront: hud) - hud.show(true) + hud.show(animated: true) return hud } } diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Managed Runtime/ManagedAlerts.swift b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Managed Runtime/ManagedAlerts.swift index bb19fb9792..036a5eb68e 100644 --- a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Managed Runtime/ManagedAlerts.swift +++ b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Managed Runtime/ManagedAlerts.swift @@ -13,7 +13,7 @@ public extension UIViewController { closure(s) let controller = UIAlertController(title: AALocalized(s.title), message: AALocalized(s.message), preferredStyle: .actionSheet) - + for i in s.actions { controller.addAction(UIAlertAction(title: AALocalized(i.title), style: i.isDestructive ? UIAlertActionStyle.destructive : UIAlertActionStyle.default, handler: { (c) -> Void in i.closure() @@ -38,8 +38,8 @@ public extension UIViewController { open class AAAlertSetting { open var cancel: String! - open var title: String! - open var message: String! + open var title: String! = "" + open var message: String! = "" fileprivate var actions = [AlertActions]() diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Managed Runtime/ManagedCells.swift b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Managed Runtime/ManagedCells.swift index c96c03b6d3..16cea715de 100644 --- a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Managed Runtime/ManagedCells.swift +++ b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Managed Runtime/ManagedCells.swift @@ -12,6 +12,7 @@ open class AAEditRow: AAManagedRow, UITextFieldDelegate { open var text: String? open var placeholder: String? open var returnKeyType = UIReturnKeyType.default + open var keyboardType = UIKeyboardType.default open var autocorrectionType = UITextAutocorrectionType.default open var autocapitalizationType = UITextAutocapitalizationType.sentences open var returnAction: (()->())? @@ -37,6 +38,7 @@ open class AAEditRow: AAManagedRow, UITextFieldDelegate { res.textField.delegate = self res.textField.removeTarget(nil, action: nil, for: .allEvents) res.textField.addTarget(self, action: #selector(AAEditRow.textFieldDidChange(_:)), for: .editingChanged) + res.textField.keyboardType = keyboardType if prefix != nil { res.textPrefix.text = prefix diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Recent/AARecentViewController.swift b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Recent/AARecentViewController.swift index 2138b077d4..fc28120718 100644 --- a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Recent/AARecentViewController.swift +++ b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Recent/AARecentViewController.swift @@ -65,11 +65,21 @@ open class AARecentViewController: AADialogsListContentController, AADialogsList } open func compose() { - if AADevice.isiPad { - self.presentElegantViewController(AANavigationController(rootViewController: AAComposeController())) - } else { - navigateNext(AAComposeController()) + if let composeController = ActorSDK.sharedActor().delegate.actiorControllerForCompose() { + if AADevice.isiPad { + self.presentElegantViewController(AANavigationController(rootViewController: composeController)) + } else { + navigateNext(composeController) + } + }else{ + if AADevice.isiPad { + self.presentElegantViewController(AANavigationController(rootViewController: AAComposeController())) + } else { + navigateNext(AAComposeController()) + } } + + } // Tracking app state diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Ringtones/AARingtonesViewController.swift b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Ringtones/AARingtonesViewController.swift index ecbdaef3f2..d65aae45a0 100644 --- a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Ringtones/AARingtonesViewController.swift +++ b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Ringtones/AARingtonesViewController.swift @@ -13,14 +13,14 @@ import AVFoundation open class AARingtonesViewController: AATableViewController { var audioPlayer: AVAudioPlayer! - var selectedRingtone: String = "" - var completion: ((String) -> ())! + open var selectedRingtone: String = "" + open var completion: ((String) -> ())! let rootSoundDirectories: [String] = ["/Library/Ringtones"/*,"/System/Library/Audio/UISounds"*/] var directories: [String] = [] var soundFiles: [(directory: String, files: [String])] = [] - init() { + public init() { super.init(style: UITableViewStyle.plain) self.title = AALocalized("Ringtones") diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Settings/AAWallpapersCell.swift b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Settings/AAWallpapersCell.swift index a7f1fae686..539f479acd 100644 --- a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Settings/AAWallpapersCell.swift +++ b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Settings/AAWallpapersCell.swift @@ -10,25 +10,25 @@ open class AAWallpapersCell: AATableViewCell { fileprivate let wallpapper2 = UIImageView() fileprivate let wallpapper3 = UIImageView() - open var wallpapperDidTap: ((_ name: String) -> ())? + open var wallpapperDidTap: ((_ name: String?) -> ())? public override init(style: UITableViewCellStyle, reuseIdentifier: String?) { super.init(style: style, reuseIdentifier: reuseIdentifier) wallpapper1.clipsToBounds = true wallpapper1.contentMode = .scaleAspectFill - wallpapper1.image = UIImage.bundled("bg_1_preview.jpg")! - wallpapper1.viewDidTap = { [unowned self] () -> () in self.wallpapperDidTap?("bg_1.jpg") } + wallpapper1.backgroundColor = ActorSDK.sharedActor().style.chatBgColor + wallpapper1.viewDidTap = { [unowned self] () -> () in self.wallpapperDidTap?(nil) } wallpapper2.clipsToBounds = true wallpapper2.contentMode = .scaleAspectFill - wallpapper2.image = UIImage.bundled("bg_2_preview.jpg")! - wallpapper2.viewDidTap = { [unowned self] () -> () in self.wallpapperDidTap?("bg_2.jpg") } + wallpapper2.image = UIImage.bundled("bg_1_preview.jpg")! + wallpapper2.viewDidTap = { [unowned self] () -> () in self.wallpapperDidTap?("bg_1.jpg") } wallpapper3.clipsToBounds = true wallpapper3.contentMode = .scaleAspectFill - wallpapper3.image = UIImage.bundled("bg_3_preview.jpg")! - wallpapper3.viewDidTap = { [unowned self] () -> () in self.wallpapperDidTap?("bg_3.jpg") } + wallpapper3.image = UIImage.bundled("bg_2_preview.jpg")! + wallpapper3.viewDidTap = { [unowned self] () -> () in self.wallpapperDidTap?("bg_2.jpg") } self.contentView.addSubview(wallpapper1) self.contentView.addSubview(wallpapper2) diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Settings/Cells/AAWallpapperSettingsCell.swift b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Settings/Cells/AAWallpapperSettingsCell.swift index 55ab87f8b0..635373f3ba 100644 --- a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Settings/Cells/AAWallpapperSettingsCell.swift +++ b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/Settings/Cells/AAWallpapperSettingsCell.swift @@ -16,27 +16,27 @@ open class AAWallpapperSettingsCell: AATableViewCell { fileprivate let label = UILabel() fileprivate let disclose = UIImageView() - open var wallpapperDidTap: ((_ name: String) -> ())? + open var wallpapperDidTap: ((_ name: String?) -> ())? public override init(style: UITableViewCellStyle, reuseIdentifier: String?) { super.init(style: style, reuseIdentifier: reuseIdentifier) wallpapper1.clipsToBounds = true wallpapper1.contentMode = .scaleAspectFill - wallpapper1.image = UIImage.bundled("bg_1_preview.jpg")! - wallpapper1.viewDidTap = { [unowned self] () -> () in self.wallpapperDidTap?("bg_1.jpg") } + wallpapper1.backgroundColor = ActorSDK.sharedActor().style.chatBgColor + wallpapper1.viewDidTap = { [unowned self] () -> () in self.wallpapperDidTap?(nil) } wallpapper1Icon.image = UIImage.bundled("ImageSelectedOn") wallpapper2.clipsToBounds = true wallpapper2.contentMode = .scaleAspectFill - wallpapper2.image = UIImage.bundled("bg_2_preview.jpg")! - wallpapper2.viewDidTap = { [unowned self] () -> () in self.wallpapperDidTap?("bg_2.jpg") } + wallpapper2.image = UIImage.bundled("bg_1_preview.jpg")! + wallpapper2.viewDidTap = { [unowned self] () -> () in self.wallpapperDidTap?("bg_1.jpg") } wallpapper2Icon.image = UIImage.bundled("ImageSelectedOn") wallpapper3.clipsToBounds = true wallpapper3.contentMode = .scaleAspectFill - wallpapper3.image = UIImage.bundled("bg_3_preview.jpg")! - wallpapper3.viewDidTap = { [unowned self] () -> () in self.wallpapperDidTap?("bg_3.jpg") } + wallpapper3.image = UIImage.bundled("bg_2_preview.jpg")! + wallpapper3.viewDidTap = { [unowned self] () -> () in self.wallpapperDidTap?("bg_2.jpg") } wallpapper3Icon.image = UIImage.bundled("ImageSelectedOn") label.font = UIFont.systemFont(ofSize: 17) @@ -85,8 +85,8 @@ open class AAWallpapperSettingsCell: AATableViewCell { } open func bind() { - wallpapper1Icon.isHidden = ActorSDK.sharedActor().messenger.getSelectedWallpaper() != "local:bg_1.jpg" - wallpapper2Icon.isHidden = ActorSDK.sharedActor().messenger.getSelectedWallpaper() != "local:bg_2.jpg" - wallpapper3Icon.isHidden = ActorSDK.sharedActor().messenger.getSelectedWallpaper() != "local:bg_3.jpg" + wallpapper1Icon.isHidden = ActorSDK.sharedActor().messenger.getSelectedWallpaper() != "default" + wallpapper2Icon.isHidden = ActorSDK.sharedActor().messenger.getSelectedWallpaper() != "local:bg_1.jpg" + wallpapper3Icon.isHidden = ActorSDK.sharedActor().messenger.getSelectedWallpaper() != "local:bg_2.jpg" } } diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/User/AAUserViewController.swift b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/User/AAUserViewController.swift index f84797eb52..655b6a89b9 100644 --- a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/User/AAUserViewController.swift +++ b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Controllers/User/AAUserViewController.swift @@ -4,12 +4,14 @@ import UIKit -class AAUserViewController: AAContentTableController { +open class AAUserViewController: AAContentTableController { var headerRow: AAAvatarRow! var isContactRow: AACommonRow! + open var setRingtoneController: AARingtonesViewController! + open var sound: String! - init(uid: Int) { + public init(uid: Int) { super.init(style: AAContentTableStyle.settingsPlain) self.uid = uid @@ -18,11 +20,11 @@ class AAUserViewController: AAContentTableController { self.title = AALocalized("ProfileTitle") } - required init(coder aDecoder: NSCoder) { + public required init(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } - override func tableDidLoad() { + override open func tableDidLoad() { // Profile section { (s) -> () in @@ -101,43 +103,46 @@ class AAUserViewController: AAContentTableController { s.titled("ProfileUsername", content: "@\(n)") } - // Contact: Phones - s.arrays { (r: AAManagedArrayRows) -> () in - r.height = 55 - r.data = self.user.getPhonesModel().get().toSwiftArray() - r.bindData = { (c: AATitledCell, d: ACUserPhone) -> () in - c.setContent(AALocalized("SettingsMobilePhone"), content: "+\(d.phone)", isAction: false) - } - r.bindCopy = { (d: ACUserPhone) -> String? in - return "+\(d.phone)" - } - r.selectAction = { (c: ACUserPhone) -> Bool in - let phoneNumber = c.phone - let hasPhone = UIApplication.shared.canOpenURL(URL(string: "telprompt://")!) - if (!hasPhone) { - UIPasteboard.general.string = "+\(phoneNumber)" - self.alertUser("NumberCopied") - } else { - ActorSDK.sharedActor().openUrl("telprompt://+\(phoneNumber)") + if !ActorSDK.sharedActor().delegate.useOnClientPrivacy() || self.user.isInPhoneBookModel().get().booleanValue() { + // Contact: Phones + s.arrays { (r: AAManagedArrayRows) -> () in + r.height = 55 + r.data = self.user.getPhonesModel().get().toSwiftArray() + r.bindData = { (c: AATitledCell, d: ACUserPhone) -> () in + c.setContent(AALocalized("SettingsMobilePhone"), content: "+\(d.phone)", isAction: false) + } + r.bindCopy = { (d: ACUserPhone) -> String? in + return "+\(d.phone)" + } + r.selectAction = { (c: ACUserPhone) -> Bool in + let phoneNumber = c.phone + let hasPhone = UIApplication.shared.canOpenURL(URL(string: "telprompt://")!) + if (!hasPhone) { + UIPasteboard.general.string = "+\(phoneNumber)" + self.alertUser("NumberCopied") + } else { + ActorSDK.sharedActor().openUrl("telprompt://+\(phoneNumber)") + } + return true } - return true - } - } - - // Contact: Emails - s.arrays { (r: AAManagedArrayRows) -> () in - r.height = 55 - r.data = self.user.getEmailsModel().get().toSwiftArray() - r.bindData = { (c: AATitledCell, d: ACUserEmail) -> () in - c.setContent(d.title, content: d.email, isAction: false) - } - r.bindCopy = { (d: ACUserEmail) -> String? in - return d.email } - r.selectAction = { (c: ACUserEmail) -> Bool in - ActorSDK.sharedActor().openUrl("mailto:\(c.email)") - return true + + // Contact: Emails + s.arrays { (r: AAManagedArrayRows) -> () in + r.height = 55 + r.data = self.user.getEmailsModel().get().toSwiftArray() + r.bindData = { (c: AATitledCell, d: ACUserEmail) -> () in + c.setContent(d.title, content: d.email, isAction: false) + } + r.bindCopy = { (d: ACUserEmail) -> String? in + return d.email + } + r.selectAction = { (c: ACUserEmail) -> Bool in + ActorSDK.sharedActor().openUrl("mailto:\(c.email)") + return true + } } + } // Contact: About @@ -175,13 +180,13 @@ class AAUserViewController: AAContentTableController { if(Actor.isNotificationsEnabled(with: peer)){ r.selectAction = {() -> Bool in // Sound: Choose sound - let setRingtoneController = AARingtonesViewController() - let sound = Actor.getNotificationsSound(with: peer) - setRingtoneController.selectedRingtone = (sound != nil) ? sound! : "" - setRingtoneController.completion = {(selectedSound:String) in + self.setRingtoneController = AARingtonesViewController() + self.sound = Actor.getNotificationsSound(with: peer) + self.setRingtoneController.selectedRingtone = (self.sound != nil) ? self.sound! : "" + self.setRingtoneController.completion = {(selectedSound:String) in Actor.changeNotificationsSound(peer, withValue: selectedSound) } - let navigationController = AANavigationController(rootViewController: setRingtoneController) + let navigationController = AANavigationController(rootViewController: self.setRingtoneController) if (AADevice.isiPad) { navigationController.isModalInPopover = true navigationController.modalPresentationStyle = UIModalPresentationStyle.currentContext @@ -293,7 +298,7 @@ class AAUserViewController: AAContentTableController { } } - override func tableWillBind(_ binder: AABinder) { + override open func tableWillBind(_ binder: AABinder) { binder.bind(user.getAvatarModel(), closure: { (value: ACAvatar?) -> () in self.headerRow.reload() }) diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Libs/.DS_Store b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Libs/.DS_Store new file mode 100644 index 0000000000..d6e5bfd109 Binary files /dev/null and b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Libs/.DS_Store differ diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Sources/SwiftExtensions/Promises.swift b/actor-sdk/sdk-core-ios/ActorSDK/Sources/SwiftExtensions/Promises.swift index f24a2d91b3..535f5f1c7b 100644 --- a/actor-sdk/sdk-core-ios/ActorSDK/Sources/SwiftExtensions/Promises.swift +++ b/actor-sdk/sdk-core-ios/ActorSDK/Sources/SwiftExtensions/Promises.swift @@ -5,24 +5,27 @@ import Foundation import MBProgressHUD -extension ARPromise { +public extension ARPromise { - func startUserAction(_ ignore: [String] = []) -> ARPromise { + public func startUserAction(_ ignore: [String] = []) -> ARPromise { - let window = UIApplication.shared.windows[1] - let hud = MBProgressHUD(window: window) + let window = UIApplication.shared.windows[0] + // let hud = MBProgressHUD(window: window) + + let hud = MBProgressHUD(view: window) hud.mode = MBProgressHUDMode.indeterminate hud.removeFromSuperViewOnHide = true window.addSubview(hud) window.bringSubview(toFront: hud) - hud.show(true) + //hud.show(true) + hud.show(animated: true) then { (t: AnyObject!) -> () in - hud.hide(true) + hud.hide(animated:true) } failure { (e) -> () in - hud.hide(true) + hud.hide(animated:true) if let rpc = e as? ACRpcException { if ignore.contains(rpc.tag) { return @@ -34,23 +37,23 @@ extension ARPromise { return self } - func then(_ closure: @escaping (T!) -> ()) -> ARPromise { + public func then(_ closure: @escaping (T!) -> ()) -> ARPromise { then(PromiseConsumer(closure: closure)) return self } - func after(_ closure: @escaping () -> ()) -> ARPromise { + public func after(_ closure: @escaping () -> ()) -> ARPromise { then(PromiseConsumerEmpty(closure: closure)) return self } - func failure(withClosure closure: @escaping (JavaLangException!) -> ()) -> ARPromise { + public func failure(withClosure closure: @escaping (JavaLangException!) -> ()) -> ARPromise { failure(PromiseConsumer(closure: closure)) return self } } -class PromiseConsumer: NSObject, ARConsumer { +open class PromiseConsumer: NSObject, ARConsumer { let closure: (T!) -> () @@ -58,12 +61,12 @@ class PromiseConsumer: NSObject, ARConsumer { self.closure = closure } - func apply(withId t: Any!) { + open func apply(withId t: Any!) { closure(t as? T) } } -class PromiseConsumerEmpty: NSObject, ARConsumer { +open class PromiseConsumerEmpty: NSObject, ARConsumer { let closure: () -> () @@ -71,7 +74,7 @@ class PromiseConsumerEmpty: NSObject, ARConsumer { self.closure = closure } - func apply(withId t: Any!) { + open func apply(withId t: Any!) { closure() } } diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Sources/SwiftExtensions/Strings.swift b/actor-sdk/sdk-core-ios/ActorSDK/Sources/SwiftExtensions/Strings.swift index bc70feb3f2..f2d2cf6dbe 100644 --- a/actor-sdk/sdk-core-ios/ActorSDK/Sources/SwiftExtensions/Strings.swift +++ b/actor-sdk/sdk-core-ios/ActorSDK/Sources/SwiftExtensions/Strings.swift @@ -7,7 +7,7 @@ import j2objc public extension String { - public var isEmpty: Bool { return self.characters.isEmpty } + //public var isEmpty: Bool { return self.characters.isEmpty } public var length: Int { return self.characters.count } @@ -82,9 +82,9 @@ public extension String { return false } - public func contains(_ text: String) -> Bool { + /*public func contains(_ text: String) -> Bool { return self.range(of: text, options: NSString.CompareOptions.caseInsensitive, range: nil, locale: nil) != nil - } + }*/ public func startsWith(_ text: String) -> Bool { let range = self.range(of: text) @@ -137,6 +137,44 @@ public extension String { } public var asNS: NSString { return (self as NSString) } + + var containsEmoji: Bool { + for scalar in unicodeScalars { + // print(scalar.value) + switch scalar.value { + case + 0x1F600...0x1F64F, // Emoticons + 0x1F300...0x1F5FF, // Misc Symbols and Pictographs + 0x1F680...0x1F6FF, // Transport and Map + 0x2600...0x26FF, // Misc symbols + 0x2700...0x27BF, // Dingbats + 0xFE00...0xFE0F, // Variation Selectors + 0x1F910...0x1F933, // New Emoticons + 0x1F1E6...0x1F1FF, // Flags + 0x1F980...0x1F984, + 0x1F191...0x1F19A, + 0x1F201...0x1F202, + 0x1F232...0x1F23A, + 0x1F250...0x1F251, + 0x23E9...0x23F3, + 0x23F8...0x23FA, + 0x1F170...0x1F171, + 0x1F17E, + 0xA9, + 0xAE, + 0x2122, + 0x2328, + 0x3030, + 0x1F0CF, + 0x1F18E, + 0x1F9C0: + return true + default: + continue + } + } + return false + } } public extension NSAttributedString { diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Sources/SwiftExtensions/Views.swift b/actor-sdk/sdk-core-ios/ActorSDK/Sources/SwiftExtensions/Views.swift index 04779a14ee..a3e5574622 100644 --- a/actor-sdk/sdk-core-ios/ActorSDK/Sources/SwiftExtensions/Views.swift +++ b/actor-sdk/sdk-core-ios/ActorSDK/Sources/SwiftExtensions/Views.swift @@ -111,6 +111,26 @@ public extension UIView { self.frame = CGRect(x: rect.origin.x + (rect.width - self.bounds.width) / 2, y: rect.origin.y, width: self.bounds.width, height: self.bounds.height) } + + public func addConstraintsWithFormat(_ format: String, views: UIView...) { + var viewsDictionary = [String: UIView]() + for (index, view) in views.enumerated() { + let key = "v\(index)" + view.translatesAutoresizingMaskIntoConstraints = false + viewsDictionary[key] = view + } + addConstraints(NSLayoutConstraint.constraints(withVisualFormat: format, options: NSLayoutFormatOptions(), metrics: nil, views: viewsDictionary)) + } + + public func addConstraintsWithFormat(_ format: String, formatOptions: NSLayoutFormatOptions, views: UIView...) { + var viewsDictionary = [String: UIView]() + for (index, view) in views.enumerated() { + let key = "v\(index)" + view.translatesAutoresizingMaskIntoConstraints = false + viewsDictionary[key] = view + } + addConstraints(NSLayoutConstraint.constraints(withVisualFormat: format, options: formatOptions, metrics: nil, views: viewsDictionary)) + } } // Text measuring diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Utils/AATools.swift b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Utils/AATools.swift index 3619e33601..e5d0b92673 100644 --- a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Utils/AATools.swift +++ b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Utils/AATools.swift @@ -5,17 +5,17 @@ import Foundation import zipzap -class AATools { +open class AATools { - class func copyFileCommand(_ from: String, to: String) -> ACCommand { + open class func copyFileCommand(_ from: String, to: String) -> ACCommand { return CopyCommand(from: from, to: to) } - class func zipDirectoryCommand(_ from: String, to: String) -> ACCommand { + open class func zipDirectoryCommand(_ from: String, to: String) -> ACCommand { return ZipCommand(dir: from, to: to) } - class func isValidEmail(_ testStr:String) -> Bool { + open class func isValidEmail(_ testStr:String) -> Bool { let emailRegEx = "^[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,6}" diff --git a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Views/Cells/AABackgroundCellRenderer.swift b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Views/Cells/AABackgroundCellRenderer.swift index 2349f4e431..fff955d1fd 100644 --- a/actor-sdk/sdk-core-ios/ActorSDK/Sources/Views/Cells/AABackgroundCellRenderer.swift +++ b/actor-sdk/sdk-core-ios/ActorSDK/Sources/Views/Cells/AABackgroundCellRenderer.swift @@ -18,7 +18,7 @@ open class AABackgroundCellRenderer where T: AnyObject, P: AnyObject, P: E self.receiver = receiver } - func requestRender(_ config: P) -> Bool { + public func requestRender(_ config: P) -> Bool { // Ignore if not resized if requestedConfig == config { return false @@ -72,7 +72,7 @@ open class AABackgroundCellRenderer where T: AnyObject, P: AnyObject, P: E receiver(renderer(config)) } - func cancelRender(_ wasPresented: Bool = false) { + public func cancelRender(_ wasPresented: Bool = false) { generation += 1 let oldConfig = requestedConfig requestedConfig = nil diff --git a/actor-sdk/sdk-core-ios/Podfile b/actor-sdk/sdk-core-ios/Podfile index 149cff30ba..c4771d3279 100644 --- a/actor-sdk/sdk-core-ios/Podfile +++ b/actor-sdk/sdk-core-ios/Podfile @@ -25,6 +25,7 @@ target 'ActorApp' do pod 'YYWebImage' pod 'YYCategories' pod 'DZNWebViewController' + pod 'AGEmojiKeyboard' # Small UI pod 'VBFPopFlatButton' @@ -35,14 +36,16 @@ target 'ActorApp' do pod 'MBProgressHUD' # Calls - # pod 'libjingle_peerconnection' + pod 'libjingle_peerconnection' end target 'ActorSDK' do project 'ActorSDK.xcodeproj' # J2Objc Runtime - pod 'J2ObjC-Framework' + #pod 'J2ObjC-Framework' + + pod 'J2ObjC-Framework', :podspec => 'https://raw.githubusercontent.com/dfsilva/J2ObjC-Framework/v1.2a/J2ObjC-Framework.podspec' # Core Tools pod 'RegexKitLite' @@ -59,6 +62,7 @@ target 'ActorSDK' do pod 'YYWebImage' pod 'YYCategories' pod 'DZNWebViewController' + #pod 'AGEmojiKeyboard' # Small UI pod 'VBFPopFlatButton' diff --git a/actor-sdk/sdk-core-ios/Template/CommonCrypto.framework/module.map b/actor-sdk/sdk-core-ios/Template/CommonCrypto.framework/module.map new file mode 100755 index 0000000000..6b6c8409b5 --- /dev/null +++ b/actor-sdk/sdk-core-ios/Template/CommonCrypto.framework/module.map @@ -0,0 +1,4 @@ +module CommonCrypto [system] { + header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/CommonCrypto/CommonCrypto.h" + export * +} \ No newline at end of file diff --git a/actor-sdk/sdk-core-ios/Template/LICENSE b/actor-sdk/sdk-core-ios/Template/LICENSE new file mode 100755 index 0000000000..c612f4f7f6 --- /dev/null +++ b/actor-sdk/sdk-core-ios/Template/LICENSE @@ -0,0 +1,13 @@ +Copyright 2014-2015 Actor LLC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. \ No newline at end of file diff --git a/actor-sdk/sdk-core-ios/VERSION b/actor-sdk/sdk-core-ios/VERSION index 415b19fc36..f398a20612 100644 --- a/actor-sdk/sdk-core-ios/VERSION +++ b/actor-sdk/sdk-core-ios/VERSION @@ -1 +1 @@ -2.0 \ No newline at end of file +3.0 \ No newline at end of file diff --git a/actor-sdk/sdk-core-ios/buildFramework.sh b/actor-sdk/sdk-core-ios/buildFramework.sh index aa08486af1..7f289ebe58 100755 --- a/actor-sdk/sdk-core-ios/buildFramework.sh +++ b/actor-sdk/sdk-core-ios/buildFramework.sh @@ -54,8 +54,19 @@ cp -a build/Build/Products/Release-iphonesimulator/ActorSDK.framework/Modules/Ac # Copying dSYM cp -a build/Build/Products/Release-iphoneos/ActorSDK.framework.dSYM/* build/Output/ActorSDK.framework.dSYM/ +# Making Bundle +mkdir -p build/Podspec/ + # Compressing Framework -cd build/Output/ +rm -fr build/Podspec +mkdir -p build/Podspec/ActorSDK.framework +mkdir -p build/Podspec/ActorSDK.framework.dSYM +cp -r build/Output/ActorSDK.framework build/Podspec/ +cp -r build/Output/ActorSDK.framework.dSYM build/Podspec/ +cp -r Template/ build/Podspec/ + +cd build/Podspec/ rm -f ActorSDK.zip -zip -r ActorSDK.zip ActorSDK.framework ActorSDK.framework.dSYM +zip -r ActorSDK.zip * +mv ActorSDK.zip ../ diff --git a/actor-sdk/sdk-core/.DS_Store b/actor-sdk/sdk-core/.DS_Store new file mode 100644 index 0000000000..006b9ccb59 Binary files /dev/null and b/actor-sdk/sdk-core/.DS_Store differ diff --git a/actor-sdk/sdk-core/core/.DS_Store b/actor-sdk/sdk-core/core/.DS_Store new file mode 100644 index 0000000000..0215a3edba Binary files /dev/null and b/actor-sdk/sdk-core/core/.DS_Store differ diff --git a/actor-sdk/sdk-core/core/core-android/build.gradle b/actor-sdk/sdk-core/core/core-android/build.gradle index 390b823d44..614a6907fc 100644 --- a/actor-sdk/sdk-core/core/core-android/build.gradle +++ b/actor-sdk/sdk-core/core/core-android/build.gradle @@ -4,7 +4,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:2.1.3' + classpath 'com.android.tools.build:gradle:2.2.3' classpath 'me.tatarka:gradle-retrolambda:3.2.5' } } @@ -14,7 +14,7 @@ apply plugin: 'me.tatarka.retrolambda' android { compileSdkVersion 24 - buildToolsVersion '24.0.0' + buildToolsVersion '24.0.2' defaultConfig { minSdkVersion 15 @@ -50,7 +50,7 @@ android { dependencies { compile project(':actor-sdk:sdk-core:runtime:runtime-android') - compile 'com.android.support:recyclerview-v7:24.0.0' + compile 'com.android.support:recyclerview-v7:24.2.1' compile 'com.squareup.okhttp:okhttp:2+' compile 'io.pristine:libjingle:11139@aar' } \ No newline at end of file diff --git a/actor-sdk/sdk-core/core/core-android/src/main/java/im/actor/core/AndroidMessenger.java b/actor-sdk/sdk-core/core/core-android/src/main/java/im/actor/core/AndroidMessenger.java index 7505a2d4ad..db9a1d1bfe 100644 --- a/actor-sdk/sdk-core/core/core-android/src/main/java/im/actor/core/AndroidMessenger.java +++ b/actor-sdk/sdk-core/core/core-android/src/main/java/im/actor/core/AndroidMessenger.java @@ -33,6 +33,7 @@ import im.actor.core.entity.Peer; import im.actor.core.entity.SearchEntity; import im.actor.core.entity.content.FastThumb; +import im.actor.core.modules.ModuleContext; import im.actor.core.network.NetworkState; import im.actor.core.utils.AppStateActor; import im.actor.core.utils.IOUtils; @@ -40,6 +41,7 @@ import im.actor.core.viewmodel.AppStateVM; import im.actor.core.viewmodel.Command; import im.actor.core.viewmodel.GalleryVM; +import im.actor.runtime.Log; import im.actor.runtime.Runtime; import im.actor.runtime.actors.Actor; import im.actor.runtime.actors.ActorCreator; @@ -482,7 +484,9 @@ public void onScrolledToEnd() { @Override public void onItemTouched(Dialog item) { - + Log.d(AndroidMessenger.class.getName(), "Title"+item.getDialogTitle()); + Log.d(AndroidMessenger.class.getName(), "IsBot"+item.isBot()); + Log.d(AndroidMessenger.class.getName(), "IsChannel"+item.isChannel()); } }); } @@ -553,6 +557,11 @@ public AppStateVM getAppStateVM() { public void startImport() { modules.getContactsModule().startImport(); + } + @Override + public void onLoggedIn() { + super.onLoggedIn(); + } } \ No newline at end of file diff --git a/actor-sdk/sdk-core/core/core-js/.DS_Store b/actor-sdk/sdk-core/core/core-js/.DS_Store new file mode 100644 index 0000000000..d7a20d7771 Binary files /dev/null and b/actor-sdk/sdk-core/core/core-js/.DS_Store differ diff --git a/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java index dcf2003780..996dd0a0bc 100644 --- a/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java +++ b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java @@ -1768,6 +1768,18 @@ public Promise joinGroup(int gid) { return modules.getGroupsModule().joinGroup(gid); } + /** + * Join group by Id + * + * @param gid group's id + * @return Promise of Void + */ + @NotNull + @ObjectiveCName("joinGroupByGid:") + public Promise joinGroupById(int gid) { + return modules.getGroupsModule().joinGroupById(gid); + } + /** * Request integration token for group * @@ -2735,7 +2747,8 @@ public void forceNetworkCheck() { * * @return Module Contexts */ - ModuleContext getModuleContext() { + @ObjectiveCName("getModulesContext") + public ModuleContext getModuleContext() { return modules; } } \ No newline at end of file diff --git a/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/ApiGroupPre.java b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/ApiGroupPre.java new file mode 100644 index 0000000000..2613e5a76d --- /dev/null +++ b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/ApiGroupPre.java @@ -0,0 +1,85 @@ +package im.actor.core.api; +/* + * Generated by the Actor API Scheme generator. DO NOT EDIT! + */ + +import im.actor.runtime.bser.*; +import im.actor.runtime.collections.*; +import static im.actor.runtime.bser.Utils.*; +import im.actor.core.network.parser.*; +import org.jetbrains.annotations.Nullable; +import org.jetbrains.annotations.NotNull; +import com.google.j2objc.annotations.ObjectiveCName; +import java.io.IOException; +import java.util.List; +import java.util.ArrayList; + +public class ApiGroupPre extends BserObject { + + private ApiGroup group; + private int groupFatherId; + private List childrens; + + public ApiGroupPre(@NotNull ApiGroup group, int groupFatherId, @NotNull List childrens) { + this.group = group; + this.groupFatherId = groupFatherId; + this.childrens = childrens; + } + + public ApiGroupPre() { + + } + + @NotNull + public ApiGroup getGroup() { + return this.group; + } + + public int getGroupFatherId() { + return this.groupFatherId; + } + + @NotNull + public List getChildrens() { + return this.childrens; + } + + @Override + public void parse(BserValues values) throws IOException { + this.group = values.getObj(1, new ApiGroup()); + this.groupFatherId = values.getInt(2); + List _childrens = new ArrayList(); + for (int i = 0; i < values.getRepeatedCount(3); i ++) { + _childrens.add(new ApiGroup()); + } + this.childrens = values.getRepeatedObj(3, _childrens); + if (values.hasRemaining()) { + setUnmappedObjects(values.buildRemaining()); + } + } + + @Override + public void serialize(BserWriter writer) throws IOException { + if (this.group == null) { + throw new IOException(); + } + writer.writeObject(1, this.group); + writer.writeInt(2, this.groupFatherId); + writer.writeRepeatedObj(3, this.childrens); + if (this.getUnmappedObjects() != null) { + SparseArray unmapped = this.getUnmappedObjects(); + for (int i = 0; i < unmapped.size(); i++) { + int key = unmapped.keyAt(i); + writer.writeUnmapped(key, unmapped.get(key)); + } + } + } + + @Override + public String toString() { + String res = "struct GroupPre{"; + res += "}"; + return res; + } + +} diff --git a/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/ApiSurvey.java b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/ApiSurvey.java new file mode 100644 index 0000000000..a1ab7670ba --- /dev/null +++ b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/ApiSurvey.java @@ -0,0 +1,97 @@ +package im.actor.core.api; +/* + * Generated by the Actor API Scheme generator. DO NOT EDIT! + */ + +import im.actor.runtime.bser.*; +import im.actor.runtime.collections.*; +import static im.actor.runtime.bser.Utils.*; +import im.actor.core.network.parser.*; +import org.jetbrains.annotations.Nullable; +import org.jetbrains.annotations.NotNull; +import com.google.j2objc.annotations.ObjectiveCName; +import java.io.IOException; +import java.util.List; +import java.util.ArrayList; + +public class ApiSurvey extends BserObject { + + private long id; + private String title; + private String description; + private long creationTime; + private long endTime; + private int userId; + + public ApiSurvey(long id, @NotNull String title, @Nullable String description, long creationTime, long endTime, int userId) { + this.id = id; + this.title = title; + this.description = description; + this.creationTime = creationTime; + this.endTime = endTime; + this.userId = userId; + } + + public ApiSurvey() { + + } + + public long getId() { + return this.id; + } + + @NotNull + public String getTitle() { + return this.title; + } + + @Nullable + public String getDescription() { + return this.description; + } + + public long getCreationTime() { + return this.creationTime; + } + + public long getEndTime() { + return this.endTime; + } + + public int getUserId() { + return this.userId; + } + + @Override + public void parse(BserValues values) throws IOException { + this.id = values.getLong(1); + this.title = values.getString(2); + this.description = values.optString(3); + this.creationTime = values.getLong(4); + this.endTime = values.getLong(5); + this.userId = values.getInt(6); + } + + @Override + public void serialize(BserWriter writer) throws IOException { + writer.writeLong(1, this.id); + if (this.title == null) { + throw new IOException(); + } + writer.writeString(2, this.title); + if (this.description != null) { + writer.writeString(3, this.description); + } + writer.writeLong(4, this.creationTime); + writer.writeLong(5, this.endTime); + writer.writeInt(6, this.userId); + } + + @Override + public String toString() { + String res = "struct Survey{"; + res += "}"; + return res; + } + +} diff --git a/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/ApiSurveyAnswer.java b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/ApiSurveyAnswer.java new file mode 100644 index 0000000000..b3e4be1f29 --- /dev/null +++ b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/ApiSurveyAnswer.java @@ -0,0 +1,62 @@ +package im.actor.core.api; +/* + * Generated by the Actor API Scheme generator. DO NOT EDIT! + */ + +import im.actor.runtime.bser.*; +import im.actor.runtime.collections.*; +import static im.actor.runtime.bser.Utils.*; +import im.actor.core.network.parser.*; +import org.jetbrains.annotations.Nullable; +import org.jetbrains.annotations.NotNull; +import com.google.j2objc.annotations.ObjectiveCName; +import java.io.IOException; +import java.util.List; +import java.util.ArrayList; + +public class ApiSurveyAnswer extends BserObject { + + private long id; + private String title; + + public ApiSurveyAnswer(long id, @NotNull String title) { + this.id = id; + this.title = title; + } + + public ApiSurveyAnswer() { + + } + + public long getId() { + return this.id; + } + + @NotNull + public String getTitle() { + return this.title; + } + + @Override + public void parse(BserValues values) throws IOException { + this.id = values.getLong(1); + this.title = values.getString(2); + } + + @Override + public void serialize(BserWriter writer) throws IOException { + writer.writeLong(1, this.id); + if (this.title == null) { + throw new IOException(); + } + writer.writeString(2, this.title); + } + + @Override + public String toString() { + String res = "struct SurveyAnswer{"; + res += "}"; + return res; + } + +} diff --git a/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/ApiUserSurveyAnswer.java b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/ApiUserSurveyAnswer.java new file mode 100644 index 0000000000..6d97cbeb85 --- /dev/null +++ b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/ApiUserSurveyAnswer.java @@ -0,0 +1,58 @@ +package im.actor.core.api; +/* + * Generated by the Actor API Scheme generator. DO NOT EDIT! + */ + +import im.actor.runtime.bser.*; +import im.actor.runtime.collections.*; +import static im.actor.runtime.bser.Utils.*; +import im.actor.core.network.parser.*; +import org.jetbrains.annotations.Nullable; +import org.jetbrains.annotations.NotNull; +import com.google.j2objc.annotations.ObjectiveCName; +import java.io.IOException; +import java.util.List; +import java.util.ArrayList; + +public class ApiUserSurveyAnswer extends BserObject { + + private int userId; + private long answerId; + + public ApiUserSurveyAnswer(int userId, long answerId) { + this.userId = userId; + this.answerId = answerId; + } + + public ApiUserSurveyAnswer() { + + } + + public int getUserId() { + return this.userId; + } + + public long getAnswerId() { + return this.answerId; + } + + @Override + public void parse(BserValues values) throws IOException { + this.userId = values.getInt(1); + this.answerId = values.getLong(2); + } + + @Override + public void serialize(BserWriter writer) throws IOException { + writer.writeInt(1, this.userId); + writer.writeLong(2, this.answerId); + } + + @Override + public String toString() { + String res = "struct UserSurveyAnswer{"; + res += "}"; + return res; + } + +} diff --git a/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/parser/RpcParser.java b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/parser/RpcParser.java index e628db24b1..1d6da1efb8 100644 --- a/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/parser/RpcParser.java +++ b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/parser/RpcParser.java @@ -90,6 +90,7 @@ public RpcScope read(int type, byte[] payload) throws IOException { case 2721: return RequestLeaveAndDelete.fromBytes(payload); case 71: return RequestKickUser.fromBytes(payload); case 2722: return RequestJoinGroupByPeer.fromBytes(payload); + case 44561: return RequestJoinGroupByGroupId.fromBytes(payload); case 2784: return RequestMakeUserAdmin.fromBytes(payload); case 2791: return RequestDismissUserAdmin.fromBytes(payload); case 2789: return RequestTransferOwnership.fromBytes(payload); diff --git a/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/rpc/RequestCreateGroupPre.java b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/rpc/RequestCreateGroupPre.java new file mode 100644 index 0000000000..e0e6cda215 --- /dev/null +++ b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/rpc/RequestCreateGroupPre.java @@ -0,0 +1,68 @@ +package im.actor.core.api.rpc; +/* + * Generated by the Actor API Scheme generator. DO NOT EDIT! + */ + +import im.actor.runtime.bser.*; +import im.actor.runtime.collections.*; +import static im.actor.runtime.bser.Utils.*; +import im.actor.core.network.parser.*; +import org.jetbrains.annotations.Nullable; +import org.jetbrains.annotations.NotNull; +import com.google.j2objc.annotations.ObjectiveCName; +import java.io.IOException; +import java.util.List; +import java.util.ArrayList; +import im.actor.core.api.*; + +public class RequestCreateGroupPre extends Request { + + public static final int HEADER = 0x13; + public static RequestCreateGroupPre fromBytes(byte[] data) throws IOException { + return Bser.parse(new RequestCreateGroupPre(), data); + } + + private int groupId; + private int groupFatherId; + + public RequestCreateGroupPre(int groupId, int groupFatherId) { + this.groupId = groupId; + this.groupFatherId = groupFatherId; + } + + public RequestCreateGroupPre() { + + } + + public int getGroupId() { + return this.groupId; + } + + public int getGroupFatherId() { + return this.groupFatherId; + } + + @Override + public void parse(BserValues values) throws IOException { + this.groupId = values.getInt(1); + this.groupFatherId = values.getInt(2); + } + + @Override + public void serialize(BserWriter writer) throws IOException { + writer.writeInt(1, this.groupId); + writer.writeInt(2, this.groupFatherId); + } + + @Override + public String toString() { + String res = "rpc CreateGroupPre{"; + res += "}"; + return res; + } + + @Override + public int getHeaderKey() { + return HEADER; + } +} diff --git a/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/rpc/RequestCreateSurvey.java b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/rpc/RequestCreateSurvey.java new file mode 100644 index 0000000000..4c8f56e221 --- /dev/null +++ b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/rpc/RequestCreateSurvey.java @@ -0,0 +1,77 @@ +package im.actor.core.api.rpc; +/* + * Generated by the Actor API Scheme generator. DO NOT EDIT! + */ + +import im.actor.runtime.bser.*; +import im.actor.runtime.collections.*; +import static im.actor.runtime.bser.Utils.*; +import im.actor.core.network.parser.*; +import org.jetbrains.annotations.Nullable; +import org.jetbrains.annotations.NotNull; +import com.google.j2objc.annotations.ObjectiveCName; +import java.io.IOException; +import java.util.List; +import java.util.ArrayList; +import im.actor.core.api.*; + +public class RequestCreateSurvey extends Request { + + public static final int HEADER = 0x8b; + public static RequestCreateSurvey fromBytes(byte[] data) throws IOException { + return Bser.parse(new RequestCreateSurvey(), data); + } + + private ApiSurvey survey; + private List answers; + + public RequestCreateSurvey(@NotNull ApiSurvey survey, @NotNull List answers) { + this.survey = survey; + this.answers = answers; + } + + public RequestCreateSurvey() { + + } + + @NotNull + public ApiSurvey getSurvey() { + return this.survey; + } + + @NotNull + public List getAnswers() { + return this.answers; + } + + @Override + public void parse(BserValues values) throws IOException { + this.survey = values.getObj(1, new ApiSurvey()); + List _answers = new ArrayList(); + for (int i = 0; i < values.getRepeatedCount(2); i ++) { + _answers.add(new ApiSurveyAnswer()); + } + this.answers = values.getRepeatedObj(2, _answers); + } + + @Override + public void serialize(BserWriter writer) throws IOException { + if (this.survey == null) { + throw new IOException(); + } + writer.writeObject(1, this.survey); + writer.writeRepeatedObj(2, this.answers); + } + + @Override + public String toString() { + String res = "rpc CreateSurvey{"; + res += "}"; + return res; + } + + @Override + public int getHeaderKey() { + return HEADER; + } +} diff --git a/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/rpc/RequestJoinGroupByGroupId.java b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/rpc/RequestJoinGroupByGroupId.java new file mode 100644 index 0000000000..130fd93a31 --- /dev/null +++ b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/rpc/RequestJoinGroupByGroupId.java @@ -0,0 +1,60 @@ +package im.actor.core.api.rpc; +/* + * Generated by the Actor API Scheme generator. DO NOT EDIT! + */ + +import im.actor.runtime.bser.*; +import im.actor.runtime.collections.*; +import static im.actor.runtime.bser.Utils.*; +import im.actor.core.network.parser.*; +import org.jetbrains.annotations.Nullable; +import org.jetbrains.annotations.NotNull; +import com.google.j2objc.annotations.ObjectiveCName; +import java.io.IOException; +import java.util.List; +import java.util.ArrayList; +import im.actor.core.api.*; + +public class RequestJoinGroupByGroupId extends Request { + + public static final int HEADER = 0xae11; + public static RequestJoinGroupByGroupId fromBytes(byte[] data) throws IOException { + return Bser.parse(new RequestJoinGroupByGroupId(), data); + } + + private int groupId; + + public RequestJoinGroupByGroupId(int groupId) { + this.groupId = groupId; + } + + public RequestJoinGroupByGroupId() { + + } + + public int getGroupId() { + return this.groupId; + } + + @Override + public void parse(BserValues values) throws IOException { + this.groupId = values.getInt(1); + } + + @Override + public void serialize(BserWriter writer) throws IOException { + writer.writeInt(1, this.groupId); + } + + @Override + public String toString() { + String res = "rpc JoinGroupByGroupId{"; + res += "}"; + return res; + } + + @Override + public int getHeaderKey() { + return HEADER; + } +} diff --git a/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/rpc/RequestLoadGroupsPre.java b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/rpc/RequestLoadGroupsPre.java new file mode 100644 index 0000000000..00b3e33d3b --- /dev/null +++ b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/rpc/RequestLoadGroupsPre.java @@ -0,0 +1,60 @@ +package im.actor.core.api.rpc; +/* + * Generated by the Actor API Scheme generator. DO NOT EDIT! + */ + +import im.actor.runtime.bser.*; +import im.actor.runtime.collections.*; +import static im.actor.runtime.bser.Utils.*; +import im.actor.core.network.parser.*; +import org.jetbrains.annotations.Nullable; +import org.jetbrains.annotations.NotNull; +import com.google.j2objc.annotations.ObjectiveCName; +import java.io.IOException; +import java.util.List; +import java.util.ArrayList; +import im.actor.core.api.*; + +public class RequestLoadGroupsPre extends Request { + + public static final int HEADER = 0x12; + public static RequestLoadGroupsPre fromBytes(byte[] data) throws IOException { + return Bser.parse(new RequestLoadGroupsPre(), data); + } + + private int groupFatherId; + + public RequestLoadGroupsPre(int groupFatherId) { + this.groupFatherId = groupFatherId; + } + + public RequestLoadGroupsPre() { + + } + + public int getGroupFatherId() { + return this.groupFatherId; + } + + @Override + public void parse(BserValues values) throws IOException { + this.groupFatherId = values.getInt(1); + } + + @Override + public void serialize(BserWriter writer) throws IOException { + writer.writeInt(1, this.groupFatherId); + } + + @Override + public String toString() { + String res = "rpc LoadGroupsPre{"; + res += "}"; + return res; + } + + @Override + public int getHeaderKey() { + return HEADER; + } +} diff --git a/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/rpc/ResponseCreateGroupPre.java b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/rpc/ResponseCreateGroupPre.java new file mode 100644 index 0000000000..8939340032 --- /dev/null +++ b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/rpc/ResponseCreateGroupPre.java @@ -0,0 +1,84 @@ +package im.actor.core.api.rpc; +/* + * Generated by the Actor API Scheme generator. DO NOT EDIT! + */ + +import im.actor.runtime.bser.*; +import im.actor.runtime.collections.*; +import static im.actor.runtime.bser.Utils.*; +import im.actor.core.network.parser.*; +import org.jetbrains.annotations.Nullable; +import org.jetbrains.annotations.NotNull; +import com.google.j2objc.annotations.ObjectiveCName; +import java.io.IOException; +import java.util.List; +import java.util.ArrayList; +import im.actor.core.api.*; + +public class ResponseCreateGroupPre extends Response { + + public static final int HEADER = 0x15; + public static ResponseCreateGroupPre fromBytes(byte[] data) throws IOException { + return Bser.parse(new ResponseCreateGroupPre(), data); + } + + private int seq; + private byte[] state; + private ApiGroupPre groupPre; + + public ResponseCreateGroupPre(int seq, @NotNull byte[] state, @NotNull ApiGroupPre groupPre) { + this.seq = seq; + this.state = state; + this.groupPre = groupPre; + } + + public ResponseCreateGroupPre() { + + } + + public int getSeq() { + return this.seq; + } + + @NotNull + public byte[] getState() { + return this.state; + } + + @NotNull + public ApiGroupPre getGroupPre() { + return this.groupPre; + } + + @Override + public void parse(BserValues values) throws IOException { + this.seq = values.getInt(1); + this.state = values.getBytes(2); + this.groupPre = values.getObj(3, new ApiGroupPre()); + } + + @Override + public void serialize(BserWriter writer) throws IOException { + writer.writeInt(1, this.seq); + if (this.state == null) { + throw new IOException(); + } + writer.writeBytes(2, this.state); + if (this.groupPre == null) { + throw new IOException(); + } + writer.writeObject(3, this.groupPre); + } + + @Override + public String toString() { + String res = "tuple CreateGroupPre{"; + res += "}"; + return res; + } + + @Override + public int getHeaderKey() { + return HEADER; + } +} diff --git a/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/rpc/ResponseLoadGroupsPre.java b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/rpc/ResponseLoadGroupsPre.java new file mode 100644 index 0000000000..ce2c2d5c65 --- /dev/null +++ b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/api/rpc/ResponseLoadGroupsPre.java @@ -0,0 +1,65 @@ +package im.actor.core.api.rpc; +/* + * Generated by the Actor API Scheme generator. DO NOT EDIT! + */ + +import im.actor.runtime.bser.*; +import im.actor.runtime.collections.*; +import static im.actor.runtime.bser.Utils.*; +import im.actor.core.network.parser.*; +import org.jetbrains.annotations.Nullable; +import org.jetbrains.annotations.NotNull; +import com.google.j2objc.annotations.ObjectiveCName; +import java.io.IOException; +import java.util.List; +import java.util.ArrayList; +import im.actor.core.api.*; + +public class ResponseLoadGroupsPre extends Response { + + public static final int HEADER = 0x14; + public static ResponseLoadGroupsPre fromBytes(byte[] data) throws IOException { + return Bser.parse(new ResponseLoadGroupsPre(), data); + } + + private List groups; + + public ResponseLoadGroupsPre(@NotNull List groups) { + this.groups = groups; + } + + public ResponseLoadGroupsPre() { + + } + + @NotNull + public List getGroups() { + return this.groups; + } + + @Override + public void parse(BserValues values) throws IOException { + List _groups = new ArrayList(); + for (int i = 0; i < values.getRepeatedCount(1); i ++) { + _groups.add(new ApiGroup()); + } + this.groups = values.getRepeatedObj(1, _groups); + } + + @Override + public void serialize(BserWriter writer) throws IOException { + writer.writeRepeatedObj(1, this.groups); + } + + @Override + public String toString() { + String res = "tuple LoadGroupsPre{"; + res += "}"; + return res; + } + + @Override + public int getHeaderKey() { + return HEADER; + } +} diff --git a/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/groups/GroupsModule.java b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/groups/GroupsModule.java index 3f4e982237..91edba2fe0 100644 --- a/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/groups/GroupsModule.java +++ b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/groups/GroupsModule.java @@ -8,7 +8,6 @@ import java.util.HashMap; import java.util.List; -import im.actor.core.api.ApiAdminSettings; import im.actor.core.api.ApiGroupOutPeer; import im.actor.core.api.ApiGroupType; import im.actor.core.api.ApiMember; @@ -26,6 +25,7 @@ import im.actor.core.api.rpc.RequestGetIntegrationToken; import im.actor.core.api.rpc.RequestInviteUser; import im.actor.core.api.rpc.RequestJoinGroup; +import im.actor.core.api.rpc.RequestJoinGroupByGroupId; import im.actor.core.api.rpc.RequestJoinGroupByPeer; import im.actor.core.api.rpc.RequestKickUser; import im.actor.core.api.rpc.RequestLeaveAndDelete; @@ -63,6 +63,7 @@ import im.actor.runtime.actors.messages.Void; import im.actor.runtime.eventbus.BusSubscriber; import im.actor.runtime.eventbus.Event; +import im.actor.runtime.function.Consumer; import im.actor.runtime.function.Function; import im.actor.runtime.mvvm.MVVMCollection; import im.actor.runtime.promise.Promise; @@ -144,6 +145,14 @@ private Promise createGroup(String title, String avatarDescriptor, int[ .map((Function>) ints -> { ArrayList peers = new ArrayList<>(); for (int u : uids) { + +// users().getValueAsync(u).then(new Consumer() { +// @Override +// public void apply(User user) { +// peers.add(new ApiUserOutPeer(u, user.getAccessHash())); +// } +// }); + User user = users().getValue(u); if (user != null) { peers.add(new ApiUserOutPeer(u, user.getAccessHash())); @@ -362,6 +371,12 @@ public Promise joinGroup(int gid) { .map(r -> null); } + public Promise joinGroupById(int gid) { + return api(new RequestJoinGroupByGroupId(gid)) + .chain(r -> updates().waitForUpdate(r.getSeq())) + .map(r -> null); + } + // // Integration Token // diff --git a/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/messaging/dialogs/DialogsActor.java b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/messaging/dialogs/DialogsActor.java index ef3e642582..8fac3d4088 100644 --- a/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/messaging/dialogs/DialogsActor.java +++ b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/messaging/dialogs/DialogsActor.java @@ -285,7 +285,8 @@ private Promise onHistoryLoaded(List history) { .setDialogTitle(peerDesc.getTitle()) .setDialogAvatar(peerDesc.getAvatar()) .setSortKey(dialogHistory.getSortDate()) - + .setIsChannel(peerDesc.isChannel()) + .setIsBot(peerDesc.isBot()) .setRid(dialogHistory.getRid()) .setTime(dialogHistory.getDate()) .setMessageType(description.getContentType()) diff --git a/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/sequence/SequenceActor.java b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/sequence/SequenceActor.java index 6e68474160..6d282b30cb 100644 --- a/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/sequence/SequenceActor.java +++ b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/sequence/SequenceActor.java @@ -105,17 +105,25 @@ private void onPushSeqReceived(int seq, long authId) { if (context().getApiModule() == null) { return; } - context().getApiModule().checkIsCurrentAuthId(authId).then(same -> { - if (same) { - if (seq <= this.seq) { - Log.d(TAG, "Ignored PushSeq {seq:" + seq + "}"); - } else { - Log.w(TAG, "External Out of sequence: starting timer for invalidation"); - startInvalidationTimer(); + if (authId != 0) { + context().getApiModule().checkIsCurrentAuthId(authId).then(same -> { + if (same) { + if (seq <= this.seq) { + Log.d(TAG, "Ignored PushSeq {seq:" + seq + "}"); + } else { + Log.w(TAG, "External Out of sequence: starting timer for invalidation"); + startInvalidationTimer(); + } } + }); + } else { + if (seq <= this.seq) { + Log.d(TAG, "Ignored PushSeq {seq:" + seq + "}"); + } else { + Log.w(TAG, "External Out of sequence: starting timer for invalidation"); + startInvalidationTimer(); } - }); - + } } @Deprecated diff --git a/actor-sdk/sdk-core/core/core-shared/src/main/resources/AppText_Nl.json b/actor-sdk/sdk-core/core/core-shared/src/main/resources/AppText_Nl.json new file mode 100644 index 0000000000..564e1e90ab --- /dev/null +++ b/actor-sdk/sdk-core/core/core-shared/src/main/resources/AppText_Nl.json @@ -0,0 +1,206 @@ +{ + "app": { + "name": "{app_name}" + }, + + "language": { + + "code": "Nl", + + "format": { + "time": { + "yesterday":{ + "short": "Gisteren", + "full": "Gisteren" + }, + "now": "Nu", + "minutes": { + "short": "{minutes} min", + "full": "{minutes} minuten" + }, + "hours": { + "short": "{hours} uur", + "full": "{hours} uren" + } + } + }, + + "file_size": { + "bytes": "{bytes} B", + "kbytes": "{kbytes} KB", + "mbytes": "{mbytes} MB", + "gbytes": "{gbytes} GB" + }, + + "referencing": { + "you": "Je", + "thee": "U" + }, + + "sequence": { + "or": ", ", + "and": " en " + } + }, + + "groups": { + "members": { + "one": "{count} lid", + "other": "{count} leden" + } + }, + + "presence": { + "online": "online", + "offline": "offline", + "now": "zojuist gezien", + "today": "laatst gezien vandaag om {time}", + "yesterday": "laatst gezien gisteren om {time}", + "at_day": "voor het laatst gezien op {date}", + "at_day_time": "laatst gezien op {date} om {time}", + "members": "{count} online" + }, + + "typing": { + "simple": "typt...", + "user": "{user} is aan het typen...", + "group": { + "sequenced": "{users} zijn aan het typen...", + "many": "{count} personen zijn aan het typen..." + } + }, + + "content": { + + "unknown": "Niet ondersteunde inhoud", + "document": "Document", + "photo": "Foto", + "video": "Video", + "audio": "Geluid", + "contact": "Contact", + "location": "Locatie", + "sticker": "Sticker", + + "service": { + "registered": { + "full": "{name} is lid geworden van {app_name}", + "compact": "{name} is nu lid" + }, + "groups": { + "created": "{name} heeft een nieuwe groep gemaakt", + "invited": "{name} heeft {name_added} uitgenodigd", + "joined": "{name} is lid van de groep geworden", + "kicked": "{name} heeft {name_kicked} uit de group verwijderd", + "left": "{name} heeft de groep verlaten", + "title_changed": { + "full": "{name} heeft de groepsnaam gewijzigd naar \"{title}\"", + "compact": "{name} heeft de groepsnaam gewijzigd" + }, + "topic_changed": { + "full": "{name} heeft het groepsonderwerp gewijzigd naar \"{topic}\"", + "compact": "{name} heeft het onderwerp gewijzigd" + }, + "about_changed": { + "full": "{name} heeft de omschrijving van de groep gewijzigd naar \"{about}\"", + "compact": "{name} heeft de omschrijving gewijzigd" + }, + "avatar_changed": "{name} heeft de groepsafbeelding gewijzigd", + "avatar_removed": "{name} heeft de groepsafbeelding verwijderd" + }, + "channels": { + "created": "Kanaal aangemaakt", + "invited": "{name} heeft {name_added} uitgenodigd", + "joined": "{name} is aan het kanaal toegevoegd", + "kicked": "{name} heeft {name_kicked} uit het kanaal verwijderd", + "left": "{name} heeft het kanaal verlaten", + "title_changed": { + "full": "{name} heeft de naam van het kanaal gewijzigd naar \"{title}\"", + "compact": "{name} heeft de naam van het kanaal gewijzigd" + }, + "topic_changed": { + "full": "{name} heeft het onderwerp van het kanaal gewijzigd naar \"{topic}\"", + "compact": "{name} heeft het onderwerp gewijzigd" + }, + "about_changed": { + "full": "{name} heeft de beschrijving van het kanaal gewijzigd naar \"{about}\"", + "compact": "{name} heeft de beschrijving gewijzigd" + }, + "avatar_changed": "{name} heeft de afbeelding bij het kanaal gewijzigd", + "avatar_removed": "{name} heeft de afbeelding bij het kanaal verwijderd" + }, + "calls": { + "missed": "Gemiste oproep", + "ended": "Gesprek beeindigd" + } + } + }, + + "errors": { + "unknown": "Onbekende fout. Probeer het nog eens.", + "internal": "Interne server fout. Probeer het later nog eens.", + "phone": { + "empty": "Voer het telefoonnummer in.", + "incorrect": "Ingevoerd telefoonnummer is onjuist. Probeer het nog eens." + }, + "code": { + "empty": "De code is ongeldig. Probeer het nog eens.", + "incorrect": "Ingevoerde code is niet juist. Probeer het nog eens.", + "expired": "De code is verlopen. Start de authenticatie opnieuw." + }, + "groups": { + "already_joined": "Al lid van de groep.", + "unable_to_join": "Niet in staat lid te worden van de groep." + } + }, + + "months": { + "january": { + "compact": "jan", + "full":"januari" + }, + "february": { + "compact": "feb", + "full":"februari" + }, + "march": { + "compact": "mrt", + "full":"maart" + }, + "april": { + "compact": "apr", + "full":"april" + }, + "may": { + "compact": "mei", + "full":"mei" + }, + "june": { + "compact": "jun", + "full":"juni" + }, + "july": { + "compact": "jul", + "full":"juli" + }, + "august": { + "compact": "aug", + "full":"augustus" + }, + "september": { + "compact": "sep", + "full":"september" + }, + "october": { + "compact": "okt", + "full":"oktober" + }, + "november": { + "compact": "nov", + "full":"november" + }, + "december": { + "compact": "dec", + "full":"december" + } + } +} \ No newline at end of file diff --git a/actor-sdk/sdk-core/runtime/.DS_Store b/actor-sdk/sdk-core/runtime/.DS_Store new file mode 100644 index 0000000000..1592f30fcf Binary files /dev/null and b/actor-sdk/sdk-core/runtime/.DS_Store differ diff --git a/actor-sdk/sdk-core/runtime/runtime-android/build.gradle b/actor-sdk/sdk-core/runtime/runtime-android/build.gradle index ef3cd88fdd..81abc2815e 100644 --- a/actor-sdk/sdk-core/runtime/runtime-android/build.gradle +++ b/actor-sdk/sdk-core/runtime/runtime-android/build.gradle @@ -4,7 +4,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:2.1.3' + classpath 'com.android.tools.build:gradle:2.2.3' classpath 'me.tatarka:gradle-retrolambda:3.2.5' } } diff --git a/actor-sdk/sdk-core/runtime/runtime-android/src/main/java/im/actor/runtime/android/AndroidContext.java b/actor-sdk/sdk-core/runtime/runtime-android/src/main/java/im/actor/runtime/android/AndroidContext.java index 1d36a3ce94..a50297a5d5 100644 --- a/actor-sdk/sdk-core/runtime/runtime-android/src/main/java/im/actor/runtime/android/AndroidContext.java +++ b/actor-sdk/sdk-core/runtime/runtime-android/src/main/java/im/actor/runtime/android/AndroidContext.java @@ -1,10 +1,12 @@ package im.actor.runtime.android; import android.content.Context; +import android.os.Handler; public final class AndroidContext { private static Context context; + private static volatile Handler applicationHandler; public static Context getContext() { return context; @@ -14,6 +16,13 @@ public static void setContext(Context context) { AndroidContext.context = context; } + public static Handler applicationHandler(){ + if(applicationHandler == null) + applicationHandler = new Handler(getContext().getMainLooper()); + + return applicationHandler; + } + private AndroidContext() { } } diff --git a/actor-sdk/sdk-core/runtime/runtime-js/.DS_Store b/actor-sdk/sdk-core/runtime/runtime-js/.DS_Store new file mode 100644 index 0000000000..feaacec666 Binary files /dev/null and b/actor-sdk/sdk-core/runtime/runtime-js/.DS_Store differ diff --git a/actor-sdk/sdk-core/runtime/runtime-js/src/.DS_Store b/actor-sdk/sdk-core/runtime/runtime-js/src/.DS_Store new file mode 100644 index 0000000000..7b0d36729e Binary files /dev/null and b/actor-sdk/sdk-core/runtime/runtime-js/src/.DS_Store differ diff --git a/actor-sdk/sdk-core/runtime/runtime-js/src/main/.DS_Store b/actor-sdk/sdk-core/runtime/runtime-js/src/main/.DS_Store new file mode 100644 index 0000000000..87d6e12704 Binary files /dev/null and b/actor-sdk/sdk-core/runtime/runtime-js/src/main/.DS_Store differ diff --git a/actor-sdk/sdk-core/runtime/runtime-js/src/main/java/.DS_Store b/actor-sdk/sdk-core/runtime/runtime-js/src/main/java/.DS_Store new file mode 100644 index 0000000000..2b615a767f Binary files /dev/null and b/actor-sdk/sdk-core/runtime/runtime-js/src/main/java/.DS_Store differ diff --git a/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/com/google/j2objc/annotations/RetainedLocalRef.java b/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/com/google/j2objc/annotations/RetainedLocalRef.java index 8d7e5d8e20..ad93b89415 100644 --- a/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/com/google/j2objc/annotations/RetainedLocalRef.java +++ b/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/com/google/j2objc/annotations/RetainedLocalRef.java @@ -17,8 +17,8 @@ import java.lang.annotation.Retention; import java.lang.annotation.Target; -import static java.lang.annotation.ElementType.*; -import static java.lang.annotation.RetentionPolicy.*; +import static java.lang.annotation.ElementType.LOCAL_VARIABLE; +import static java.lang.annotation.RetentionPolicy.SOURCE; /** * Annotation that indicates a local variable should be retained outside of any diff --git a/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/com/google/j2objc/annotations/Weak.java b/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/com/google/j2objc/annotations/Weak.java index 1924d74db8..930be66883 100644 --- a/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/com/google/j2objc/annotations/Weak.java +++ b/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/com/google/j2objc/annotations/Weak.java @@ -19,8 +19,10 @@ import java.lang.annotation.Retention; import java.lang.annotation.Target; -import static java.lang.annotation.ElementType.*; -import static java.lang.annotation.RetentionPolicy.*; +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.LOCAL_VARIABLE; +import static java.lang.annotation.ElementType.PARAMETER; +import static java.lang.annotation.RetentionPolicy.CLASS; /** * Annotation that indicates a variable has a weak relationship to its owner. diff --git a/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/org/jetbrains/annotations/NotNull.java b/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/org/jetbrains/annotations/NotNull.java index aa7c78b3d2..e5091fb6a6 100644 --- a/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/org/jetbrains/annotations/NotNull.java +++ b/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/org/jetbrains/annotations/NotNull.java @@ -16,7 +16,18 @@ package org.jetbrains.annotations; -import java.lang.annotation.*; + +import java.lang.annotation.Documented; +import java.lang.annotation.Retention; +import java.lang.annotation.Target; +import java.lang.annotation.Target; +import java.lang.annotation.RetentionPolicy; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.PARAMETER; +import static java.lang.annotation.ElementType.LOCAL_VARIABLE; + + /** * An element annotated with NotNull claims null value is forbidden @@ -28,7 +39,7 @@ */ @Documented @Retention(RetentionPolicy.CLASS) -@Target({ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.LOCAL_VARIABLE}) +@Target({METHOD, FIELD, PARAMETER, LOCAL_VARIABLE}) public @interface NotNull { String value() default ""; } diff --git a/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/org/jetbrains/annotations/Nullable.java b/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/org/jetbrains/annotations/Nullable.java index 1618621ad3..f7f8367e4a 100644 --- a/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/org/jetbrains/annotations/Nullable.java +++ b/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/org/jetbrains/annotations/Nullable.java @@ -16,7 +16,14 @@ package org.jetbrains.annotations; -import java.lang.annotation.*; +import java.lang.annotation.Documented; +import java.lang.annotation.Retention; +import java.lang.annotation.Target; +import java.lang.annotation.RetentionPolicy; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.PARAMETER; +import static java.lang.annotation.ElementType.LOCAL_VARIABLE; /** * An element annotated with Nullable claims null value is perfectly valid @@ -27,7 +34,7 @@ */ @Documented @Retention(RetentionPolicy.CLASS) -@Target({ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.LOCAL_VARIABLE}) +@Target({METHOD, FIELD, PARAMETER, LOCAL_VARIABLE}) public @interface Nullable { String value() default ""; } diff --git a/actor-server/.DS_Store b/actor-server/.DS_Store new file mode 100644 index 0000000000..8b7cf707ea Binary files /dev/null and b/actor-server/.DS_Store differ diff --git a/actor-server/actor-activation/src/main/scala/im/actor/server/activation/fake/FakeSmsProvider.scala b/actor-server/actor-activation/src/main/scala/im/actor/server/activation/fake/FakeSmsProvider.scala new file mode 100644 index 0000000000..7d072f522c --- /dev/null +++ b/actor-server/actor-activation/src/main/scala/im/actor/server/activation/fake/FakeSmsProvider.scala @@ -0,0 +1,43 @@ +package im.actor.server.activation.fake + +import akka.actor.ActorSystem +import akka.event.Logging +import akka.http.scaladsl.util.FastFuture +import cats.data.Xor +import im.actor.server.activation.common._ +import im.actor.server.db.DbExtension +import im.actor.server.persist.auth.GateAuthCodeRepo +import spray.client.pipelining._ +import spray.http.HttpMethods.{ GET, POST } +import spray.http._ +import spray.httpx.PlayJsonSupport +import spray.httpx.marshalling._ +import spray.httpx.unmarshalling._ + +import scala.concurrent.Future +import scala.reflect.ClassTag + +import scala.concurrent.ExecutionContext.Implicits.global + +private[activation] final class FakeSmsProvider(implicit system: ActorSystem) + extends ActivationProvider + with PlayJsonSupport { + + private val log = Logging(system, getClass) + + override def send(txHash: String, code: Code): Future[CodeFailure Xor Unit] = { + Future { + Xor.right(None) + } + } + + override def validate(txHash: String, code: String): Future[ValidationResponse] = { + + Future { + Validated + } + } + + override def cleanup(txHash: String): Future[Unit] = Future {} + +} \ No newline at end of file diff --git a/actor-server/actor-bots-shared/src/main/scala/im/actor/bots/BotMessages.scala b/actor-server/actor-bots-shared/src/main/scala/im/actor/bots/BotMessages.scala index 294e3a7d95..8698f47854 100644 --- a/actor-server/actor-bots-shared/src/main/scala/im/actor/bots/BotMessages.scala +++ b/actor-server/actor-bots-shared/src/main/scala/im/actor/bots/BotMessages.scala @@ -374,6 +374,21 @@ object BotMessages { @beanGetter userId: Int ) extends ResponseBody + @key("BotToken") + final case class BotToken( + @beanGetter token: String + ) extends ResponseBody + + @key("GetBotToken") + final case class GetBotToken( + @beanGetter botUserId: Int + ) extends RequestBody { + override type Response = BotToken + override val service = Services.Bots + + override def readResponse(obj: Js.Obj) = readJs[Response](obj) + } + @key("RegisterHook") final case class RegisterHook(@beanGetter name: String) extends RequestBody { override type Response = Container[String] diff --git a/actor-server/actor-bots/src/main/scala/im/actor/server/bot/BotExtension.scala b/actor-server/actor-bots/src/main/scala/im/actor/server/bot/BotExtension.scala index 30ba47218e..eaa4e9b3db 100644 --- a/actor-server/actor-bots/src/main/scala/im/actor/server/bot/BotExtension.scala +++ b/actor-server/actor-bots/src/main/scala/im/actor/server/bot/BotExtension.scala @@ -23,8 +23,10 @@ import shardakka.keyvalue.SimpleKeyValue import shardakka.{ Codec, IntCodec, ShardakkaExtension } import slick.dbio.DBIO -import scala.concurrent.Future +import scala.concurrent.{ Await, Future } import scala.concurrent.forkjoin.ThreadLocalRandom +import scala.util.{ Failure, Success, Try } +import scala.concurrent.duration._ object BotExtension extends ExtensionId[BotExtension] with ExtensionIdProvider { private[bot] val tokensKV = "BotsTokens" @@ -145,6 +147,20 @@ private[bot] final class BotExtension(_system: ActorSystem) extends Extension { */ def findToken(userId: UserId, name: String): Future[Option[String]] = hooksKV(userId).get(name) + /** + * Gets boot token by id + * + * @param userId + * @return bot token + */ + def findBotToken(userId: UserId): Future[String] = { + + for { + keys ← tokensKV.getKeys() + keysTokens = keys.map(k ⇒ (Await.result(tokensKV.get(k), Duration.Inf).get, k)).toMap + } yield (keysTokens.get(userId).getOrElse("")) + } + /** * Finds bot webhook * diff --git a/actor-server/actor-bots/src/main/scala/im/actor/server/bot/services/BotsBotService.scala b/actor-server/actor-bots/src/main/scala/im/actor/server/bot/services/BotsBotService.scala index 98825e1ba9..56ab56ce25 100644 --- a/actor-server/actor-bots/src/main/scala/im/actor/server/bot/services/BotsBotService.scala +++ b/actor-server/actor-bots/src/main/scala/im/actor/server/bot/services/BotsBotService.scala @@ -24,7 +24,20 @@ private[bot] final class BotsBotService(system: ActorSystem) extends BotServiceB } ) + private def getToken(botUserId: BotUserId) = RequestHandler[GetBotToken, GetBotToken#Response]( + (botUserId: BotUserId, botAuthId: BotAuthId, botAuthSid: BotAuthSid) ⇒ + ifIsAdmin(botUserId) { + (for { + token ← botExt.findBotToken(botUserId) + } yield Right(BotToken(token))) recover { + case _ ⇒ + Left(BotError(400, "ERROR_GET_TOKEN", Js.Obj(), None)) + } + } + ) + override def handlers: PartialFunction[RequestBody, WeakRequestHandler] = { case CreateBot(nickname, name) ⇒ createBot(nickname, name).toWeak + case GetBotToken(botUserId) ⇒ getToken(botUserId).toWeak } } diff --git a/actor-server/actor-cli/src/main/scala/im/actor/server/cli/ActorCli.scala b/actor-server/actor-cli/src/main/scala/im/actor/server/cli/ActorCli.scala index 65b99fabb9..018e27133d 100644 --- a/actor-server/actor-cli/src/main/scala/im/actor/server/cli/ActorCli.scala +++ b/actor-server/actor-cli/src/main/scala/im/actor/server/cli/ActorCli.scala @@ -1,5 +1,6 @@ package im.actor.server.cli +import java.lang.Throwable import java.net.InetAddress import akka.actor.{ ActorPath, ActorSystem } @@ -17,6 +18,7 @@ import scala.reflect.ClassTag private case class Config( command: String = "help", createBot: CreateBot = CreateBot(), + getBotToken: GetBotToken = GetBotToken(), updateIsAdmin: UpdateIsAdmin = UpdateIsAdmin(), httpToken: HttpToken = HttpToken(), key: Key = Key(), @@ -37,8 +39,16 @@ private[cli] case class CreateBot( override type Response = CreateBotResponse } +private[cli] case class GetBotToken( + botUserId: Int = 0 +) extends Request { + override type Response = BotToken +} + private[cli] case class CreateBotResponse(token: String) +private[cli] case class BotToken(token: String) + private[cli] case class UpdateIsAdmin( userId: Int = 0, isAdmin: Boolean = false @@ -61,6 +71,7 @@ private case class HttpTokenCreateResponse(token: String) private object Commands { val Help = "help" val CreateBot = "create-bot" + val GetBotToken = "get-bot-token" val AdminGrant = "admin-grant" val AdminRevoke = "admin-revoke" val MigrateUserSequence = "migrate-user-sequence" @@ -89,6 +100,18 @@ object ActorCli extends App { c.copy(createBot = c.createBot.copy(isAdmin = true)) } ) + + cmd(Commands.GetBotToken) action { (_, c) ⇒ + c.copy(command = Commands.GetBotToken) + } children ( + opt[String]("host") abbr "h" optional () action { (x, c) ⇒ + c.copy(host = Some(x)) + }, + opt[Int]("botUserId") abbr "u" required () action { (x, c) ⇒ + c.copy(getBotToken = c.getBotToken.copy(botUserId = x)) + } + ) + cmd(Commands.AdminGrant) action { (_, c) ⇒ c.copy(command = Commands.AdminGrant) } children ( @@ -155,6 +178,8 @@ object ActorCli extends App { cmd(FastFuture.successful(parser.showUsage)) case Commands.CreateBot ⇒ cmd(handlers.createBot(config.createBot)) + case Commands.GetBotToken ⇒ + cmd(handlers.getBotToken(config.getBotToken)) case Commands.AdminGrant | Commands.AdminRevoke ⇒ cmd(handlers.updateIsAdmin(config.updateIsAdmin)) case Commands.MigrateUserSequence ⇒ @@ -167,9 +192,13 @@ object ActorCli extends App { } } - def cmd(f: Future[Unit], timeout: Duration = 10.seconds): Unit = { + def cmd(f: Future[Unit], timeout: Duration = 60.seconds): Unit = { try { Await.result(f, timeout) + } catch { + case e: Exception ⇒ { + e.printStackTrace() + } } finally { handlers.shutdown() } @@ -197,7 +226,7 @@ final class CliHandlers(host: Option[String]) extends BotHandlers with UsersHand protected implicit lazy val ec: ExecutionContext = system.dispatcher - protected implicit val timeout: Timeout = Timeout(10.seconds) + protected implicit val timeout: Timeout = Timeout(60.seconds) def shutdown(): Unit = { system.terminate() diff --git a/actor-server/actor-cli/src/main/scala/im/actor/server/cli/BotHandlers.scala b/actor-server/actor-cli/src/main/scala/im/actor/server/cli/BotHandlers.scala index 2038c984b4..975628cc87 100644 --- a/actor-server/actor-cli/src/main/scala/im/actor/server/cli/BotHandlers.scala +++ b/actor-server/actor-cli/src/main/scala/im/actor/server/cli/BotHandlers.scala @@ -9,4 +9,9 @@ private[cli] trait BotHandlers { for (resp ← request(BotService, rq)) yield println(s"Bot user created, token: ${resp.token}") } + + def getBotToken(rq: GetBotToken): Future[Unit] = { + for (resp ← request(BotService, rq)) + yield println(s"Bot token: ${resp.token}") + } } diff --git a/actor-server/actor-core/src/main/actor-api/actor.json b/actor-server/actor-core/src/main/actor-api/actor.json index 544ad17482..5cb24ac55d 100644 --- a/actor-server/actor-core/src/main/actor-api/actor.json +++ b/actor-server/actor-core/src/main/actor-api/actor.json @@ -77,10 +77,9 @@ "name": "PASSWORD", "id": 2 } - ] - } - }, - { + ] + } + }, { "type": "enum", "content": { "name": "EmailActivationType", @@ -97,20521 +96,3862 @@ "name": "PASSWORD", "id": 3 } - ] - } - }, - { - "type": "rpc", + ] + } + },{"type":"rpc","content":{ +"name":"StartPhoneAuth", +"header":191, +"response":{"type":"anonymous","header":193, "doc":[ +"Phone Activation response",{"type":"reference","argument":"transactionHash","category":"danger","description":" Hash of transaction"},{"type":"reference","argument":"isRegistered","category":"full","description":" Is User registered"}] ,"attributes":[{"type":"string","id":1,"name":"transactionHash"} +,{"type":"bool","id":2,"name":"isRegistered"} +,{"type":{"type":"opt","childType":{"type":"enum","childType":"PhoneActivationType"}},"id":3,"name":"activationType"} +]}, +"doc":[ +"Start Phone Activation",{"type":"reference","argument":"phoneNumber","category":"full","description":"Phone number"},{"type":"reference","argument":"appId","category":"hidden","description":"Appication Id"},{"type":"reference","argument":"apiKey","category":"hidden","description":"Application API key"},{"type":"reference","argument":"deviceHash","category":"full","description":"Hash of device unique id and app bundle id. Used for autologout users when app is reinstalled"},{"type":"reference","argument":"deviceTitle","category":"full","description":"Device Title"},{"type":"reference","argument":"timeZone","category":"full","description":"TimeZone of device"},{"type":"reference","argument":"preferredLanguages","category":"full","description":"Preferred languages of device"}],"attributes":[ +{"type":"int64","id":1,"name":"phoneNumber"} +,{"type":"int32","id":2,"name":"appId"} +,{"type":"string","id":3,"name":"apiKey"} +,{"type":"bytes","id":4,"name":"deviceHash"} +,{"type":"string","id":5,"name":"deviceTitle"} +,{"type":{"type":"opt","childType":"string"},"id":6,"name":"timeZone"} +,{"type":{"type":"list","childType":"string"},"id":7,"name":"preferredLanguages"} +]}},{"type":"rpc","content":{ +"name":"SendCodeByPhoneCall", +"header":197, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Dial phone and dictate auth code",{"type":"reference","argument":"transactionHash","category":"danger","description":"Transaction hash"}],"attributes":[ +{"type":"string","id":1,"name":"transactionHash"} +]}},{"type":"rpc","content":{ +"name":"StartEmailAuth", +"header":185, +"response":{"type":"anonymous","header":186, "doc":[ +"Email Activation response",{"type":"reference","argument":"transactionHash","category":"danger","description":" Hash of activation transaction"},{"type":"reference","argument":"isRegistered","category":"full","description":" true if user is registered"},{"type":"reference","argument":"activationType","category":"full","description":" Email Activation type"}] ,"attributes":[{"type":"string","id":1,"name":"transactionHash"} +,{"type":"bool","id":2,"name":"isRegistered"} +,{"type":{"type":"enum","childType":"EmailActivationType"},"id":3,"name":"activationType"} +]}, +"doc":[ +"Start EMail Activation",{"type":"reference","argument":"email","category":"full","description":"Email"},{"type":"reference","argument":"appId","category":"hidden","description":"Application Id"},{"type":"reference","argument":"apiKey","category":"hidden","description":"Application API key"},{"type":"reference","argument":"deviceHash","category":"full","description":"Hash of device unique id and app bundle id. Used for autologout users when app is reinstalled"},{"type":"reference","argument":"deviceTitle","category":"full","description":"Device Title"},{"type":"reference","argument":"timeZone","category":"full","description":"TimeZone of device"},{"type":"reference","argument":"preferredLanguages","category":"full","description":"Preferred languages"}],"attributes":[ +{"type":"string","id":1,"name":"email"} +,{"type":"int32","id":2,"name":"appId"} +,{"type":"string","id":3,"name":"apiKey"} +,{"type":"bytes","id":4,"name":"deviceHash"} +,{"type":"string","id":5,"name":"deviceTitle"} +,{"type":{"type":"opt","childType":"string"},"id":6,"name":"timeZone"} +,{"type":{"type":"list","childType":"string"},"id":7,"name":"preferredLanguages"} +]}},{"type":"rpc","content":{ +"name":"StartAnonymousAuth", +"header":198, +"response":{"type":"reference","name":"Auth"}, +"doc":[ +"Starting Anonymous login",{"type":"reference","argument":"name","category":"full","description":"Name of new user"},{"type":"reference","argument":"appId","category":"hidden","description":"Application Id"},{"type":"reference","argument":"apiKey","category":"hidden","description":"Application API key"},{"type":"reference","argument":"deviceHash","category":"full","description":"Hash of device unique id and app bundle id. Used for autologout users when app is reinstalled"},{"type":"reference","argument":"deviceTitle","category":"full","description":"Device Title"},{"type":"reference","argument":"timeZone","category":"full","description":"TimeZone of device"},{"type":"reference","argument":"preferredLanguages","category":"full","description":"Preferred languages"}],"attributes":[ +{"type":"string","id":1,"name":"name"} +,{"type":"int32","id":2,"name":"appId"} +,{"type":"string","id":3,"name":"apiKey"} +,{"type":"bytes","id":4,"name":"deviceHash"} +,{"type":"string","id":5,"name":"deviceTitle"} +,{"type":{"type":"opt","childType":"string"},"id":6,"name":"timeZone"} +,{"type":{"type":"list","childType":"string"},"id":7,"name":"preferredLanguages"} +]}},{"type":"rpc","content":{ +"name":"StartTokenAuth", +"header":203, +"response":{"type":"reference","name":"Auth"}, +"doc":[ +"Starting token-based login",{"type":"reference","argument":"token","category":"full","description":"Token for authentication"},{"type":"reference","argument":"appId","category":"hidden","description":"Application Id"},{"type":"reference","argument":"apiKey","category":"hidden","description":"Application API key"},{"type":"reference","argument":"deviceHash","category":"full","description":"Hash of device unique id and app bundle id. Used for autologout users when app is reinstalled"},{"type":"reference","argument":"deviceTitle","category":"full","description":"Device Title"},{"type":"reference","argument":"timeZone","category":"full","description":"TimeZone of device"},{"type":"reference","argument":"preferredLanguages","category":"full","description":"Preferred languages"}],"attributes":[ +{"type":"string","id":1,"name":"token"} +,{"type":"int32","id":2,"name":"appId"} +,{"type":"string","id":3,"name":"apiKey"} +,{"type":"bytes","id":4,"name":"deviceHash"} +,{"type":"string","id":5,"name":"deviceTitle"} +,{"type":{"type":"opt","childType":"string"},"id":6,"name":"timeZone"} +,{"type":{"type":"list","childType":"string"},"id":7,"name":"preferredLanguages"} +]}},{"type":"rpc","content":{ +"name":"StartUsernameAuth", +"header":2571, +"response":{"type":"anonymous","header":2572, "doc":[ +"Result of login auth start. If is not registered move to signup.",{"type":"reference","argument":"transactionHash","category":"danger","description":" Authentication transaction hash"},{"type":"reference","argument":"isRegistered","category":"full","description":" If user is registered with this username"}] ,"attributes":[{"type":"string","id":1,"name":"transactionHash"} +,{"type":"bool","id":2,"name":"isRegistered"} +]}, +"doc":[ +"Starting Login Authentication",{"type":"reference","argument":"username","category":"full","description":"Username for signing in"},{"type":"reference","argument":"appId","category":"hidden","description":"Application id"},{"type":"reference","argument":"apiKey","category":"hidden","description":"Application API key"},{"type":"reference","argument":"deviceHash","category":"full","description":"Hash of device unique id and app bundle id. Used for autologout users when app is reinstalled"},{"type":"reference","argument":"deviceTitle","category":"full","description":"Device Title"},{"type":"reference","argument":"timeZone","category":"full","description":"Time Zone of device"},{"type":"reference","argument":"preferredLanguages","category":"full","description":"Preferred languages of device"}],"attributes":[ +{"type":"string","id":1,"name":"username"} +,{"type":"int32","id":2,"name":"appId"} +,{"type":"string","id":3,"name":"apiKey"} +,{"type":"bytes","id":4,"name":"deviceHash"} +,{"type":"string","id":5,"name":"deviceTitle"} +,{"type":{"type":"opt","childType":"string"},"id":6,"name":"timeZone"} +,{"type":{"type":"list","childType":"string"},"id":7,"name":"preferredLanguages"} +]}},{"type":"rpc","content":{ +"name":"ValidateCode", +"header":189, +"response":{"type":"reference","name":"Auth"}, +"doc":[ +"Performing user sign in.",{"type":"reference","argument":"transactionHash","category":"danger","description":"Hash of transaction"},{"type":"reference","argument":"code","category":"hidden","description":"Activation code"}],"attributes":[ +{"type":"string","id":1,"name":"transactionHash"} +,{"type":"string","id":2,"name":"code"} +]}},{"type":"rpc","content":{ +"name":"ValidatePassword", +"header":207, +"response":{"type":"reference","name":"Auth"}, +"doc":[ +"Validation of account password",{"type":"reference","argument":"transactionHash","category":"full","description":"Hash of transaction"},{"type":"reference","argument":"password","category":"full","description":"Password for account"}],"attributes":[ +{"type":"string","id":1,"name":"transactionHash"} +,{"type":"string","id":2,"name":"password"} +]}},{"type":"rpc","content":{ +"name":"GetOAuth2Params", +"header":194, +"response":{"type":"anonymous","header":195, "doc":[ +{"type":"reference","argument":"authUrl","category":"hidden","description":" Authentication url"}] ,"attributes":[{"type":"string","id":1,"name":"authUrl"} +]}, +"doc":[ +"Loading OAuth2 Parameters",{"type":"reference","argument":"transactionHash","category":"danger","description":"Hash of transaction"},{"type":"reference","argument":"redirectUrl","category":"full","description":"Redirect URL for Application"}],"attributes":[ +{"type":"string","id":1,"name":"transactionHash"} +,{"type":"string","id":2,"name":"redirectUrl"} +]}},{"type":"rpc","content":{ +"name":"CompleteOAuth2", +"header":196, +"response":{"type":"reference","name":"Auth"}, +"doc":[ +"Complete OAuth2 Authentication",{"type":"reference","argument":"transactionHash","category":"danger","description":"Hash of transaction"},{"type":"reference","argument":"code","category":"danger","description":"Authentication Code"}],"attributes":[ +{"type":"string","id":1,"name":"transactionHash"} +,{"type":"string","id":2,"name":"code"} +]}},{"type":"rpc","content":{ +"name":"SignUp", +"header":190, +"response":{"type":"reference","name":"Auth"}, +"doc":[ +"Perform user SignUp",{"type":"reference","argument":"transactionHash","category":"danger","description":"Hash of transaction"},{"type":"reference","argument":"name","category":"full","description":"User name"},{"type":"reference","argument":"sex","category":"full","description":"Optional user sex"},{"type":"reference","argument":"password","category":"full","description":"Password for password-based accounts"}],"attributes":[ +{"type":"string","id":1,"name":"transactionHash"} +,{"type":"string","id":2,"name":"name"} +,{"type":{"type":"opt","childType":{"type":"enum","childType":"Sex"}},"id":3,"name":"sex"} +,{"type":{"type":"opt","childType":"string"},"id":4,"name":"password"} +]}},{"type":"response","content":{ +"name":"Auth", +"header":5, +"doc":[ +"Authentication result",{"type":"reference","argument":"user","category":"compact","description":" The authenticated User"},{"type":"reference","argument":"config","category":"full","description":" Current config of server"}],"attributes":[ +{"type":{"type":"struct","childType":"User"},"id":2,"name":"user"} +,{"type":{"type":"struct","childType":"Config"},"id":3,"name":"config"} +]}}, { + "type":"struct", + "content": { + "name":"AuthSession", +"doc":[ +"Authentication session",{"type":"reference","argument":"id","category":"full","description":" Unuque ID of session"},{"type":"reference","argument":"authHolder","category":"full","description":" holder of session. 0 - this device, 1 - other."},{"type":"reference","argument":"appId","category":"full","description":" Application Id (user in SignIn/SignUp)"},{"type":"reference","argument":"appTitle","category":"full","description":" Title of application"},{"type":"reference","argument":"deviceTitle","category":"full","description":" Title of device"},{"type":"reference","argument":"authTime","category":"full","description":" Time of session creating"},{"type":"reference","argument":"authLocation","category":"hidden","description":" two-letter country code of session create"},{"type":"reference","argument":"latitude","category":"hidden","description":" optional latitude of auth if available"},{"type":"reference","argument":"longitude","category":"hidden","description":" optional longitude of auth if available"}],"attributes":[ +{"type":"int32","id":1,"name":"id"} +,{"type":{"type":"enum","childType":"AuthHolder"},"id":2,"name":"authHolder"} +,{"type":"int32","id":3,"name":"appId"} +,{"type":"string","id":4,"name":"appTitle"} +,{"type":"string","id":5,"name":"deviceTitle"} +,{"type":"int32","id":6,"name":"authTime"} +,{"type":"string","id":7,"name":"authLocation"} +,{"type":{"type":"opt","childType":"double"},"id":8,"name":"latitude"} +,{"type":{"type":"opt","childType":"double"},"id":9,"name":"longitude"} +]}}, { + "type": "enum", "content": { - "name": "StartPhoneAuth", - "header": 191, - "response": { - "type": "anonymous", - "header": 193, - "doc": [ - "Phone Activation response", - { - "type": "reference", - "argument": "transactionHash", - "category": "danger", - "description": " Hash of transaction" - }, - { - "type": "reference", - "argument": "isRegistered", - "category": "full", - "description": " Is User registered" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "transactionHash" - }, - { - "type": "bool", - "id": 2, - "name": "isRegistered" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "enum", - "childType": "PhoneActivationType" - } - }, - "id": 3, - "name": "activationType" - } - ] - }, - "doc": [ - "Start Phone Activation", - { - "type": "reference", - "argument": "phoneNumber", - "category": "full", - "description": "Phone number" - }, - { - "type": "reference", - "argument": "appId", - "category": "hidden", - "description": "Appication Id" - }, + "name": "AuthHolder", + "values": [ { - "type": "reference", - "argument": "apiKey", - "category": "hidden", - "description": "Application API key" + "name": "ThisDevice", + "id": 1 }, { - "type": "reference", - "argument": "deviceHash", - "category": "full", - "description": "Hash of device unique id and app bundle id. Used for autologout users when app is reinstalled" - }, + "name": "OtherDevice", + "id": 2 + } + ] + } + },{"type":"rpc","content":{ +"name":"GetAuthSessions", +"header":80, +"response":{"type":"anonymous","header":81, "doc":[ +"Current Auth sessions",{"type":"reference","argument":"userAuths","category":"compact","description":" User authentications"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"AuthSession"}},"id":1,"name":"userAuths"} +]}, +"doc":[ +"Getting of all active user's authentication sessions"],"attributes":[ +]}},{"type":"rpc","content":{ +"name":"TerminateSession", +"header":82, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"SignOut on specified user's session",{"type":"reference","argument":"id","category":"full","description":"id from AuthItem"}],"attributes":[ +{"type":"int32","id":1,"name":"id"} +]}},{"type":"rpc","content":{ +"name":"TerminateAllSessions", +"header":83, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"SignOut on all exept current sessions"],"attributes":[ +]}},{"type":"rpc","content":{ +"name":"SignOut", +"header":84, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"SignOut current session"],"attributes":[ +]}},{"type":"comment","content":"OBSOLETE METHODS"},{"type":"rpc","content":{ +"name":"SignInObsolete", +"header":3, +"response":{"type":"reference","name":"Auth"}, +"doc":[ +"Performing user signin",{"type":"reference","argument":"phoneNumber","category":"danger","description":"Phone number in international format"},{"type":"reference","argument":"smsHash","category":"danger","description":"Code request hash from RequestAuthCode"},{"type":"reference","argument":"smsCode","category":"danger","description":"Confirmation code from SMS"},{"type":"reference","argument":"deviceHash","category":"full","description":"Hash of device unique id and app bundle id. Used for autologout users when app is reinstalled"},{"type":"reference","argument":"deviceTitle","category":"full","description":"Device title like 'Steven's iPhone'"},{"type":"reference","argument":"appId","category":"hidden","description":"Application ID"},{"type":"reference","argument":"appKey","category":"hidden","description":"Application API key"}],"attributes":[ +{"type":"int64","id":1,"name":"phoneNumber"} +,{"type":"string","id":2,"name":"smsHash"} +,{"type":"string","id":3,"name":"smsCode"} +,{"type":"bytes","id":5,"name":"deviceHash"} +,{"type":"string","id":6,"name":"deviceTitle"} +,{"type":"int32","id":7,"name":"appId"} +,{"type":"string","id":8,"name":"appKey"} +]}},{"type":"rpc","content":{ +"name":"SignUpObsolete", +"header":4, +"response":{"type":"reference","name":"Auth"}, +"doc":[ +"Performing user signup. If user perform signup on already registered user it just override previous","profile information",{"type":"reference","argument":"phoneNumber","category":"danger","description":"Phone number in international format"},{"type":"reference","argument":"smsHash","category":"danger","description":"Code request hash from RequestAuthCode"},{"type":"reference","argument":"smsCode","category":"danger","description":"Confirmation code from SMS"},{"type":"reference","argument":"name","category":"full","description":"User name"},{"type":"reference","argument":"deviceHash","category":"full","description":"Hash of device unique id and app bundle id. Used for autologout users when app is reinstalled"},{"type":"reference","argument":"deviceTitle","category":"full","description":"Device title like 'Steven's iPhone'"},{"type":"reference","argument":"appId","category":"hidden","description":"Application ID"},{"type":"reference","argument":"appKey","category":"hidden","description":"pplication API key"}],"attributes":[ +{"type":"int64","id":1,"name":"phoneNumber"} +,{"type":"string","id":2,"name":"smsHash"} +,{"type":"string","id":3,"name":"smsCode"} +,{"type":"string","id":4,"name":"name"} +,{"type":"bytes","id":7,"name":"deviceHash"} +,{"type":"string","id":8,"name":"deviceTitle"} +,{"type":"int32","id":9,"name":"appId"} +,{"type":"string","id":10,"name":"appKey"} +,{"type":"bool","id":11,"name":"isSilent"} +]}},{"type":"rpc","content":{ +"name":"SendAuthCodeObsolete", +"header":1, +"response":{"type":"anonymous","header":2, "doc":[ +"Sms Request response",{"type":"reference","argument":"smsHash","category":"danger","description":" Hash of SMS request"},{"type":"reference","argument":"isRegistered","category":"full","description":" true if user is registered"}] ,"attributes":[{"type":"string","id":1,"name":"smsHash"} +,{"type":"bool","id":2,"name":"isRegistered"} +]}, +"doc":[ +"Sending SMS with activation code",{"type":"reference","argument":"phoneNumber","category":"full","description":"Phone number in international format"},{"type":"reference","argument":"appId","category":"hidden","description":"Application ID"},{"type":"reference","argument":"apiKey","category":"hidden","description":"Application API key"}],"attributes":[ +{"type":"int64","id":1,"name":"phoneNumber"} +,{"type":"int32","id":2,"name":"appId"} +,{"type":"string","id":3,"name":"apiKey"} +]}},{"type":"rpc","content":{ +"name":"SendAuthCallObsolete", +"header":90, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Requesting Phone activation",{"type":"reference","argument":"phoneNumber","category":"full","description":"Phone number in international format"},{"type":"reference","argument":"smsHash","category":"danger","description":"Code request hash from RequestAuthCode"},{"type":"reference","argument":"appId","category":"hidden","description":"Application ID"},{"type":"reference","argument":"apiKey","category":"hidden","description":"Application API key"}],"attributes":[ +{"type":"int64","id":1,"name":"phoneNumber"} +,{"type":"string","id":2,"name":"smsHash"} +,{"type":"int32","id":3,"name":"appId"} +,{"type":"string","id":4,"name":"apiKey"} +]}}]}, { + "title": "Users", + "package": "users", + "doc": [ + "Users are objects that secured by accessHash. You can't load user profile by it's id.", + "You can't send message to user without finding it's object in Updates or by calling", + "method for user search, contacts import or some other methods.", + "", + "Applications need to keep all Users information forever.", + "", + "Each User have optional localName - name of user that was set by current user and can be changed", + "any time by calling EditUserLocalName method." + ], + "items": [ + { + "type": "enum", + "content": { + "name": "Sex", + "values": [ { - "type": "reference", - "argument": "deviceTitle", - "category": "full", - "description": "Device Title" + "name": "Unknown", + "id": 1 }, { - "type": "reference", - "argument": "timeZone", - "category": "full", - "description": "TimeZone of device" + "name": "Male", + "id": 2 }, { - "type": "reference", - "argument": "preferredLanguages", - "category": "full", - "description": "Preferred languages of device" + "name": "Female", + "id": 3 } - ], - "attributes": [ + ] + } + }, { + "type": "enum", + "content": { + "name": "ContactType", + "values": [ { - "type": "int64", - "id": 1, - "name": "phoneNumber" + "name": "Phone", + "id": 1 }, { - "type": "int32", - "id": 2, - "name": "appId" + "name": "Email", + "id": 2 }, { - "type": "string", - "id": 3, - "name": "apiKey" + "name": "Web", + "id": 3 }, { - "type": "bytes", - "id": 4, - "name": "deviceHash" - }, + "name": "Social", + "id": 4 + } + ] + } + }, { + "type":"struct", + "content": { + "name":"ContactRecord", +"doc":[ +"Contact information record",{"type":"reference","argument":"type","category":"full","description":" Record type"},{"type":"reference","argument":"typeSpec","category":"hidden","description":" Value for specification type of contact, for example 'mobile/standalone/office' for phones or 'vk/fb/telegram' for extenrnal networks."},{"type":"reference","argument":"stringValue","category":"full","description":" String value of record"},{"type":"reference","argument":"longValue","category":"full","description":" Long value of record"},{"type":"reference","argument":"title","category":"full","description":" Title of record"},{"type":"reference","argument":"subtitle","category":"hidden","description":" Subtitle of record"}],"expandable":"true","attributes":[ +{"type":{"type":"enum","childType":"ContactType"},"id":1,"name":"type"} +,{"type":{"type":"opt","childType":"string"},"id":6,"name":"typeSpec"} +,{"type":{"type":"opt","childType":"string"},"id":2,"name":"stringValue"} +,{"type":{"type":"opt","childType":"int64"},"id":3,"name":"longValue"} +,{"type":{"type":"opt","childType":"string"},"id":4,"name":"title"} +,{"type":{"type":"opt","childType":"string"},"id":5,"name":"subtitle"} +]}}, { + "type":"struct", + "content": { + "name":"User", +"doc":[ +"Main user object",{"type":"reference","argument":"id","category":"full","description":" uid"},{"type":"reference","argument":"accessHash","category":"danger","description":" user's access hash"},{"type":"reference","argument":"name","category":"full","description":" user's name"},{"type":"reference","argument":"localName","category":"full","description":" user's local name"},{"type":"reference","argument":"nick","category":"full","description":" User's nickname"},{"type":"reference","argument":"sex","category":"full","description":" optional sex of user"},{"type":"reference","argument":"avatar","category":"compact","description":" avatar of user"},{"type":"reference","argument":"isBot","category":"full","description":" Is user actually bot. By default is false."},{"type":"reference","argument":"ext","category":"full","description":" Extension values"},{"type":"reference","argument":"about","category":"full","description":" [DEPRECATED] User's about information"},{"type":"reference","argument":"contactInfo","category":"compact","description":" [DEPRECATED] Contact information of user"},{"type":"reference","argument":"preferredLanguages","category":"full","description":" [DEPRECATED] Preferred user languages"},{"type":"reference","argument":"timeZone","category":"full","description":" [DEPRECATED] Time Zone of user in TZ format"},{"type":"reference","argument":"botCommands","category":"full","description":" [DEPRECATED] Available Bot Commands"}],"expandable":"true","attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"id"} +,{"type":"int64","id":2,"name":"accessHash"} +,{"type":"string","id":3,"name":"name"} +,{"type":{"type":"opt","childType":"string"},"id":4,"name":"localName"} +,{"type":{"type":"opt","childType":"string"},"id":13,"name":"nick"} +,{"type":{"type":"opt","childType":{"type":"enum","childType":"Sex"}},"id":5,"name":"sex"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"Avatar"}},"id":8,"name":"avatar"} +,{"type":{"type":"opt","childType":"bool"},"id":11,"name":"isBot"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"MapValue"}},"id":20,"name":"ext"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"ContactRecord"}},"id":12,"name":"contactInfo", "deprecated":"true"} +,{"type":{"type":"opt","childType":"string"},"id":14,"name":"about", "deprecated":"true"} +,{"type":{"type":"list","childType":"string"},"id":16,"name":"preferredLanguages", "deprecated":"true"} +,{"type":{"type":"opt","childType":"string"},"id":17,"name":"timeZone", "deprecated":"true"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"BotCommand"}},"id":19,"name":"botCommands", "deprecated":"true"} +]}}, { + "type":"struct", + "content": { + "name":"FullUser", +"doc":[ +"Full User representation",{"type":"reference","argument":"id","category":"full","description":" User's Id"},{"type":"reference","argument":"contactInfo","category":"compact","description":" User's contact information"},{"type":"reference","argument":"about","category":"full","description":" User's about information"},{"type":"reference","argument":"preferredLanguages","category":"full","description":" Preferred user languages"},{"type":"reference","argument":"timeZone","category":"full","description":" Time Zone of user in TZ format"},{"type":"reference","argument":"botCommands","category":"full","description":" Available Commands for Bot"},{"type":"reference","argument":"ext","category":"full","description":" Extension values. NOTE: This values are not related to ext field in User object."},{"type":"reference","argument":"isBlocked","category":"full","description":" Is user blocked. Default is false."}],"expandable":"true","attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"id"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"ContactRecord"}},"id":2,"name":"contactInfo"} +,{"type":{"type":"opt","childType":"string"},"id":3,"name":"about"} +,{"type":{"type":"list","childType":"string"},"id":4,"name":"preferredLanguages"} +,{"type":{"type":"opt","childType":"string"},"id":5,"name":"timeZone"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"BotCommand"}},"id":6,"name":"botCommands"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"MapValue"}},"id":7,"name":"ext"} +,{"type":{"type":"opt","childType":"bool"},"id":8,"name":"isBlocked"} +]}}, { + "type":"struct", + "content": { + "name":"BotCommand", +"doc":[ +"Available bot commands",{"type":"reference","argument":"slashCommand","category":"full","description":" Slash command name (wihtout slash)"},{"type":"reference","argument":"description","category":"full","description":" Slash command description"},{"type":"reference","argument":"locKey","category":"full","description":" Optional Localization Key for i18n"}],"attributes":[ +{"type":"string","id":1,"name":"slashCommand"} +,{"type":"string","id":2,"name":"description"} +,{"type":{"type":"opt","childType":"string"},"id":3,"name":"locKey"} +]}},{"type":"rpc","content":{ +"name":"EditUserLocalName", +"header":96, +"response":{"type":"reference","name":"Seq"}, +"doc":[ +"Renaming of user's visible name",{"type":"reference","argument":"uid","category":"full","description":"target User's uid"},{"type":"reference","argument":"accessHash","category":"danger","description":"User's accessHash"},{"type":"reference","argument":"name","category":"full","description":"New user name"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":"int64","id":2,"name":"accessHash"} +,{"type":"string","id":3,"name":"name"} +]}},{"type":"update","content":{ +"name":"UserAvatarChanged", +"header":16, +"doc":[ +"Update about avatar changed",{"type":"reference","argument":"uid","category":"full","description":" user's uid"},{"type":"reference","argument":"avatar","category":"compact","description":" user's new avatar"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"Avatar"}},"id":2,"name":"avatar"} +]}},{"type":"update","content":{ +"name":"UserNameChanged", +"header":32, +"doc":[ +"Update about name changed",{"type":"reference","argument":"uid","category":"full","description":" user's uid"},{"type":"reference","argument":"name","category":"full","description":" user's name"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":"string","id":2,"name":"name"} +]}},{"type":"update","content":{ +"name":"UserLocalNameChanged", +"header":51, +"doc":[ +"Update about local name changed",{"type":"reference","argument":"uid","category":"full","description":" user's uid"},{"type":"reference","argument":"localName","category":"full","description":" new user's local name"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":{"type":"opt","childType":"string"},"id":2,"name":"localName"} +]}},{"type":"update","content":{ +"name":"UserContactsChanged", +"header":134, +"doc":[ +"Update about contact information change",{"type":"reference","argument":"uid","category":"full","description":" user's uid"},{"type":"reference","argument":"contactRecords","category":"compact","description":" new phones list"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"ContactRecord"}},"id":4,"name":"contactRecords"} +]}},{"type":"update","content":{ +"name":"UserNickChanged", +"header":209, +"doc":[ +"Update about nick changed",{"type":"reference","argument":"uid","category":"full","description":" user's uid"},{"type":"reference","argument":"nickname","category":"full","description":" user's new nickname"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":{"type":"opt","childType":"string"},"id":2,"name":"nickname"} +]}},{"type":"update","content":{ +"name":"UserAboutChanged", +"header":210, +"doc":[ +"Update about user's about changed",{"type":"reference","argument":"uid","category":"full","description":" User's uid"},{"type":"reference","argument":"about","category":"full","description":" User's about"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":{"type":"opt","childType":"string"},"id":2,"name":"about"} +]}},{"type":"update","content":{ +"name":"UserPreferredLanguagesChanged", +"header":212, +"doc":[ +"Update about user's preferred languages",{"type":"reference","argument":"uid","category":"full","description":" User's uid"},{"type":"reference","argument":"preferredLanguages","category":"full","description":" User's preferred languages. Can be empty."}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":{"type":"list","childType":"string"},"id":2,"name":"preferredLanguages"} +]}},{"type":"update","content":{ +"name":"UserTimeZoneChanged", +"header":216, +"doc":[ +"User TimeZone changed",{"type":"reference","argument":"uid","category":"full","description":" User's uid"},{"type":"reference","argument":"timeZone","category":"full","description":" User's new time zone in TZ format"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":{"type":"opt","childType":"string"},"id":2,"name":"timeZone"} +]}},{"type":"update","content":{ +"name":"UserBotCommandsChanged", +"header":217, +"doc":[ +"Update about bot commands changed",{"type":"reference","argument":"uid","category":"full","description":" User's Id"},{"type":"reference","argument":"commands","category":"full","description":" New List of commands"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"BotCommand"}},"id":2,"name":"commands"} +]}},{"type":"update","content":{ +"name":"UserExtChanged", +"header":218, +"doc":[ +"Update about user ext changed",{"type":"reference","argument":"uid","category":"full","description":" User's id"},{"type":"reference","argument":"ext","category":"full","description":" New Ext Value in User (NOT FullUser) object."}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"MapValue"}},"id":2,"name":"ext"} +]}},{"type":"update","content":{ +"name":"UserFullExtChanged", +"header":219, +"doc":[ +"Update about user ext changed",{"type":"reference","argument":"uid","category":"full","description":" User's Id"},{"type":"reference","argument":"ext","category":"full","description":" New Ext Value in FullUser (NOT User) object."}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"MapValue"}},"id":3,"name":"ext"} +]}},{"type":"rpc","content":{ +"name":"LoadFullUsers", +"header":2649, +"response":{"type":"anonymous","header":2650, "doc":[ +{"type":"reference","argument":"fullUsers","category":"compact","description":" Loaded users"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"FullUser"}},"id":1,"name":"fullUsers"} +]}, +"doc":[ +"Loading Full User information",{"type":"reference","argument":"userPeers","category":"compact","description":"User's peers to load. Should be non-empy"}],"attributes":[ +{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":1,"name":"userPeers"} +]}}]}, { + "title": "Profile", + "package": "profile", + "items": [ +{"type":"rpc","content":{ +"name":"EditName", +"header":53, +"response":{"type":"reference","name":"Seq"}, +"doc":[ +"Changing account's name",{"type":"reference","argument":"name","category":"full","description":"New name"}],"attributes":[ +{"type":"string","id":1,"name":"name"} +]}},{"type":"rpc","content":{ +"name":"EditNickName", +"header":205, +"response":{"type":"reference","name":"Seq"}, +"doc":[ +"Changing account's nickname",{"type":"reference","argument":"nickname","category":"full","description":"New Nickname"}],"attributes":[ +{"type":{"type":"opt","childType":"string"},"id":1,"name":"nickname"} +]}},{"type":"rpc","content":{ +"name":"CheckNickName", +"header":206, +"response":{"type":"reference","name":"Bool"}, +"doc":[ +"Checking availability of nickname",{"type":"reference","argument":"nickname","category":"full","description":"Nickname for checking"}],"attributes":[ +{"type":"string","id":1,"name":"nickname"} +]}},{"type":"rpc","content":{ +"name":"EditAbout", +"header":212, +"response":{"type":"reference","name":"Seq"}, +"doc":[ +"Changing about information",{"type":"reference","argument":"about","category":"full","description":"new about information"}],"attributes":[ +{"type":{"type":"opt","childType":"string"},"id":1,"name":"about"} +]}},{"type":"rpc","content":{ +"name":"EditAvatar", +"header":31, +"response":{"type":"anonymous","header":103, "doc":[ +"Response for change account avatar",{"type":"reference","argument":"avatar","category":"full","description":" New avatar"},{"type":"reference","argument":"seq","category":"full","description":" Sequence number"},{"type":"reference","argument":"state","category":"compact","description":" Sequence state"}] ,"attributes":[{"type":{"type":"struct","childType":"Avatar"},"id":1,"name":"avatar"} +,{"type":"int32","id":2,"name":"seq"} +,{"type":{"type":"alias","childType":"seq_state"},"id":3,"name":"state"} +]}, +"doc":[ +"Changing account's avatar",{"type":"reference","argument":"fileLocation","category":"compact","description":"File Location of uploaded unencrypted avatar"}],"attributes":[ +{"type":{"type":"struct","childType":"FileLocation"},"id":1,"name":"fileLocation"} +]}},{"type":"rpc","content":{ +"name":"RemoveAvatar", +"header":91, +"response":{"type":"reference","name":"Seq"}, +"doc":[ +"Removing account's avatar"],"attributes":[ +]}},{"type":"rpc","content":{ +"name":"EditMyTimeZone", +"header":144, +"response":{"type":"reference","name":"Seq"}, +"doc":[ +"Updating user's time zone",{"type":"reference","argument":"tz","category":"full","description":"New Time Zone"}],"attributes":[ +{"type":"string","id":1,"name":"tz"} +]}},{"type":"rpc","content":{ +"name":"EditMyPreferredLanguages", +"header":145, +"response":{"type":"reference","name":"Seq"}, +"doc":[ +"Changing preffered languages",{"type":"reference","argument":"preferredLanguages","category":"full","description":"Preffered Languages"}],"attributes":[ +{"type":{"type":"list","childType":"string"},"id":1,"name":"preferredLanguages"} +]}}]}, { + "title": "Contacts", + "package": "contacts", + "doc": [ + "Before working with contact list is is useful to import contacts from phone first by calling", + "method ImportContacts#0x07.", + "", + "All phone numbers MUST be preprocessed before import by some library (like libphonenumber)", + "and build international phone number depending on current users phone and/or locale.", + "", + "For loading contact list from server use GetContacts#0x57.", + "If during this call there are some updates about contact list change", + "it is recommended to call it again. Also applications need to sync contacts on application start.", + "", + "For searching for users without adding to contacts list use method FindContacts#0x70.", + "", + "For adding/deleting contacts AddContact#0x72 and DeleteContact#0x59." + ], + "items": [ + { + "type":"struct", + "content": { + "name":"PhoneToImport", +"doc":[ +"Phone for import",{"type":"reference","argument":"phoneNumber","category":"full","description":" phone number for import in international format"},{"type":"reference","argument":"name","category":"full","description":" optional name for contact"}],"attributes":[ +{"type":"int64","id":1,"name":"phoneNumber"} +,{"type":{"type":"opt","childType":"string"},"id":2,"name":"name"} +]}}, { + "type":"struct", + "content": { + "name":"EmailToImport", +"doc":[ +"Email for import",{"type":"reference","argument":"email","category":"full","description":" email for importing"},{"type":"reference","argument":"name","category":"full","description":" optional name for contact"}],"attributes":[ +{"type":"string","id":1,"name":"email"} +,{"type":{"type":"opt","childType":"string"},"id":2,"name":"name"} +]}},{"type":"rpc","content":{ +"name":"ImportContacts", +"header":7, +"response":{"type":"anonymous","header":8, "doc":[ +"Imported contacts",{"type":"reference","argument":"users","category":"compact","description":" Imported users"},{"type":"reference","argument":"seq","category":"full","description":" Sequence number if users are imported"},{"type":"reference","argument":"state","category":"compact","description":" Sequence state if users are imported"},{"type":"reference","argument":"userPeers","category":"full","description":" Imported user peers"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":1,"name":"users"} +,{"type":"int32","id":2,"name":"seq"} +,{"type":{"type":"alias","childType":"seq_state"},"id":3,"name":"state"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":4,"name":"userPeers"} +]}, +"doc":[ +"Importing phones and emails for building contact list","Maximum amount of items for import per method call equals to 100.",{"type":"reference","argument":"phones","category":"compact","description":"Phones for import"},{"type":"reference","argument":"emails","category":"compact","description":"Emails for import"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled optimizations"}],"attributes":[ +{"type":{"type":"list","childType":{"type":"struct","childType":"PhoneToImport"}},"id":1,"name":"phones"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"EmailToImport"}},"id":2,"name":"emails"} +,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":3,"name":"optimizations"} +]}},{"type":"empty"},{"type":"rpc","content":{ +"name":"GetContacts", +"header":87, +"response":{"type":"anonymous","header":88, "doc":[ +"Current contact list",{"type":"reference","argument":"users","category":"hidden","description":" User list if list is changed"},{"type":"reference","argument":"isNotChanged","category":"full","description":" is list changed"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":1,"name":"users"} +,{"type":"bool","id":2,"name":"isNotChanged"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":3,"name":"userPeers"} +]}, +"doc":[ +"Getting current contact list","SHA256 hash of list of a comma-separated list of contact UIDs in ascending","order may be passed in contactsHash parameter.","If the contact list was not changed, isNotChanged will be true.",{"type":"reference","argument":"contactsHash","category":"full","description":"Hash of saved list in application"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled optimizations"}],"attributes":[ +{"type":"string","id":1,"name":"contactsHash"} +,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":2,"name":"optimizations"} +]}},{"type":"rpc","content":{ +"name":"RemoveContact", +"header":89, +"response":{"type":"reference","name":"Seq"}, +"doc":[ +"Removing contact from contact list",{"type":"reference","argument":"uid","category":"full","description":"Contact's UID"},{"type":"reference","argument":"accessHash","category":"danger","description":"Contact's AccessHash"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":"int64","id":2,"name":"accessHash"} +]}},{"type":"rpc","content":{ +"name":"AddContact", +"header":114, +"response":{"type":"reference","name":"Seq"}, +"doc":[ +"Adding contact to contact list",{"type":"reference","argument":"uid","category":"full","description":"Contact's UID"},{"type":"reference","argument":"accessHash","category":"danger","description":"Contact's AccessHash"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":"int64","id":2,"name":"accessHash"} +]}},{"type":"rpc","content":{ +"name":"SearchContacts", +"header":112, +"response":{"type":"anonymous","header":113, "doc":[ +"Founded users",{"type":"reference","argument":"users","category":"compact","description":" Founded users"},{"type":"reference","argument":"userPeers","category":"compact","description":" Founded users peers"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":1,"name":"users"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":2,"name":"userPeers"} +]}, +"doc":[ +"Searching contacts by user's query",{"type":"reference","argument":"request","category":"full","description":"Search query"}],"attributes":[ +{"type":"string","id":1,"name":"request"} +,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":2,"name":"optimizations"} +]}},{"type":"empty"},{"type":"update","content":{ +"name":"ContactRegistered", +"header":5, +"doc":[ +"Update about contact registration",{"type":"reference","argument":"uid","category":"full","description":" contact's uid"},{"type":"reference","argument":"isSilent","category":"full","description":" is registration silent. If this value is true then don't show notification about registration"},{"type":"reference","argument":"date","category":"full","description":" date of registration"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":"bool","id":2,"name":"isSilent"} +,{"type":{"type":"alias","childType":"date"},"id":3,"name":"date"} +,{"type":{"type":"alias","childType":"randomId"},"id":4,"name":"rid"} +]}},{"type":"update","content":{ +"name":"ContactsAdded", +"header":40, +"doc":[ +"Update about contacts added",{"type":"reference","argument":"uids","category":"compact","description":" added contacts"}],"attributes":[ +{"type":{"type":"list","childType":{"type":"alias","childType":"userId"}},"id":1,"name":"uids"} +]}},{"type":"update","content":{ +"name":"ContactsRemoved", +"header":41, +"doc":[ +"Update about contacts removed",{"type":"reference","argument":"uids","category":"compact","description":" removed contacts"}],"attributes":[ +{"type":{"type":"list","childType":{"type":"alias","childType":"userId"}},"id":1,"name":"uids"} +]}}]}, { + "title": "Privacy", + "package": "privacy", + "items": [ +{"type":"rpc","content":{ +"name":"BlockUser", +"header":2636, +"response":{"type":"reference","name":"Seq"}, +"doc":[ +"Block User",{"type":"reference","argument":"peer","category":"full","description":"Peer for blocking"}],"attributes":[ +{"type":{"type":"struct","childType":"UserOutPeer"},"id":1,"name":"peer"} +]}},{"type":"rpc","content":{ +"name":"UnblockUser", +"header":2637, +"response":{"type":"reference","name":"Seq"}, +"doc":[ +"Unblock User",{"type":"reference","argument":"peer","category":"full","description":"Peer for unblocking"}],"attributes":[ +{"type":{"type":"struct","childType":"UserOutPeer"},"id":1,"name":"peer"} +]}},{"type":"rpc","content":{ +"name":"LoadBlockedUsers", +"header":2638, +"response":{"type":"anonymous","header":2639, "doc":[ +{"type":"reference","argument":"userPeers","category":"full","description":" Blocked user peers"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":1,"name":"userPeers"} +]}, +"doc":[ +"Load Blocked Users"],"attributes":[ +]}},{"type":"update","content":{ +"name":"UserBlocked", +"header":2629, +"doc":[ +"Update about User Blocked",{"type":"reference","argument":"uid","category":"full","description":" User Id"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +]}},{"type":"update","content":{ +"name":"UserUnblocked", +"header":2630, +"doc":[ +"Update about User Unblocked",{"type":"reference","argument":"uid","category":"full","description":" User Id"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +]}}]}, { + "title": "Messaging", + "package": "messaging", + "doc": [ + "Actor can work with encrypted and plain messages in one conversation. For both types of messages API", + "contains a bit different methods. Also encrypted and plain messages have different schemes.", + "

Messages

", + "Message entity contains:", + "
    ", + "
  • PeerType - group chat or private
  • ", + "
  • PeerId - group or user id of conversation
  • ", + "
  • RandomId - unique id of message that generated by sender. In Encrypted messages random id is encrypted.
  • ", + "
  • Date - date of message (calculated on server)
  • ", + "
  • Content
  • ", + "
", + "

Message content

", + "Message can be one of three basic types of messages: Text Message, File Message and Service message.", + "All messages can contain extensions. For example we can send text message and add markdown extension with", + "formatted text in markdown and clients that support this extension will show markdown, and that clients that", + "not supported extension then show simple text. File messages can have photo, video or voice extensions.", + "Service message can have extensions extensions such as \"user added\", \"group created\", \"avatar changed\", etc.", + "

Send messages

", + "Sending messages looks same for encrypted and plain messages. Client MUST prepare all required data", + "before sending message (for example FastThumb for photo/video/documents) and call required methods.", + "Encrypted messages differs here only by a little different scheme and encryption.", + "

WRONG_KEYS and incorrect keys

", + "For sending encrypted messages client MUST send messages encrypted for all own and receivers keys.", + "If client send encryption with missing, old or incorrect keys it will receive WRONG_KEYS.", + "In WRONG_KEYS you need to deserialize relatedData from RpcError to WrongKeysErrorData", + "and get detailed information about keys. Sometimes there are some broken keys on server and client can't", + "encrypt messages with it than client MUST send empty encrypted key in request elsewhere API return WRONG_KEYS.", + "

Encrypted messages and New Devices

", + "When you send message to someone and when he registered with new device there are no way to receive old encrypted", + "messages on new device and because of this there are a problem about read/delivery statuses.", + "Alice send messages to Bob, but Bob lose his device and buy new iPhone and installed Actor.", + "Alice receive notification about new device and send another message. Bob open chat with Alice and", + "send read status with maximum message read date. Alice will mark all sent messages as read and one that", + "was not delivered. We can use status notifications per message, but in VERY heavy conversations it will be", + "a lot of unnecessary traffic. For resolving this small issue we have different ways of message statuses", + "for encrypted and plain messages. Also it is recomended to mark all undelivered messages on new device update as", + "not devered with warring sign.", + "

Message Read and Delivery

", + "There are two different ways for read and delivery statuses for encrypted and plain messages.", + "For encrypted messages used status change by RandomId and for plain messages used by maximum", + "date of read/delivered message." + ], + "items": [ + { + "type":"struct", + "content": { + "name":"MessageAttributes", +"doc":[ +"Message Attributes",{"type":"reference","argument":"isMentioned","category":"full","description":" Is mentioned. If set overrides built-in value."},{"type":"reference","argument":"isHighlighted","category":"full","description":" Is message highlighted. Default is false."},{"type":"reference","argument":"isNotified","category":"full","description":" Is notified. If set overrides built-in settings."},{"type":"reference","argument":"isOnlyForYou","category":"full","description":" If this message is only for you. Default is false"}],"attributes":[ +{"type":{"type":"opt","childType":"bool"},"id":1,"name":"isMentioned"} +,{"type":{"type":"opt","childType":"bool"},"id":2,"name":"isHighlighted"} +,{"type":{"type":"opt","childType":"bool"},"id":3,"name":"isNotified"} +,{"type":{"type":"opt","childType":"bool"},"id":4,"name":"isOnlyForYou"} +]}}, { + "type":"struct", + "content": { + "name":"QuotedMessage", +"doc":[ +"Quoted Message",{"type":"reference","argument":"messageId","category":"full","description":" Message Id if present"},{"type":"reference","argument":"publicGroupId","category":"full","description":" Public Group id if present"},{"type":"reference","argument":"senderUserId","category":"full","description":" Sender of message"},{"type":"reference","argument":"messageDate","category":"full","description":" Date of message"},{"type":"reference","argument":"quotedMessageContent","category":"full","description":" Optional Quoted Message Content. Can be empty if messageId is present and message is in current peer."}],"attributes":[ +{"type":{"type":"opt","childType":{"type":"alias","childType":"randomId"}},"id":1,"name":"messageId"} +,{"type":{"type":"opt","childType":{"type":"alias","childType":"groupId"}},"id":2,"name":"publicGroupId"} +,{"type":{"type":"alias","childType":"userId"},"id":3,"name":"senderUserId"} +,{"type":{"type":"alias","childType":"date"},"id":4,"name":"messageDate"} +,{"type":{"type":"opt","childType":{"type":"trait","childType":"Message"}},"id":5,"name":"quotedMessageContent"} +]}},{"type":"trait","content":{ +"isContainer":"true","name":"Message","attributes":[ +]}}, { + "type":"struct", + "content": { + "name":"TextMessage", +"doc":[ +"Text message",{"type":"reference","argument":"text","category":"danger","description":" the text"},{"type":"reference","argument":"mentions","category":"full","description":" User mentions in message"},{"type":"reference","argument":"ext","category":"full","description":" Optional bytes of extension"}],"trait":{"name":"Message","key":1},"expandable":"true","attributes":[ +{"type":"string","id":1,"name":"text"} +,{"type":{"type":"list","childType":{"type":"alias","childType":"userId"}},"id":2,"name":"mentions"} +,{"type":{"type":"opt","childType":{"type":"trait","childType":"TextMessageEx"}},"id":3,"name":"ext"} +]}},{"type":"trait","content":{ +"isContainer":"true","name":"TextMessageEx","attributes":[ +]}}, { + "type":"struct", + "content": { + "name":"TextExMarkdown", +"doc":[ +"Markdown extension",{"type":"reference","argument":"markdown","category":"full","description":" Markdown text"}],"trait":{"name":"TextMessageEx","key":1},"expandable":"true","attributes":[ +{"type":"string","id":2,"name":"markdown"} +]}}, { + "type":"struct", + "content": { + "name":"TextModernMessage", +"doc":[ +"Modern text message",{"type":"reference","argument":"text","category":"full","description":" optional text of message"},{"type":"reference","argument":"senderNameOverride","category":"full","description":" optional overriding of sender"},{"type":"reference","argument":"senderPhotoOverride","category":"full","description":" optional overriding sender's photo"},{"type":"reference","argument":"style","category":"full","description":" optional paragraph style"},{"type":"reference","argument":"attaches","category":"full","description":" optional Attaches of message"}],"trait":{"name":"TextMessageEx","key":2},"expandable":"true","attributes":[ +{"type":{"type":"opt","childType":"string"},"id":1,"name":"text"} +,{"type":{"type":"opt","childType":"string"},"id":2,"name":"senderNameOverride"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"Avatar"}},"id":3,"name":"senderPhotoOverride"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"ParagraphStyle"}},"id":4,"name":"style"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"TextModernAttach"}},"id":5,"name":"attaches"} +]}}, { + "type":"struct", + "content": { + "name":"ParagraphStyle", +"doc":[ +"Paragraph style",{"type":"reference","argument":"showParagraph","category":"full","description":" Show quote-like paragraph?"},{"type":"reference","argument":"paragraphColor","category":"full","description":" Override paragraph color"},{"type":"reference","argument":"bgColor","category":"full","description":" Override background color"}],"attributes":[ +{"type":{"type":"opt","childType":"bool"},"id":1,"name":"showParagraph"} +,{"type":{"type":"opt","childType":{"type":"trait","childType":"Color"}},"id":2,"name":"paragraphColor"} +,{"type":{"type":"opt","childType":{"type":"trait","childType":"Color"}},"id":3,"name":"bgColor"} +]}}, { + "type":"struct", + "content": { + "name":"TextModernAttach", +"doc":[ +"Attaches to message",{"type":"reference","argument":"title","category":"full","description":" Attach of message"},{"type":"reference","argument":"titleUrl","category":"full","description":" Attach title url"},{"type":"reference","argument":"titleIcon","category":"full","description":" Attach title icon"},{"type":"reference","argument":"text","category":"full","description":" Attach text"},{"type":"reference","argument":"style","category":"full","description":" Attach style"}],"expandable":"true","attributes":[ +{"type":{"type":"opt","childType":"string"},"id":1,"name":"title"} +,{"type":{"type":"opt","childType":"string"},"id":2,"name":"titleUrl"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"ImageLocation"}},"id":3,"name":"titleIcon"} +,{"type":{"type":"opt","childType":"string"},"id":4,"name":"text"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"ParagraphStyle"}},"id":5,"name":"style"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"TextModernField"}},"id":6,"name":"fields"} +]}}, { + "type":"struct", + "content": { + "name":"TextModernField", +"doc":[ +"Modern message fields",{"type":"reference","argument":"title","category":"full","description":" Field title"},{"type":"reference","argument":"value","category":"full","description":" Field value"},{"type":"reference","argument":"isShort","category":"full","description":" Is field can be shown in compact way (default is TRUE)"}],"expandable":"true","attributes":[ +{"type":"string","id":1,"name":"title"} +,{"type":"string","id":2,"name":"value"} +,{"type":{"type":"opt","childType":"bool"},"id":3,"name":"isShort"} +]}}, { + "type":"struct", + "content": { + "name":"TextCommand", +"doc":[ +"Text Command Message for bots",{"type":"reference","argument":"command","category":"full","description":" Slash-Command For execution"},{"type":"reference","argument":"args","category":"full","description":" Arguments of slash command"}],"trait":{"name":"TextMessageEx","key":3},"expandable":"true","attributes":[ +{"type":"string","id":1,"name":"command"} +,{"type":"string","id":2,"name":"args"} +]}}, { + "type":"struct", + "content": { + "name":"ServiceMessage", +"doc":[ +"Service message",{"type":"reference","argument":"text","category":"full","description":" service message text"},{"type":"reference","argument":"ext","category":"compact","description":" Extension"}],"trait":{"name":"Message","key":2},"expandable":"true","attributes":[ +{"type":"string","id":1,"name":"text"} +,{"type":{"type":"opt","childType":{"type":"trait","childType":"ServiceEx"}},"id":3,"name":"ext"} +]}},{"type":"trait","content":{ +"isContainer":"true","name":"ServiceEx","attributes":[ +]}}, { + "type":"struct", + "content": { + "name":"ServiceExUserInvited", +"doc":[ +"Service message about adding user to group",{"type":"reference","argument":"invitedUid","category":"full","description":" added user id"}],"trait":{"name":"ServiceEx","key":1},"expandable":"true","attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"invitedUid"} +]}}, { + "type":"struct", + "content": { + "name":"ServiceExUserJoined", +"doc":[ +"Service message about user join to group"],"trait":{"name":"ServiceEx","key":17},"expandable":"true","attributes":[ +]}}, { + "type":"struct", + "content": { + "name":"ServiceExUserKicked", +"doc":[ +"Service message about kicking user from group",{"type":"reference","argument":"kickedUid","category":"full","description":" kicked user id"}],"trait":{"name":"ServiceEx","key":2},"expandable":"true","attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"kickedUid"} +]}}, { + "type":"struct", + "content": { + "name":"ServiceExUserLeft", +"doc":[ +"Service message about user left group"],"trait":{"name":"ServiceEx","key":3},"expandable":"true","attributes":[ +]}}, { + "type":"struct", + "content": { + "name":"ServiceExGroupCreated", +"doc":[ +"Service message about group creating"],"trait":{"name":"ServiceEx","key":4},"expandable":"true","attributes":[ +]}}, { + "type":"struct", + "content": { + "name":"ServiceExChangedTitle", +"doc":[ +"Service message about group title change",{"type":"reference","argument":"title","category":"full","description":" New group title"}],"trait":{"name":"ServiceEx","key":5},"expandable":"true","attributes":[ +{"type":"string","id":1,"name":"title"} +]}}, { + "type":"struct", + "content": { + "name":"ServiceExChangedTopic", +"doc":[ +"Service message on group topic change",{"type":"reference","argument":"topic","category":"full","description":" New group topic"}],"trait":{"name":"ServiceEx","key":18},"expandable":"true","attributes":[ +{"type":{"type":"opt","childType":"string"},"id":1,"name":"topic"} +]}}, { + "type":"struct", + "content": { + "name":"ServiceExChangedAbout", +"doc":[ +"Service message on group about change",{"type":"reference","argument":"about","category":"full","description":" New group about"}],"trait":{"name":"ServiceEx","key":19},"expandable":"true","attributes":[ +{"type":{"type":"opt","childType":"string"},"id":1,"name":"about"} +]}}, { + "type":"struct", + "content": { + "name":"ServiceExChangedAvatar", +"doc":[ +"Service message about avatar change",{"type":"reference","argument":"avatar","category":"compact","description":" Updated avatar"}],"trait":{"name":"ServiceEx","key":6},"expandable":"true","attributes":[ +{"type":{"type":"opt","childType":{"type":"struct","childType":"Avatar"}},"id":1,"name":"avatar"} +]}}, { + "type":"struct", + "content": { + "name":"ServiceExContactRegistered", +"doc":[ +"Service message about user registration",{"type":"reference","argument":"uid","category":"full","description":" User Id"}],"trait":{"name":"ServiceEx","key":8},"expandable":"true","attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +]}}, { + "type":"struct", + "content": { + "name":"ServiceExPhoneMissed", +"doc":[ +"Update about missing phone call"],"trait":{"name":"ServiceEx","key":9},"expandable":"true","attributes":[ +]}}, { + "type":"struct", + "content": { + "name":"ServiceExPhoneCall", +"doc":[ +"Update about phone call",{"type":"reference","argument":"duration","category":"full","description":" Duration of a phone call"}],"trait":{"name":"ServiceEx","key":16},"expandable":"true","attributes":[ +{"type":"int32","id":1,"name":"duration"} +]}}, { + "type":"struct", + "content": { + "name":"ServiceExChatArchived", +"doc":[ +"Message about chat archived"],"trait":{"name":"ServiceEx","key":20},"expandable":"true","attributes":[ +]}}, { + "type":"struct", + "content": { + "name":"ServiceExChatRestored", +"doc":[ +"Message about chat restored"],"trait":{"name":"ServiceEx","key":21},"expandable":"true","attributes":[ +]}}, { + "type":"struct", + "content": { + "name":"DocumentMessage", +"doc":[ +"File message",{"type":"reference","argument":"fileId","category":"full","description":" file id"},{"type":"reference","argument":"accessHash","category":"danger","description":" file access hash"},{"type":"reference","argument":"fileSize","category":"full","description":" file size"},{"type":"reference","argument":"name","category":"full","description":" name of file"},{"type":"reference","argument":"mimeType","category":"full","description":" mimetype of file"},{"type":"reference","argument":"thumb","category":"compact","description":" optional thumb of file. JPEG less that 90x90 with 60-70 quality."},{"type":"reference","argument":"ext","category":"compact","description":" Extension"}],"trait":{"name":"Message","key":3},"expandable":"true","attributes":[ +{"type":"int64","id":1,"name":"fileId"} +,{"type":"int64","id":2,"name":"accessHash"} +,{"type":"int32","id":3,"name":"fileSize"} +,{"type":"string","id":4,"name":"name"} +,{"type":"string","id":5,"name":"mimeType"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"FastThumb"}},"id":6,"name":"thumb"} +,{"type":{"type":"opt","childType":{"type":"trait","childType":"DocumentEx"}},"id":8,"name":"ext"} +]}},{"type":"trait","content":{ +"isContainer":"true","name":"DocumentEx","attributes":[ +]}}, { + "type":"struct", + "content": { + "name":"DocumentExPhoto", +"doc":[ +"File photo extension. Can be set ONLY for JPEG.",{"type":"reference","argument":"w","category":"full","description":" image width"},{"type":"reference","argument":"h","category":"full","description":" image height"}],"trait":{"name":"DocumentEx","key":1},"expandable":"true","attributes":[ +{"type":"int32","id":1,"name":"w"} +,{"type":"int32","id":2,"name":"h"} +]}}, { + "type":"struct", + "content": { + "name":"DocumentExVideo", +"doc":[ +"File video extension",{"type":"reference","argument":"w","category":"full","description":" video width"},{"type":"reference","argument":"h","category":"full","description":" video height"},{"type":"reference","argument":"duration","category":"full","description":" video duration"}],"trait":{"name":"DocumentEx","key":2},"expandable":"true","attributes":[ +{"type":"int32","id":1,"name":"w"} +,{"type":"int32","id":2,"name":"h"} +,{"type":"int32","id":3,"name":"duration"} +]}}, { + "type":"struct", + "content": { + "name":"DocumentExVoice", +"doc":[ +"File voice extension",{"type":"reference","argument":"duration","category":"full","description":" voice duration"}],"trait":{"name":"DocumentEx","key":3},"expandable":"true","attributes":[ +{"type":"int32","id":1,"name":"duration"} +]}}, { + "type":"struct", + "content": { + "name":"DocumentExAnimation", +"doc":[ +"Animation extension. Can be set ONLY for GIF.",{"type":"reference","argument":"w","category":"full","description":" Animation width"},{"type":"reference","argument":"h","category":"full","description":" Animation height"}],"trait":{"name":"DocumentEx","key":6},"expandable":"true","attributes":[ +{"type":"int32","id":1,"name":"w"} +,{"type":"int32","id":2,"name":"h"} +]}}, { + "type":"struct", + "content": { + "name":"DocumentExAnimationVid", +"doc":[ +"Animation video extension. More compact version of Animation with video codec instead of GIF.","Can be set ONLY for MP4.",{"type":"reference","argument":"w","category":"full","description":" Animation width"},{"type":"reference","argument":"h","category":"full","description":" Animation height"},{"type":"reference","argument":"duration","category":"full","description":" Animation duration"}],"trait":{"name":"DocumentEx","key":7},"expandable":"true","attributes":[ +{"type":"int32","id":1,"name":"w"} +,{"type":"int32","id":2,"name":"h"} +,{"type":"int32","id":3,"name":"duration"} +]}}, { + "type":"struct", + "content": { + "name":"JsonMessage", +"doc":[ +"Custom-data JsonMessage",{"type":"reference","argument":"rawJson","category":"danger","description":" JSON object"}],"trait":{"name":"Message","key":4},"expandable":"true","attributes":[ +{"type":"string","id":1,"name":"rawJson"} +]}}, { + "type":"struct", + "content": { + "name":"UnsupportedMessage", +"doc":[ +"Explicit type for unsupported message"],"trait":{"name":"Message","key":5},"expandable":"true","attributes":[ +]}}, { + "type":"struct", + "content": { + "name":"StickerMessage", +"doc":[ +"Sticker message",{"type":"reference","argument":"stickerId","category":"full","description":" Optional Unique ID of sticker"},{"type":"reference","argument":"fastPreview","category":"full","description":" Optional Fast preview of sticker in webp format"},{"type":"reference","argument":"image512","category":"full","description":" Optional 512x512 sticker image in webp format"},{"type":"reference","argument":"image256","category":"full","description":" Optional 256x256 sticker image in webp format"},{"type":"reference","argument":"stickerCollectionId","category":"full","description":" Optional Collection ID"},{"type":"reference","argument":"stickerCollectionAccessHash","category":"full","description":" Optional Collection Access Hash"}],"trait":{"name":"Message","key":6},"expandable":"true","attributes":[ +{"type":{"type":"opt","childType":"int32"},"id":1,"name":"stickerId"} +,{"type":{"type":"opt","childType":"bytes"},"id":2,"name":"fastPreview"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"ImageLocation"}},"id":3,"name":"image512"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"ImageLocation"}},"id":4,"name":"image256"} +,{"type":{"type":"opt","childType":"int32"},"id":5,"name":"stickerCollectionId"} +,{"type":{"type":"opt","childType":"int64"},"id":6,"name":"stickerCollectionAccessHash"} +]}}, { + "type":"struct", + "content": { + "name":"BinaryMessage", +"doc":[ +"Binary Message. Useful for implementing your own content types",{"type":"reference","argument":"contentTag","category":"full","description":" Content Tag"},{"type":"reference","argument":"msg","category":"compact","description":" Message contents"}],"trait":{"name":"Message","key":7},"expandable":"true","attributes":[ +{"type":"string","id":1,"name":"contentTag"} +,{"type":"bytes","id":2,"name":"msg"} +]}}, { + "type":"struct", + "content": { + "name":"EncryptedMessage", +"doc":[ +"Encrypted Message",{"type":"reference","argument":"box","category":"full","description":" Encrypted box"}],"trait":{"name":"Message","key":8},"expandable":"true","attributes":[ +{"type":{"type":"struct","childType":"EncryptedBox"},"id":1,"name":"box"} +]}}, { + "type":"struct", + "content": { + "name":"EmptyMessage", +"doc":[ +"Empty Message"],"trait":{"name":"Message","key":9},"expandable":"true","attributes":[ +]}}, { + "type":"struct", + "content": { + "name":"DialogShort", +"doc":[ +"Short Dialog from grouped conversation list",{"type":"reference","argument":"peer","category":"full","description":" Peer of conversation"},{"type":"reference","argument":"counter","category":"full","description":" Conversation unread count"},{"type":"reference","argument":"date","category":"full","description":" Conversation top message date"}],"attributes":[ +{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"} +,{"type":"int32","id":2,"name":"counter"} +,{"type":{"type":"alias","childType":"date"},"id":4,"name":"date"} +]}}, { + "type":"struct", + "content": { + "name":"DialogGroup", +"doc":[ +"Grouped dialog list",{"type":"reference","argument":"title","category":"full","description":" Title of group"},{"type":"reference","argument":"key","category":"full","description":" Key of group"},{"type":"reference","argument":"dialogs","category":"full","description":" Conversations in group"}],"attributes":[ +{"type":"string","id":1,"name":"title"} +,{"type":"string","id":2,"name":"key"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"DialogShort"}},"id":3,"name":"dialogs"} +]}}, { + "type":"struct", + "content": { + "name":"MessageReaction", +"doc":[ +"Reaction to message",{"type":"reference","argument":"users","category":"full","description":" User's reaction"},{"type":"reference","argument":"code","category":"full","description":" Reaction EMOJI code"}],"attributes":[ +{"type":{"type":"list","childType":{"type":"alias","childType":"userId"}},"id":1,"name":"users"} +,{"type":"string","id":2,"name":"code"} +]}}, { + "type":"struct", + "content": { + "name":"MessageOutReference", +"doc":[ +"Message Out Reference",{"type":"reference","argument":"peer","category":"full","description":" Out Peer of message"},{"type":"reference","argument":"rid","category":"full","description":" Message random id"}],"attributes":[ +{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"} +,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"rid"} +]}},{"type":"rpc","content":{ +"name":"SendMessage", +"header":92, +"response":{"type":"reference","name":"SeqDate"}, +"doc":[ +"Sending plain message",{"type":"reference","argument":"peer","category":"full","description":"Destination peer for message"},{"type":"reference","argument":"rid","category":"full","description":"Message random id (generated on client side)"},{"type":"reference","argument":"message","category":"full","description":"The message"},{"type":"reference","argument":"isOnlyForUser","category":"full","description":"If message is shown only for specific user"},{"type":"reference","argument":"quotedMessageReference","category":"full","description":"Quoted message if present"}],"attributes":[ +{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"} +,{"type":{"type":"alias","childType":"randomId"},"id":3,"name":"rid"} +,{"type":{"type":"trait","childType":"Message"},"id":4,"name":"message"} +,{"type":{"type":"opt","childType":{"type":"alias","childType":"userId"}},"id":5,"name":"isOnlyForUser"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"MessageOutReference"}},"id":6,"name":"quotedMessageReference"} +]}},{"type":"rpc","content":{ +"name":"UpdateMessage", +"header":2658, +"response":{"type":"reference","name":"SeqDate"}, +"doc":[ +"Changing Message content",{"type":"reference","argument":"peer","category":"full","description":"Destination Peer"},{"type":"reference","argument":"rid","category":"full","description":"Message random id"},{"type":"reference","argument":"updatedMessage","category":"full","description":"Updated Message content"}],"attributes":[ +{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"} +,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"rid"} +,{"type":{"type":"trait","childType":"Message"},"id":3,"name":"updatedMessage"} +]}},{"type":"rpc","content":{ +"name":"MessageReceived", +"header":55, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Confirmation of plain message receive by device",{"type":"reference","argument":"peer","category":"full","description":"Destination peer"},{"type":"reference","argument":"date","category":"full","description":"Maximum date of received messages"}],"attributes":[ +{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"} +,{"type":{"type":"alias","childType":"date"},"id":3,"name":"date"} +]}},{"type":"rpc","content":{ +"name":"MessageRead", +"header":57, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Marking plain messages as read",{"type":"reference","argument":"peer","category":"full","description":"Destination peer"},{"type":"reference","argument":"date","category":"full","description":"Maximum date of read messages"}],"attributes":[ +{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"} +,{"type":{"type":"alias","childType":"date"},"id":3,"name":"date"} +]}},{"type":"rpc","content":{ +"name":"DeleteMessage", +"header":98, +"response":{"type":"reference","name":"Seq"}, +"doc":[ +"Deleting messages",{"type":"reference","argument":"peer","category":"full","description":"Destination peer"},{"type":"reference","argument":"rids","category":"full","description":"Message random id"}],"attributes":[ +{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"} +,{"type":{"type":"list","childType":{"type":"alias","childType":"randomId"}},"id":3,"name":"rids"} +]}},{"type":"rpc","content":{ +"name":"ClearChat", +"header":99, +"response":{"type":"reference","name":"Seq"}, +"doc":[ +"Clearing of conversation (without removing dialog from dialogs list)",{"type":"reference","argument":"peer","category":"full","description":"Conversation peer"}],"attributes":[ +{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"} +]}},{"type":"rpc","content":{ +"name":"DeleteChat", +"header":100, +"response":{"type":"reference","name":"Seq"}, +"doc":[ +"Deleting of conversation (also leave group for group conversations)",{"type":"reference","argument":"peer","category":"full","description":"Conversation peer"}],"attributes":[ +{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"} +]}},{"type":"rpc","content":{ +"name":"ArchiveChat", +"header":2654, +"response":{"type":"reference","name":"Seq"}, +"doc":[ +"Archiving chat",{"type":"reference","argument":"peer","category":"full","description":"Conversation peer"}],"attributes":[ +{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"} +]}},{"type":"rpc","content":{ +"name":"MessageSetReaction", +"header":210, +"response":{"type":"reference","name":"ReactionsResponse"}, +"doc":[ +"Setting Message reaction",{"type":"reference","argument":"peer","category":"full","description":"Destination peer"},{"type":"reference","argument":"rid","category":"full","description":"Message random id"},{"type":"reference","argument":"code","category":"full","description":"Reaction code"}],"attributes":[ +{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"} +,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"rid"} +,{"type":"string","id":3,"name":"code"} +]}},{"type":"rpc","content":{ +"name":"MessageRemoveReaction", +"header":220, +"response":{"type":"reference","name":"ReactionsResponse"}, +"doc":[ +"Removing Message reaction",{"type":"reference","argument":"peer","category":"full","description":"Destination peer"},{"type":"reference","argument":"rid","category":"full","description":"Message random id"},{"type":"reference","argument":"code","category":"full","description":"Reaction code"}],"attributes":[ +{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"} +,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"rid"} +,{"type":"string","id":3,"name":"code"} +]}},{"type":"response","content":{ +"name":"ReactionsResponse", +"header":219, +"doc":[ +"Response for reactions change"],"attributes":[ +{"type":"int32","id":1,"name":"seq"} +,{"type":{"type":"alias","childType":"seq_state"},"id":2,"name":"state"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"MessageReaction"}},"id":3,"name":"reactions"} +]}},{"type":"update","content":{ +"name":"Message", +"header":55, +"doc":[ +"Update about plain message",{"type":"reference","argument":"peer","category":"full","description":" Destination peer"},{"type":"reference","argument":"senderUid","category":"full","description":" Sender of message"},{"type":"reference","argument":"date","category":"full","description":" date of message"},{"type":"reference","argument":"rid","category":"full","description":" Rid of message"},{"type":"reference","argument":"message","category":"full","description":" message content"},{"type":"reference","argument":"attributes","category":"full","description":" optional message attributes"},{"type":"reference","argument":"quotedMessage","category":"full","description":" optional quoted message"}],"attributes":[ +{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"} +,{"type":{"type":"alias","childType":"userId"},"id":2,"name":"senderUid"} +,{"type":{"type":"alias","childType":"date"},"id":3,"name":"date"} +,{"type":{"type":"alias","childType":"randomId"},"id":4,"name":"rid"} +,{"type":{"type":"trait","childType":"Message"},"id":5,"name":"message"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"MessageAttributes"}},"id":6,"name":"attributes"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"QuotedMessage"}},"id":7,"name":"quotedMessage"} +]}},{"type":"update","content":{ +"name":"MessageContentChanged", +"header":162, +"doc":[ +"Update about message change",{"type":"reference","argument":"peer","category":"full","description":" Destination peer"},{"type":"reference","argument":"rid","category":"full","description":" Rid of message"},{"type":"reference","argument":"message","category":"full","description":" Message content"}],"attributes":[ +{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"} +,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"rid"} +,{"type":{"type":"trait","childType":"Message"},"id":3,"name":"message"} +]}},{"type":"update","content":{ +"name":"MessageQuotedChanged", +"header":169, +"doc":[ +"Update about quoted message changed",{"type":"reference","argument":"peer","category":"full","description":" Destination peer"},{"type":"reference","argument":"rid","category":"full","description":" Rid of message"},{"type":"reference","argument":"quotedMessage","category":"full","description":" Quoted Message"}],"attributes":[ +{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"} +,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"rid"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"QuotedMessage"}},"id":3,"name":"quotedMessage"} +]}},{"type":"update","content":{ +"name":"MessageDateChanged", +"header":163, +"doc":[ +"Update about message date changed",{"type":"reference","argument":"peer","category":"full","description":" Destination peer"},{"type":"reference","argument":"rid","category":"full","description":" Rid of message"},{"type":"reference","argument":"date","category":"full","description":" Date of message"}],"attributes":[ +{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"} +,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"rid"} +,{"type":{"type":"alias","childType":"date"},"id":3,"name":"date"} +]}},{"type":"update","content":{ +"name":"MessageSent", +"header":4, +"doc":[ +"Update about message sent",{"type":"reference","argument":"peer","category":"full","description":" Destination peer"},{"type":"reference","argument":"rid","category":"full","description":" Rid of message"},{"type":"reference","argument":"date","category":"full","description":" Date of message"}],"attributes":[ +{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"} +,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"rid"} +,{"type":{"type":"alias","childType":"date"},"id":3,"name":"date"} +]}},{"type":"update","content":{ +"name":"MessageReceived", +"header":54, +"doc":[ +"Update about message received",{"type":"reference","argument":"peer","category":"full","description":" Destination peer"},{"type":"reference","argument":"startDate","category":"full","description":" Start date of received message"},{"type":"reference","argument":"receivedDate","category":"full","description":" Date of receive"}],"attributes":[ +{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"} +,{"type":{"type":"alias","childType":"date"},"id":2,"name":"startDate"} +,{"type":{"type":"alias","childType":"date"},"id":3,"name":"receivedDate"} +]}},{"type":"update","content":{ +"name":"MessageRead", +"header":19, +"doc":[ +"Update about message read",{"type":"reference","argument":"peer","category":"full","description":" Destination peer"},{"type":"reference","argument":"startDate","category":"full","description":" Start date of read message"},{"type":"reference","argument":"readDate","category":"full","description":" Date of read"}],"attributes":[ +{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"} +,{"type":{"type":"alias","childType":"date"},"id":2,"name":"startDate"} +,{"type":{"type":"alias","childType":"date"},"id":3,"name":"readDate"} +]}},{"type":"update","content":{ +"name":"MessageReadByMe", +"header":50, +"doc":[ +"Update about message read by me",{"type":"reference","argument":"peer","category":"full","description":" Destination peer"},{"type":"reference","argument":"startDate","category":"full","description":" Start date of read message"},{"type":"reference","argument":"unreadCounter","category":"full","description":" Optional unread counter in conversation"}],"attributes":[ +{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"} +,{"type":{"type":"alias","childType":"date"},"id":2,"name":"startDate"} +,{"type":{"type":"opt","childType":"int32"},"id":3,"name":"unreadCounter"} +]}},{"type":"update","content":{ +"name":"MessageDelete", +"header":46, +"doc":[ +"Update about message delete",{"type":"reference","argument":"peer","category":"full","description":" Destination peer"},{"type":"reference","argument":"rids","category":"full","description":" Deleted messages"}],"attributes":[ +{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"} +,{"type":{"type":"list","childType":{"type":"alias","childType":"randomId"}},"id":2,"name":"rids"} +]}},{"type":"update","content":{ +"name":"ChatClear", +"header":47, +"doc":[ +"Update about chat clear",{"type":"reference","argument":"peer","category":"full","description":" Destination peer"}],"attributes":[ +{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"} +]}},{"type":"update","content":{ +"name":"ChatDelete", +"header":48, +"doc":[ +"Update about chat delete",{"type":"reference","argument":"peer","category":"full","description":" Destination peer"}],"attributes":[ +{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"} +]}},{"type":"update","content":{ +"name":"ChatArchive", +"header":94, +"doc":[ +"Update about chat archive",{"type":"reference","argument":"peer","category":"full","description":" Destination peer"}],"attributes":[ +{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"} +]}},{"type":"update","content":{ +"name":"ChatDropCache", +"header":2690, +"doc":[ +"Update about cache drop",{"type":"reference","argument":"peer","category":"full","description":" Destination peer"}],"attributes":[ +{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"} +]}},{"type":"update","content":{ +"name":"ChatGroupsChanged", +"header":1, +"doc":[ +"Update about chat groups changed. Called only when adding, removing and reordering of grouped dialog.",{"type":"reference","argument":"dialogs","category":"compact","description":" New dialgos list"}],"attributes":[ +{"type":{"type":"list","childType":{"type":"struct","childType":"DialogGroup"}},"id":1,"name":"dialogs"} +]}},{"type":"update","content":{ +"name":"ReactionsUpdate", +"header":222, +"doc":[ +"Update about reactions change",{"type":"reference","argument":"peer","category":"full","description":" Destination peer"},{"type":"reference","argument":"rid","category":"full","description":" Message random id"},{"type":"reference","argument":"reactions","category":"full","description":" New Reactions"}],"attributes":[ +{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"} +,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"rid"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"MessageReaction"}},"id":3,"name":"reactions"} +]}}, { + "type": "enum", + "content": { + "name": "MessageState", + "values": [ { - "type": "string", - "id": 5, - "name": "deviceTitle" + "name": "Sent", + "id": 1 }, { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 6, - "name": "timeZone" + "name": "Received", + "id": 2 }, { - "type": { - "type": "list", - "childType": "string" - }, - "id": 7, - "name": "preferredLanguages" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "SendCodeByPhoneCall", - "header": 197, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Dial phone and dictate auth code", - { - "type": "reference", - "argument": "transactionHash", - "category": "danger", - "description": "Transaction hash" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "transactionHash" + "name": "Read", + "id": 3 } - ] - } - }, - { - "type": "rpc", + ] + } + }, { + "type":"struct", + "content": { + "name":"MessageContainer", +"doc":[ +"Message from history",{"type":"reference","argument":"senderUid","category":"full","description":" Sender of mesasge"},{"type":"reference","argument":"rid","category":"full","description":" Random Id of message"},{"type":"reference","argument":"date","category":"full","description":" Date of message"},{"type":"reference","argument":"message","category":"full","description":" Content of message"},{"type":"reference","argument":"reactions","category":"full","description":" Message reactions"},{"type":"reference","argument":"attribute","category":"full","description":" Optional message attributes"},{"type":"reference","argument":"quotedMessage","category":"full","description":" Optional quoted Message"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"senderUid"} +,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"rid"} +,{"type":{"type":"alias","childType":"date"},"id":3,"name":"date"} +,{"type":{"type":"trait","childType":"Message"},"id":5,"name":"message"} +,{"type":{"type":"opt","childType":{"type":"enum","childType":"MessageState"}},"id":6,"name":"state"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"MessageReaction"}},"id":7,"name":"reactions"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"MessageAttributes"}},"id":8,"name":"attribute"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"QuotedMessage"}},"id":9,"name":"quotedMessage"} +]}}, { + "type": "enum", "content": { - "name": "StartEmailAuth", - "header": 185, - "response": { - "type": "anonymous", - "header": 186, - "doc": [ - "Email Activation response", - { - "type": "reference", - "argument": "transactionHash", - "category": "danger", - "description": " Hash of activation transaction" - }, - { - "type": "reference", - "argument": "isRegistered", - "category": "full", - "description": " true if user is registered" - }, - { - "type": "reference", - "argument": "activationType", - "category": "full", - "description": " Email Activation type" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "transactionHash" - }, - { - "type": "bool", - "id": 2, - "name": "isRegistered" - }, - { - "type": { - "type": "enum", - "childType": "EmailActivationType" - }, - "id": 3, - "name": "activationType" - } - ] - }, - "doc": [ - "Start EMail Activation", - { - "type": "reference", - "argument": "email", - "category": "full", - "description": "Email" - }, - { - "type": "reference", - "argument": "appId", - "category": "hidden", - "description": "Application Id" - }, + "name": "ListLoadMode", + "values": [ { - "type": "reference", - "argument": "apiKey", - "category": "hidden", - "description": "Application API key" + "name": "Forward", + "id": 1 }, { - "type": "reference", - "argument": "deviceHash", - "category": "full", - "description": "Hash of device unique id and app bundle id. Used for autologout users when app is reinstalled" + "name": "Backward", + "id": 2 }, { - "type": "reference", - "argument": "deviceTitle", - "category": "full", - "description": "Device Title" - }, + "name": "Both", + "id": 3 + } + ] + } + },{"type":"rpc","content":{ +"name":"LoadHistory", +"header":118, +"response":{"type":"anonymous","header":119, "doc":[ +"Loaded history",{"type":"reference","argument":"history","category":"compact","description":" Messages"},{"type":"reference","argument":"users","category":"compact","description":" Loaded users"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"MessageContainer"}},"id":1,"name":"history"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":2,"name":"users"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":4,"name":"userPeers"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"Group"}},"id":5,"name":"groups"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"GroupOutPeer"}},"id":6,"name":"groupPeers"} +]}, +"doc":[ +"Loading history of chat",{"type":"reference","argument":"peer","category":"full","description":"Peer of conversation"},{"type":"reference","argument":"date","category":"full","description":"start date of messages for loading or 0 for loading from start"},{"type":"reference","argument":"loadMode","category":"full","description":"Loading mode: Forward loading, backward or both ways"},{"type":"reference","argument":"limit","category":"full","description":"maximum amount of messages (max is 100)"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled optimizations"}],"attributes":[ +{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"} +,{"type":{"type":"alias","childType":"date"},"id":3,"name":"date"} +,{"type":{"type":"opt","childType":{"type":"enum","childType":"ListLoadMode"}},"id":5,"name":"loadMode"} +,{"type":"int32","id":4,"name":"limit"} +,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":6,"name":"optimizations"} +]}}, { + "type":"struct", + "content": { + "name":"Dialog", +"doc":[ +"Conversation from history",{"type":"reference","argument":"peer","category":"full","description":" Peer of conversation"},{"type":"reference","argument":"unreadCount","category":"full","description":" plain messages unread messages count"},{"type":"reference","argument":"sortDate","category":"full","description":" date of conversation for sorting"},{"type":"reference","argument":"senderUid","category":"full","description":" Sender of top message (may be zero)"},{"type":"reference","argument":"rid","category":"full","description":" Random ID of top message (may be zero)"},{"type":"reference","argument":"date","category":"full","description":" Date of top message (can't be zero)"},{"type":"reference","argument":"message","category":"full","description":" Content of message"},{"type":"reference","argument":"firstUnreadDate","category":"full","description":" Date of first unread message"},{"type":"reference","argument":"attributes","category":"full","description":" Optional top message attributes"}],"attributes":[ +{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"} +,{"type":"int32","id":3,"name":"unreadCount"} +,{"type":{"type":"alias","childType":"date"},"id":4,"name":"sortDate"} +,{"type":{"type":"alias","childType":"userId"},"id":5,"name":"senderUid"} +,{"type":{"type":"alias","childType":"randomId"},"id":6,"name":"rid"} +,{"type":{"type":"alias","childType":"date"},"id":7,"name":"date"} +,{"type":{"type":"trait","childType":"Message"},"id":8,"name":"message"} +,{"type":{"type":"opt","childType":{"type":"enum","childType":"MessageState"}},"id":9,"name":"state"} +,{"type":{"type":"opt","childType":{"type":"alias","childType":"date"}},"id":10,"name":"firstUnreadDate"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"MessageAttributes"}},"id":11,"name":"attributes"} +]}},{"type":"rpc","content":{ +"name":"LoadDialogs", +"header":104, +"response":{"type":"anonymous","header":105, "doc":[ +"Loaded dialogs",{"type":"reference","argument":"groups","category":"compact","description":" Loaded groups"},{"type":"reference","argument":"users","category":"compact","description":" Loaded users"},{"type":"reference","argument":"dialogs","category":"compact","description":" Loaded dialogs"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"Group"}},"id":1,"name":"groups"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":2,"name":"users"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"Dialog"}},"id":3,"name":"dialogs"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":4,"name":"userPeers"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"GroupOutPeer"}},"id":5,"name":"groupPeers"} +]}, +"doc":[ +"Loading conversation history",{"type":"reference","argument":"minDate","category":"full","description":"start date of conversation loading. Use 0 to load latest messages"},{"type":"reference","argument":"limit","category":"full","description":"limit maximum amount of messages (max is 100)"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled optimizations"}],"attributes":[ +{"type":{"type":"alias","childType":"date"},"id":1,"name":"minDate"} +,{"type":"int32","id":2,"name":"limit"} +,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":3,"name":"optimizations"} +]}},{"type":"rpc","content":{ +"name":"LoadArchived", +"header":2651, +"response":{"type":"anonymous","header":2652, "doc":[ +"Archived dialogs",{"type":"reference","argument":"groups","category":"full","description":" Referenced groups"},{"type":"reference","argument":"users","category":"full","description":" Referenced users"},{"type":"reference","argument":"dialogs","category":"full","description":" Archived dialogs"},{"type":"reference","argument":"nextOffset","category":"compact","description":" Offset for next bunch"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"Group"}},"id":1,"name":"groups"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":2,"name":"users"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"Dialog"}},"id":3,"name":"dialogs"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":5,"name":"userPeers"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"GroupOutPeer"}},"id":6,"name":"groupPeers"} +,{"type":{"type":"opt","childType":"bytes"},"id":4,"name":"nextOffset"} +]}, +"doc":[ +"Loading archived messages",{"type":"reference","argument":"nextOffset","category":"compact","description":"Optional next offset"},{"type":"reference","argument":"limit","category":"full","description":"Maximum number of elements"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled optimizations"}],"attributes":[ +{"type":{"type":"opt","childType":"bytes"},"id":1,"name":"nextOffset"} +,{"type":"int32","id":2,"name":"limit"} +,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":3,"name":"optimizations"} +]}},{"type":"rpc","content":{ +"name":"LoadGroupedDialogs", +"header":225, +"response":{"type":"anonymous","header":226, "doc":[ +"Loaded grouped dialogs",{"type":"reference","argument":"dialogs","category":"compact","description":" Loaded groups of dialogs"},{"type":"reference","argument":"users","category":"compact","description":" Loaded users"},{"type":"reference","argument":"groups","category":"full","description":" Loaded groups"},{"type":"reference","argument":"showArchived","category":"full","description":" Show archived section"},{"type":"reference","argument":"showInvite","category":"full","description":" Show invite message"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"DialogGroup"}},"id":1,"name":"dialogs"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":2,"name":"users"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"Group"}},"id":3,"name":"groups"} +,{"type":{"type":"opt","childType":"bool"},"id":4,"name":"showArchived"} +,{"type":{"type":"opt","childType":"bool"},"id":5,"name":"showInvite"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":6,"name":"userPeers"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"GroupOutPeer"}},"id":7,"name":"groupPeers"} +]}, +"doc":[ +"Load all dialogs from grouped list"],"attributes":[ +{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":1,"name":"optimizations"} +]}},{"type":"response","content":{ +"name":"DialogsOrder", +"header":235, +"doc":[ +"Dialogs order response",{"type":"reference","argument":"seq","category":"full","description":" update seq"},{"type":"reference","argument":"state","category":"full","description":" update state"},{"type":"reference","argument":"groups","category":"full","description":" Update groups"}],"attributes":[ +{"type":"int32","id":1,"name":"seq"} +,{"type":{"type":"alias","childType":"seq_state"},"id":2,"name":"state"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"DialogGroup"}},"id":3,"name":"groups"} +]}},{"type":"rpc","content":{ +"name":"HideDialog", +"header":231, +"response":{"type":"reference","name":"DialogsOrder"}, +"doc":[ +"Hide Dialog from grouped list",{"type":"reference","argument":"peer","category":"full","description":"Dialog peer"}],"attributes":[ +{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"} +]}},{"type":"rpc","content":{ +"name":"ShowDialog", +"header":232, +"response":{"type":"reference","name":"DialogsOrder"}, +"doc":[ +"Show Dialog in grouped list"],"attributes":[ +{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"} +]}},{"type":"rpc","content":{ +"name":"FavouriteDialog", +"header":224, +"response":{"type":"reference","name":"DialogsOrder"}, +"doc":[ +"Marking dialog as favourite",{"type":"reference","argument":"peer","category":"full","description":"Peer for favouriting"}],"attributes":[ +{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"} +]}},{"type":"rpc","content":{ +"name":"UnfavouriteDialog", +"header":227, +"response":{"type":"reference","name":"DialogsOrder"}, +"doc":[ +"Making dialog as unfavourite",{"type":"reference","argument":"peer","category":"full","description":"Peer for favouriting"}],"attributes":[ +{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"} +]}},{"type":"rpc","content":{ +"name":"NotifyDialogOpened", +"header":2785, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Notifying about dialog open",{"type":"reference","argument":"peer","category":"full","description":"Peer that was opened"}],"attributes":[ +{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"} +]}}]}, { + "title": "Groups", + "package": "groups", + "items": [ +{"type":"comment","content":"Entities"}, { + "type":"struct", + "content": { + "name":"Member", +"doc":[ +"Member information",{"type":"reference","argument":"uid","category":"full","description":" User id"},{"type":"reference","argument":"inviterUid","category":"full","description":" User inviter id"},{"type":"reference","argument":"date","category":"full","description":" Adding date"},{"type":"reference","argument":"isAdmin","category":"full","description":" is member admin of group"}],"expandable":"true","attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":{"type":"alias","childType":"userId"},"id":2,"name":"inviterUid"} +,{"type":"int64","id":3,"name":"date"} +,{"type":{"type":"opt","childType":"bool"},"id":4,"name":"isAdmin"} +]}}, { + "type": "enum", + "content": { + "name": "GroupType", + "values": [ { - "type": "reference", - "argument": "timeZone", - "category": "full", - "description": "TimeZone of device" + "name": "GROUP", + "id": 1 }, { - "type": "reference", - "argument": "preferredLanguages", - "category": "full", - "description": "Preferred languages" + "name": "CHANNEL", + "id": 2 } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "email" - }, + ] + } + }, { + "type": "enum", + "content": { + "name": "GroupPermissions", + "values": [ { - "type": "int32", - "id": 2, - "name": "appId" + "name": "SEND_MESSAGE", + "id": 1 }, { - "type": "string", - "id": 3, - "name": "apiKey" + "name": "CLEAR", + "id": 2 }, { - "type": "bytes", - "id": 4, - "name": "deviceHash" + "name": "LEAVE", + "id": 3 }, { - "type": "string", - "id": 5, - "name": "deviceTitle" + "name": "DELETE", + "id": 4 }, { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 6, - "name": "timeZone" + "name": "JOIN", + "id": 5 }, { - "type": { - "type": "list", - "childType": "string" - }, - "id": 7, - "name": "preferredLanguages" + "name": "VIEW_INFO", + "id": 6 } - ] - } - }, - { - "type": "rpc", + ] + } + }, { + "type": "enum", "content": { - "name": "StartAnonymousAuth", - "header": 198, - "response": { - "type": "reference", - "name": "Auth" - }, - "doc": [ - "Starting Anonymous login", - { - "type": "reference", - "argument": "name", - "category": "full", - "description": "Name of new user" - }, + "name": "GroupFullPermissions", + "values": [ { - "type": "reference", - "argument": "appId", - "category": "hidden", - "description": "Application Id" + "name": "EDIT_INFO", + "id": 1 }, { - "type": "reference", - "argument": "apiKey", - "category": "hidden", - "description": "Application API key" + "name": "VIEW_MEMBERS", + "id": 2 }, { - "type": "reference", - "argument": "deviceHash", - "category": "full", - "description": "Hash of device unique id and app bundle id. Used for autologout users when app is reinstalled" + "name": "INVITE_MEMBERS", + "id": 3 }, { - "type": "reference", - "argument": "deviceTitle", - "category": "full", - "description": "Device Title" + "name": "INVITE_VIA_LINK", + "id": 4 }, { - "type": "reference", - "argument": "timeZone", - "category": "full", - "description": "TimeZone of device" + "name": "CALL", + "id": 5 }, { - "type": "reference", - "argument": "preferredLanguages", - "category": "full", - "description": "Preferred languages" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "name" + "name": "EDIT_ADMIN_SETTINGS", + "id": 6 }, { - "type": "int32", - "id": 2, - "name": "appId" + "name": "VIEW_ADMINS", + "id": 7 }, { - "type": "string", - "id": 3, - "name": "apiKey" + "name": "EDIT_ADMINS", + "id": 8 }, { - "type": "bytes", - "id": 4, - "name": "deviceHash" + "name": "KICK_INVITED", + "id": 9 }, { - "type": "string", - "id": 5, - "name": "deviceTitle" + "name": "KICK_ANYONE", + "id": 10 }, { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 6, - "name": "timeZone" + "name": "EDIT_FOREIGN", + "id": 11 }, { - "type": { - "type": "list", - "childType": "string" - }, - "id": 7, - "name": "preferredLanguages" + "name": "DELETE_FOREIGN", + "id": 12 } - ] - } - }, + ] + } + }, { + "type":"struct", + "content": { + "name":"Group", +"doc":[ +"Group information","","Permissions.","Permissions of this structure is about group messages operation, such as","ability to send messages, clear chat, leave group and so on. This operations","Can be held outside of the Group Info page.","","Default value is ZERO, Opposide iz ONE. If Default is FALSE then ONE == TRUE.","If default is TRUE then ONE == FALSE.","Bits:","0 - canSendMessage. Default is FALSE.","1 - canClear. Default is FALSE.","2 - canLeave. Default is FALSE.","3 - canDelete. Default is FALSE.","4 - canJoin. Default is FALSE.","5 - canViewInfo. Default is FALSE.","",{"type":"reference","argument":"id","category":"full","description":" group id"},{"type":"reference","argument":"accessHash","category":"danger","description":" Access hash of group"},{"type":"reference","argument":"title","category":"full","description":" Title of group"},{"type":"reference","argument":"avatar","category":"compact","description":" Avatar of group"},{"type":"reference","argument":"membersCount","category":"full","description":" Number of members"},{"type":"reference","argument":"isHidden","category":"full","description":" Is group hidden (not showing it in recent list). Default is false."},{"type":"reference","argument":"isMember","category":"full","description":" Is current user a member of a group. Default is true."},{"type":"reference","argument":"groupType","category":"full","description":" Group Type. Used only for displaying information. Default is GROUP."},{"type":"reference","argument":"permissions","category":"full","description":" Permissions of group object"},{"type":"reference","argument":"isDeleted","category":"full","description":" Is this group deleted"},{"type":"reference","argument":"ext","category":"full","description":" Group extension Data"},{"type":"reference","argument":"isAdmin","category":"full","description":" [DEPRECATED] Is current user an admin of a group"},{"type":"reference","argument":"theme","category":"hidden","description":" [DEPRECATED] Theme of group"},{"type":"reference","argument":"about","category":"hidden","description":" [DEPRECATED] About of group"},{"type":"reference","argument":"creatorUid","category":"hidden","description":" [DEPRECATED] Group creator"},{"type":"reference","argument":"members","category":"compact","description":" [DEPRECATED] Members of group"},{"type":"reference","argument":"createDate","category":"full","description":" [DEPRECATED] Date of creation"}],"expandable":"true","attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"id"} +,{"type":"int64","id":2,"name":"accessHash"} +,{"type":"string","id":3,"name":"title"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"Avatar"}},"id":4,"name":"avatar"} +,{"type":{"type":"opt","childType":"int32"},"id":24,"name":"membersCount"} +,{"type":{"type":"opt","childType":"bool"},"id":6,"name":"isMember"} +,{"type":{"type":"opt","childType":"bool"},"id":20,"name":"isHidden"} +,{"type":{"type":"opt","childType":{"type":"enum","childType":"GroupType"}},"id":25,"name":"groupType"} +,{"type":{"type":"opt","childType":"int64"},"id":26,"name":"permissions"} +,{"type":{"type":"opt","childType":"bool"},"id":27,"name":"isDeleted"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"MapValue"}},"id":22,"name":"ext"} +,{"type":{"type":"opt","childType":"bool"},"id":16,"name":"isAdmin", "deprecated":"true"} +,{"type":{"type":"alias","childType":"userId"},"id":8,"name":"creatorUid", "deprecated":"true"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"Member"}},"id":9,"name":"members", "deprecated":"true"} +,{"type":{"type":"alias","childType":"date"},"id":10,"name":"createDate", "deprecated":"true"} +,{"type":{"type":"opt","childType":"string"},"id":17,"name":"theme", "deprecated":"true"} +,{"type":{"type":"opt","childType":"string"},"id":18,"name":"about", "deprecated":"true"} +]}}, { + "type":"struct", + "content": { + "name":"GroupFull", +"doc":[ +"Goup Full information","Permissions.","Idea of Group Full mermissions is about Group Info pages. This permissions","are usefull only when trying to view and update group settings and not related","to chat messages itself.","Default value is ZERO, Opposide iz ONE. If Default is FALSE then ONE == TRUE.","If default is TRUE then ONE == FALSE.","Bits:","0 - canEditInfo. Default is FALSE.","1 - canViewMembers. Default is FALSE.","2 - canInviteMembers. Default is FALSE.","3 - canInviteViaLink. Default is FALSE.","4 - canCall. Default is FALSE.","5 - canEditAdminSettings. Default is FALSE.","6 - canViewAdmins. Default is FALSE.","7 - canEditAdmins. Default is FALSE.","8 - canKickInvited. Default is FALSE.","9 - canKickAnyone. Default is FALSE.","10 - canEditForeign. Default is FALSE.","11 - canDeleteForeign. Default is FALSE.","",{"type":"reference","argument":"id","category":"full","description":" Group Id"},{"type":"reference","argument":"createDate","category":"full","description":" Date created"},{"type":"reference","argument":"ownerUid","category":"full","description":" Optional group owner"},{"type":"reference","argument":"members","category":"full","description":" Group members. Can be empty when isAsyncMembers enabled."},{"type":"reference","argument":"theme","category":"full","description":" Group Theme"},{"type":"reference","argument":"about","category":"full","description":" Group about"},{"type":"reference","argument":"isAsyncMembers","category":"full","description":" Is Members need to be loaded asynchronous. Default is false."},{"type":"reference","argument":"isSharedHistory","category":"full","description":" Is history shared among all users. Default is false."},{"type":"reference","argument":"shortName","category":"full","description":" Group's short name"},{"type":"reference","argument":"permissions","category":"full","description":" Group Permissions"}],"expandable":"true","attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"id"} +,{"type":{"type":"alias","childType":"date"},"id":6,"name":"createDate"} +,{"type":{"type":"opt","childType":{"type":"alias","childType":"userId"}},"id":5,"name":"ownerUid"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"Member"}},"id":12,"name":"members"} +,{"type":{"type":"opt","childType":"string"},"id":2,"name":"theme"} +,{"type":{"type":"opt","childType":"string"},"id":3,"name":"about"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"MapValue"}},"id":7,"name":"ext"} +,{"type":{"type":"opt","childType":"bool"},"id":11,"name":"isAsyncMembers"} +,{"type":{"type":"opt","childType":"bool"},"id":10,"name":"isSharedHistory"} +,{"type":{"type":"opt","childType":"string"},"id":14,"name":"shortName"} +,{"type":{"type":"opt","childType":"int64"},"id":27,"name":"permissions"} +]}},{"type":"rpc","content":{ +"name":"LoadFullGroups", +"header":2782, +"response":{"type":"anonymous","header":2783, "doc":[ +{"type":"reference","argument":"groups","category":"compact","description":" Groups to load"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"GroupFull"}},"id":1,"name":"groups"} +]}, +"doc":[ +"Loading Full Groups",{"type":"reference","argument":"groups","category":"compact","description":"Groups to load"}],"attributes":[ +{"type":{"type":"list","childType":{"type":"struct","childType":"GroupOutPeer"}},"id":1,"name":"groups"} +]}},{"type":"rpc","content":{ +"name":"LoadMembers", +"header":2786, +"response":{"type":"anonymous","header":2787, "doc":[ +{"type":"reference","argument":"users","category":"full","description":" Group members"},{"type":"reference","argument":"next","category":"full","description":" Load more reference"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"Member"}},"id":3,"name":"members"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":1,"name":"users"} +,{"type":{"type":"opt","childType":"bytes"},"id":2,"name":"next"} +]}, +"doc":[ +"Loading group members",{"type":"reference","argument":"group","category":"full","description":"Group peer"},{"type":"reference","argument":"limit","category":"full","description":"Limit members"},{"type":"reference","argument":"next","category":"full","description":"Load more reference"}],"attributes":[ +{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"group"} +,{"type":"int32","id":2,"name":"limit"} +,{"type":{"type":"opt","childType":"bytes"},"id":3,"name":"next"} +]}},{"type":"comment","content":"Update"},{"type":"update","content":{ +"name":"GroupTitleChanged", +"header":2609, +"doc":[ +"Update about title changed",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"title","category":"full","description":" Group Title"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":"string","id":2,"name":"title"} +]}},{"type":"update","content":{ +"name":"GroupAvatarChanged", +"header":2610, +"doc":[ +"Update about avatar changed",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"avatar","category":"full","description":" Group Avatar"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"Avatar"}},"id":2,"name":"avatar"} +]}},{"type":"update","content":{ +"name":"GroupTopicChanged", +"header":2616, +"doc":[ +"Update about topic changed",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"topic","category":"full","description":" Updated topic"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":{"type":"opt","childType":"string"},"id":2,"name":"topic"} +]}},{"type":"update","content":{ +"name":"GroupAboutChanged", +"header":2617, +"doc":[ +"Update about about changed",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"about","category":"full","description":" Updated about"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":{"type":"opt","childType":"string"},"id":2,"name":"about"} +]}},{"type":"update","content":{ +"name":"GroupExtChanged", +"header":2613, +"doc":[ +"Update about ext changed",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"ext","category":"full","description":" Updated ext"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"MapValue"}},"id":2,"name":"ext"} +]}},{"type":"update","content":{ +"name":"GroupFullExtChanged", +"header":2618, +"doc":[ +"Update about full ext changed",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"ext","category":"full","description":" Updated ext"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"MapValue"}},"id":2,"name":"ext"} +]}},{"type":"update","content":{ +"name":"GroupShortNameChanged", +"header":2628, +"doc":[ +"Group's short name changed",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"shortName","category":"full","description":" Group short name"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":{"type":"opt","childType":"string"},"id":2,"name":"shortName"} +]}},{"type":"update","content":{ +"name":"GroupOwnerChanged", +"header":2619, +"doc":[ +"Update about owner changed",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"userId","category":"full","description":" New Owner"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":{"type":"alias","childType":"userId"},"id":2,"name":"userId"} +]}},{"type":"update","content":{ +"name":"GroupHistoryShared", +"header":2620, +"doc":[ +"Update about history shared",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +]}},{"type":"update","content":{ +"name":"GroupDeleted", +"header":2658, +"doc":[ +"Update about group deleted",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +]}},{"type":"update","content":{ +"name":"GroupPermissionsChanged", +"header":2663, +"doc":[ +"Update about group permissions changed",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"permissions","category":"full","description":" New Permissions"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":"int64","id":2,"name":"permissions"} +]}},{"type":"update","content":{ +"name":"GroupFullPermissionsChanged", +"header":2664, +"doc":[ +"Update about Full Group permissions changed",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"permissions","category":"full","description":" New Permissions"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":"int64","id":2,"name":"permissions"} +]}},{"type":"comment","content":" "},{"type":"update","content":{ +"name":"GroupMemberChanged", +"header":2612, +"doc":[ +"Update about membership changed",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"isMember","category":"full","description":" Is current user a member"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":"bool","id":2,"name":"isMember"} +]}},{"type":"update","content":{ +"name":"GroupMembersBecameAsync", +"header":2615, +"doc":[ +"Update about members became async",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +]}},{"type":"update","content":{ +"name":"GroupMembersUpdated", +"header":2614, +"doc":[ +"Update about members updated",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"members","category":"full","description":" Group Members"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"Member"}},"id":2,"name":"members"} +]}},{"type":"update","content":{ +"name":"GroupMemberDiff", +"header":2623, +"doc":[ +"Update about members changed",{"type":"reference","argument":"removedUsers","category":"full","description":" Removed Users"},{"type":"reference","argument":"addedMembers","category":"full","description":" Added members"},{"type":"reference","argument":"membersCount","category":"full","description":" Current Members count"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":{"type":"list","childType":{"type":"alias","childType":"userId"}},"id":2,"name":"removedUsers"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"Member"}},"id":3,"name":"addedMembers"} +,{"type":"int32","id":4,"name":"membersCount"} +]}},{"type":"update","content":{ +"name":"GroupMembersCountChanged", +"header":2622, +"doc":[ +"Update about members count changed",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"membersCount","category":"full","description":" Members count"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":"int32","id":2,"name":"membersCount"} +]}},{"type":"update","content":{ +"name":"GroupMemberAdminChanged", +"header":2627, +"doc":[ +"Update about member admin changed",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"userId","category":"full","description":" User Id"},{"type":"reference","argument":"isAdmin","category":"full","description":" Is Admin flag"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":{"type":"alias","childType":"userId"},"id":2,"name":"userId"} +,{"type":"bool","id":3,"name":"isAdmin"} +]}},{"type":"comment","content":"Actions"},{"type":"rpc","content":{ +"name":"CreateGroup", +"header":230, +"response":{"type":"anonymous","header":216, "doc":[ +"Created group",{"type":"reference","argument":"seq","category":"full","description":" Update Seq"},{"type":"reference","argument":"state","category":"compact","description":" Update state"},{"type":"reference","argument":"group","category":"full","description":" Created group"},{"type":"reference","argument":"users","category":"full","description":" Referenced users"},{"type":"reference","argument":"userPeers","category":"full","description":" Referenced users"},{"type":"reference","argument":"date","category":"full","description":" Group creation date"}] ,"attributes":[{"type":"int32","id":1,"name":"seq"} +,{"type":{"type":"alias","childType":"seq_state"},"id":2,"name":"state"} +,{"type":{"type":"alias","childType":"date"},"id":6,"name":"date"} +,{"type":{"type":"struct","childType":"Group"},"id":3,"name":"group"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":4,"name":"users"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":5,"name":"userPeers"} +]}, +"doc":[ +"Creating group chat",{"type":"reference","argument":"rid","category":"full","description":"Random Id for avoiding double create"},{"type":"reference","argument":"title","category":"full","description":"Group Title"},{"type":"reference","argument":"users","category":"hidden","description":"Members of group"},{"type":"reference","argument":"groupType","category":"full","description":"Group Type"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled Optimizations"}],"attributes":[ +{"type":{"type":"alias","childType":"randomId"},"id":1,"name":"rid"} +,{"type":"string","id":2,"name":"title"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":3,"name":"users"} +,{"type":{"type":"opt","childType":{"type":"enum","childType":"GroupType"}},"id":6,"name":"groupType"} +,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":7,"name":"optimizations"} +]}},{"type":"rpc","content":{ +"name":"EditGroupTitle", +"header":85, +"response":{"type":"reference","name":"SeqDate"}, +"doc":[ +"Changing group title",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"},{"type":"reference","argument":"title","category":"full","description":"new group title"},{"type":"reference","argument":"rid","category":"full","description":"Random Id of operation"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled Optimizations"}],"attributes":[ +{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"} +,{"type":{"type":"alias","childType":"randomId"},"id":4,"name":"rid"} +,{"type":"string","id":3,"name":"title"} +,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":5,"name":"optimizations"} +]}},{"type":"rpc","content":{ +"name":"EditGroupAvatar", +"header":86, +"response":{"type":"anonymous","header":115, "doc":[ +"Updated group avatar",{"type":"reference","argument":"avatar","category":"compact","description":" Changed avatar"},{"type":"reference","argument":"seq","category":"full","description":" Sequence number"},{"type":"reference","argument":"state","category":"compact","description":" Sequence state"},{"type":"reference","argument":"date","category":"full","description":" Avatar change date"}] ,"attributes":[{"type":{"type":"struct","childType":"Avatar"},"id":1,"name":"avatar"} +,{"type":"int32","id":2,"name":"seq"} +,{"type":{"type":"alias","childType":"seq_state"},"id":3,"name":"state"} +,{"type":{"type":"alias","childType":"date"},"id":4,"name":"date"} +]}, +"doc":[ +"Changing group avatar",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"},{"type":"reference","argument":"fileLocation","category":"compact","description":"uploaded file for avatar"},{"type":"reference","argument":"rid","category":"full","description":"Random Id of operation"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled Optimizations"}],"attributes":[ +{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"} +,{"type":{"type":"alias","childType":"randomId"},"id":4,"name":"rid"} +,{"type":{"type":"struct","childType":"FileLocation"},"id":3,"name":"fileLocation"} +,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":5,"name":"optimizations"} +]}},{"type":"rpc","content":{ +"name":"RemoveGroupAvatar", +"header":101, +"response":{"type":"reference","name":"SeqDate"}, +"doc":[ +"Removing group avatar",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"},{"type":"reference","argument":"rid","category":"full","description":"Random Id of operation"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled Optimizations"}],"attributes":[ +{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"} +,{"type":{"type":"alias","childType":"randomId"},"id":4,"name":"rid"} +,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":5,"name":"optimizations"} +]}},{"type":"rpc","content":{ +"name":"EditGroupShortName", +"header":2793, +"response":{"type":"reference","name":"Seq"}, +"doc":[ +"Edit Group Short Name",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"},{"type":"reference","argument":"shortName","category":"full","description":"New group's short name"}],"attributes":[ +{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"} +,{"type":{"type":"opt","childType":"string"},"id":2,"name":"shortName"} +]}},{"type":"rpc","content":{ +"name":"EditGroupTopic", +"header":211, +"response":{"type":"reference","name":"SeqDate"}, +"doc":[ +"Edit group topic",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"},{"type":"reference","argument":"rid","category":"full","description":"Random id of operation"},{"type":"reference","argument":"topic","category":"full","description":"New Topic"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled Optimizations"}],"attributes":[ +{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"} +,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"rid"} +,{"type":{"type":"opt","childType":"string"},"id":3,"name":"topic"} +,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":4,"name":"optimizations"} +]}},{"type":"rpc","content":{ +"name":"EditGroupAbout", +"header":213, +"response":{"type":"reference","name":"SeqDate"}, +"doc":[ +"Edit Group About",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"},{"type":"reference","argument":"rid","category":"full","description":"Random id of operation"},{"type":"reference","argument":"about","category":"full","description":"New About"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled Optimizations"}],"attributes":[ +{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"} +,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"rid"} +,{"type":{"type":"opt","childType":"string"},"id":3,"name":"about"} +,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":5,"name":"optimizations"} +]}},{"type":"rpc","content":{ +"name":"InviteUser", +"header":69, +"response":{"type":"reference","name":"SeqDate"}, +"doc":[ +"Inviting user to group",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"},{"type":"reference","argument":"user","category":"full","description":"Users for invitation"},{"type":"reference","argument":"rid","category":"full","description":"Random Id of operation"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled Optimizations"}],"attributes":[ +{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"} +,{"type":{"type":"alias","childType":"randomId"},"id":4,"name":"rid"} +,{"type":{"type":"struct","childType":"UserOutPeer"},"id":3,"name":"user"} +,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":5,"name":"optimizations"} +]}},{"type":"rpc","content":{ +"name":"LeaveGroup", +"header":70, +"response":{"type":"reference","name":"SeqDate"}, +"doc":[ +"Leaving group",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"},{"type":"reference","argument":"rid","category":"full","description":"Random Id of operation"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled Optimizations"}],"attributes":[ +{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"} +,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"rid"} +,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":3,"name":"optimizations"} +]}},{"type":"rpc","content":{ +"name":"LeaveAndDelete", +"header":2721, +"response":{"type":"reference","name":"Seq"}, +"doc":[ +"Leave group and Delete Chat",{"type":"reference","argument":"groupPeer","category":"full","description":"Group peer"}],"attributes":[ +{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"} +]}},{"type":"rpc","content":{ +"name":"KickUser", +"header":71, +"response":{"type":"reference","name":"SeqDate"}, +"doc":[ +"Kicking user from group",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"},{"type":"reference","argument":"user","category":"full","description":"users for removing"},{"type":"reference","argument":"rid","category":"full","description":"Random Id of operation"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled Optimizations"}],"attributes":[ +{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"} +,{"type":{"type":"alias","childType":"randomId"},"id":4,"name":"rid"} +,{"type":{"type":"struct","childType":"UserOutPeer"},"id":3,"name":"user"} +,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":5,"name":"optimizations"} +]}},{"type":"rpc","content":{ +"name":"JoinGroupByPeer", +"header":2722, +"response":{"type":"reference","name":"Seq"}, +"doc":[ +"Join group by peer",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"}],"attributes":[ +{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"} +]}},{"type":"rpc","content":{ +"name":"JoinGroupByGroupId", +"header":44561, +"response":{"type":"reference","name":"Seq"}, +"doc":[ +"Join group by peer without a necessity of invite",{"type":"reference","argument":"groupId","category":"hidden","description":"Groups peer"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +]}},{"type":"comment","content":"Administration"},{"type":"rpc","content":{ +"name":"MakeUserAdmin", +"header":2784, +"response":{"type":"reference","name":"SeqDate"}, +"doc":[ +"Make user admin",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"},{"type":"reference","argument":"userPeer","category":"full","description":"User's peer"}],"attributes":[ +{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"} +,{"type":{"type":"struct","childType":"UserOutPeer"},"id":2,"name":"userPeer"} +]}},{"type":"rpc","content":{ +"name":"DismissUserAdmin", +"header":2791, +"response":{"type":"reference","name":"Seq"}, +"doc":[ +"Dismissing user admin",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"},{"type":"reference","argument":"userPeer","category":"full","description":"User's peer"}],"attributes":[ +{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"} +,{"type":{"type":"struct","childType":"UserOutPeer"},"id":2,"name":"userPeer"} +]}},{"type":"rpc","content":{ +"name":"TransferOwnership", +"header":2789, +"response":{"type":"reference","name":"SeqDate"}, +"doc":[ +"Transfer ownership of group",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"},{"type":"reference","argument":"newOwner","category":"full","description":"New group's owner"}],"attributes":[ +{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"} +,{"type":{"type":"struct","childType":"UserOutPeer"},"id":2,"name":"newOwner"} +]}}, { + "type":"struct", + "content": { + "name":"AdminSettings", +"doc":[ +"Admin Settings",{"type":"reference","argument":"showAdminsToMembers","category":"full","description":" Show admins in member list"},{"type":"reference","argument":"canMembersInvite","category":"full","description":" Can members of a group invite people"},{"type":"reference","argument":"canMembersEditGroupInfo","category":"full","description":" Can members edit group info"},{"type":"reference","argument":"canAdminsEditGroupInfo","category":"full","description":" Can admins edit group info"},{"type":"reference","argument":"showJoinLeaveMessages","category":"full","description":" Should join and leave messages be visible to members"}],"expandable":"true","attributes":[ +{"type":"bool","id":1,"name":"showAdminsToMembers"} +,{"type":"bool","id":2,"name":"canMembersInvite"} +,{"type":"bool","id":3,"name":"canMembersEditGroupInfo"} +,{"type":"bool","id":4,"name":"canAdminsEditGroupInfo"} +,{"type":"bool","id":5,"name":"showJoinLeaveMessages"} +]}},{"type":"rpc","content":{ +"name":"LoadAdminSettings", +"header":2790, +"response":{"type":"anonymous","header":2794, "doc":[ +"Loaded settings",{"type":"reference","argument":"settings","category":"full","description":" Current group admin settings"}] ,"attributes":[{"type":{"type":"struct","childType":"AdminSettings"},"id":1,"name":"settings"} +]}, +"doc":[ +"Loading administration settings",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"}],"attributes":[ +{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"} +]}},{"type":"rpc","content":{ +"name":"SaveAdminSettings", +"header":2792, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Save administartion settings",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's Peer"},{"type":"reference","argument":"settings","category":"full","description":"Group's settings"}],"attributes":[ +{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"} +,{"type":{"type":"struct","childType":"AdminSettings"},"id":2,"name":"settings"} +]}},{"type":"rpc","content":{ +"name":"DeleteGroup", +"header":2795, +"response":{"type":"reference","name":"Seq"}, +"doc":[ +"Delete Group",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"}],"attributes":[ +{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"} +]}},{"type":"rpc","content":{ +"name":"ShareHistory", +"header":2796, +"response":{"type":"reference","name":"Seq"}, +"doc":[ +"Share History",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"}],"attributes":[ +{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"} +]}},{"type":"comment","content":"Invite"},{"type":"response","content":{ +"name":"InviteUrl", +"header":178, +"doc":[ +"Response for invite url methods"],"attributes":[ +{"type":"string","id":1,"name":"url"} +]}},{"type":"rpc","content":{ +"name":"GetGroupInviteUrl", +"header":177, +"response":{"type":"reference","name":"InviteUrl"}, +"doc":[ +"Building invite url",{"type":"reference","argument":"groupPeer","category":"full","description":"Destination group peer"}],"attributes":[ +{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"} +]}},{"type":"rpc","content":{ +"name":"RevokeInviteUrl", +"header":179, +"response":{"type":"reference","name":"InviteUrl"}, +"doc":[ +"Revoking invite urls",{"type":"reference","argument":"groupPeer","category":"full","description":"Destination group peer"}],"attributes":[ +{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"} +]}},{"type":"rpc","content":{ +"name":"JoinGroup", +"header":180, +"response":{"type":"anonymous","header":181, "doc":[ +{"type":"reference","argument":"group","category":"hidden","description":" Joined group"},{"type":"reference","argument":"users","category":"hidden","description":" Users from members"},{"type":"reference","argument":"userPeers","category":"hidden","description":" User Peers"},{"type":"reference","argument":"rid","category":"full","description":" Random id"},{"type":"reference","argument":"seq","category":"full","description":" Sequence number"},{"type":"reference","argument":"state","category":"hidden","description":" State"},{"type":"reference","argument":"date","category":"full","description":" Date of join"}] ,"attributes":[{"type":{"type":"struct","childType":"Group"},"id":1,"name":"group"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":5,"name":"users"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":7,"name":"userPeers"} +,{"type":{"type":"alias","childType":"randomId"},"id":6,"name":"rid"} +,{"type":"int32","id":2,"name":"seq"} +,{"type":{"type":"alias","childType":"seq_state"},"id":3,"name":"state"} +,{"type":{"type":"alias","childType":"date"},"id":4,"name":"date"} +]}, +"doc":[ +"Join group method",{"type":"reference","argument":"token","category":"full","description":"Url or Token for joining to group"},{"type":"reference","argument":"optimizations","category":"hidden","description":"Enabled Optimizations"}],"attributes":[ +{"type":"string","id":1,"name":"token"} +,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":2,"name":"optimizations"} +]}},{"type":"comment","content":"Obsolete Actions"},{"type":"rpc","content":{ +"name":"CreateGroupObsolete", +"header":65, +"response":{"type":"anonymous","header":66, "doc":[ +"Created group",{"type":"reference","argument":"groupPeer","category":"full","description":" Peer of created group"},{"type":"reference","argument":"seq","category":"full","description":" Sequence number"},{"type":"reference","argument":"state","category":"compact","description":" Sequence state"},{"type":"reference","argument":"users","category":"compact","description":" Members of created group"},{"type":"reference","argument":"date","category":"full","description":" Group creation date"}] ,"attributes":[{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"} +,{"type":"int32","id":3,"name":"seq"} +,{"type":{"type":"alias","childType":"seq_state"},"id":4,"name":"state"} +,{"type":{"type":"list","childType":"int32"},"id":5,"name":"users"} +,{"type":{"type":"alias","childType":"date"},"id":6,"name":"date"} +]}, +"doc":[ +"[OBSOLETE] Creating group chat",{"type":"reference","argument":"rid","category":"full","description":"Random Id for avoiding double create"},{"type":"reference","argument":"title","category":"full","description":"Title of new group"},{"type":"reference","argument":"users","category":"compact","description":"Members of new group"}],"attributes":[ +{"type":{"type":"alias","childType":"randomId"},"id":1,"name":"rid"} +,{"type":"string","id":2,"name":"title"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":3,"name":"users"} +]}},{"type":"rpc","content":{ +"name":"EnterGroupObsolete", +"header":199, +"response":{"type":"anonymous","header":200, "doc":[ +"Joined group",{"type":"reference","argument":"group","category":"full","description":" Joined group"},{"type":"reference","argument":"users","category":"full","description":" Referenced users"},{"type":"reference","argument":"rid","category":"full","description":" Rid of join message"},{"type":"reference","argument":"seq","category":"full","description":" Seq of Update"},{"type":"reference","argument":"state","category":"full","description":" State of Update"},{"type":"reference","argument":"date","category":"full","description":" Date of update"}] ,"attributes":[{"type":{"type":"struct","childType":"Group"},"id":1,"name":"group"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":2,"name":"users"} +,{"type":{"type":"alias","childType":"randomId"},"id":3,"name":"rid"} +,{"type":"int32","id":4,"name":"seq"} +,{"type":{"type":"alias","childType":"seq_state"},"id":5,"name":"state"} +,{"type":{"type":"alias","childType":"date"},"id":6,"name":"date"} +]}, +"doc":[ +"[OBSOLETE] Join random group by peer id",{"type":"reference","argument":"peer","category":"full","description":"Public group peer"}],"attributes":[ +{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"peer"} +]}},{"type":"rpc","content":{ +"name":"MakeUserAdminObsolete", +"header":214, +"response":{"type":"anonymous","header":215, "doc":[ +{"type":"reference","argument":"members","category":"full","description":" new members"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"Member"}},"id":1,"name":"members"} +,{"type":"int32","id":2,"name":"seq"} +,{"type":{"type":"alias","childType":"seq_state"},"id":3,"name":"state"} +]}, +"doc":[ +"[OBSOLETE] Make user admin",{"type":"reference","argument":"groupPeer","category":"full","description":"Group's peer"},{"type":"reference","argument":"userPeer","category":"full","description":"User's peer"}],"attributes":[ +{"type":{"type":"struct","childType":"GroupOutPeer"},"id":1,"name":"groupPeer"} +,{"type":{"type":"struct","childType":"UserOutPeer"},"id":2,"name":"userPeer"} +]}},{"type":"comment","content":"Obsolete Updates"},{"type":"update","content":{ +"name":"GroupInviteObsolete", +"header":36, +"doc":[ +"Update about inviting current user to group",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"inviteUid","category":"full","description":" Inviter UID. If equals to current uid than group created by user."},{"type":"reference","argument":"date","category":"full","description":" Date of creating"},{"type":"reference","argument":"rid","category":"full","description":" Random Id of operation"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":{"type":"alias","childType":"randomId"},"id":9,"name":"rid"} +,{"type":{"type":"alias","childType":"userId"},"id":5,"name":"inviteUid"} +,{"type":{"type":"alias","childType":"date"},"id":8,"name":"date"} +]}},{"type":"update","content":{ +"name":"GroupUserInvitedObsolete", +"header":21, +"doc":[ +"Update about inviting user to group",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"uid","category":"full","description":" Added user ID"},{"type":"reference","argument":"inviterUid","category":"full","description":" Inviter user ID"},{"type":"reference","argument":"date","category":"full","description":" Date of adding user to group"},{"type":"reference","argument":"rid","category":"full","description":" Random Id of operation"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":{"type":"alias","childType":"randomId"},"id":5,"name":"rid"} +,{"type":{"type":"alias","childType":"userId"},"id":2,"name":"uid"} +,{"type":{"type":"alias","childType":"userId"},"id":3,"name":"inviterUid"} +,{"type":{"type":"alias","childType":"date"},"id":4,"name":"date"} +]}},{"type":"update","content":{ +"name":"GroupUserLeaveObsolete", +"header":23, +"doc":[ +"Update about leaving user",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"uid","category":"full","description":" User's ID"},{"type":"reference","argument":"date","category":"full","description":" Date of user leave"},{"type":"reference","argument":"rid","category":"full","description":" Random Id of operation"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":{"type":"alias","childType":"randomId"},"id":4,"name":"rid"} +,{"type":{"type":"alias","childType":"userId"},"id":2,"name":"uid"} +,{"type":{"type":"alias","childType":"date"},"id":3,"name":"date"} +]}},{"type":"update","content":{ +"name":"GroupUserKickObsolete", +"header":24, +"doc":[ +"Update about kicking user",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"uid","category":"full","description":" Kicked user's ID"},{"type":"reference","argument":"kickerUid","category":"full","description":" Kicker user's ID"},{"type":"reference","argument":"date","category":"full","description":" Date of user kick"},{"type":"reference","argument":"rid","category":"full","description":" Random Id of operation"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":{"type":"alias","childType":"randomId"},"id":5,"name":"rid"} +,{"type":{"type":"alias","childType":"userId"},"id":2,"name":"uid"} +,{"type":{"type":"alias","childType":"userId"},"id":3,"name":"kickerUid"} +,{"type":{"type":"alias","childType":"date"},"id":4,"name":"date"} +]}},{"type":"update","content":{ +"name":"GroupMembersUpdateObsolete", +"header":44, +"doc":[ +"Silent group members update",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"members","category":"full","description":" New members list"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"Member"}},"id":2,"name":"members"} +]}},{"type":"update","content":{ +"name":"GroupTitleChangedObsolete", +"header":38, +"doc":[ +"Update about group title change",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"uid","category":"full","description":" Changer UID"},{"type":"reference","argument":"title","category":"full","description":" New Title of group"},{"type":"reference","argument":"date","category":"full","description":" Date of title change"},{"type":"reference","argument":"rid","category":"full","description":" Random Id of operation"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":{"type":"alias","childType":"randomId"},"id":5,"name":"rid"} +,{"type":{"type":"alias","childType":"userId"},"id":2,"name":"uid"} +,{"type":"string","id":3,"name":"title"} +,{"type":{"type":"alias","childType":"date"},"id":4,"name":"date"} +]}},{"type":"update","content":{ +"name":"GroupTopicChangedObsolete", +"header":213, +"doc":[ +"Update about group topic change",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"uid","category":"full","description":" Changer UID"},{"type":"reference","argument":"topic","category":"full","description":" New topic of group"},{"type":"reference","argument":"date","category":"full","description":" Date of theme change"},{"type":"reference","argument":"rid","category":"full","description":" Randomd Id of operation"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"rid"} +,{"type":{"type":"alias","childType":"userId"},"id":3,"name":"uid"} +,{"type":{"type":"opt","childType":"string"},"id":4,"name":"topic"} +,{"type":{"type":"alias","childType":"date"},"id":5,"name":"date"} +]}},{"type":"update","content":{ +"name":"GroupAboutChangedObsolete", +"header":214, +"doc":[ +"Update about group about change",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"about","category":"full","description":" Group about"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":{"type":"opt","childType":"string"},"id":2,"name":"about"} +]}},{"type":"update","content":{ +"name":"GroupAvatarChangedObsolete", +"header":39, +"doc":[ +"Update about group avatar change",{"type":"reference","argument":"groupId","category":"full","description":" Group Id"},{"type":"reference","argument":"uid","category":"full","description":" Avatar changer uid"},{"type":"reference","argument":"avatar","category":"compact","description":" New Avatar. If null then avatar is removed"},{"type":"reference","argument":"date","category":"full","description":" Date of avatar change"},{"type":"reference","argument":"rid","category":"full","description":" Random Id of operation"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":{"type":"alias","childType":"randomId"},"id":5,"name":"rid"} +,{"type":{"type":"alias","childType":"userId"},"id":2,"name":"uid"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"Avatar"}},"id":3,"name":"avatar"} +,{"type":{"type":"alias","childType":"date"},"id":4,"name":"date"} +]}}]}, { + "title": "Stickers", + "package": "stickers", + "doc": [ + "Stickers support in Actor" + ], + "items": [ + { + "type":"struct", + "content": { + "name":"StickerDescriptor", +"doc":[ +"Descriptor of a Sticker",{"type":"reference","argument":"id","category":"full","description":" Sticker unique id"},{"type":"reference","argument":"emoji","category":"full","description":" Emoji code for sticker"},{"type":"reference","argument":"image128","category":"full","description":" Image of sticker 128x128 in WebP format"},{"type":"reference","argument":"image512","category":"full","description":" Image of sticker 512x512 in WebP format"},{"type":"reference","argument":"image256","category":"full","description":" Image of sticker 256x256 in WebP format"}],"expandable":"true","attributes":[ +{"type":"int32","id":1,"name":"id"} +,{"type":{"type":"opt","childType":"string"},"id":2,"name":"emoji"} +,{"type":{"type":"struct","childType":"ImageLocation"},"id":3,"name":"image128"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"ImageLocation"}},"id":4,"name":"image512"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"ImageLocation"}},"id":5,"name":"image256"} +]}}, { + "type":"struct", + "content": { + "name":"StickerCollection", +"doc":[ +"Sticker collection",{"type":"reference","argument":"id","category":"full","description":" Unique id of a collection"},{"type":"reference","argument":"accessHash","category":"full","description":" Access Hash of a collection"},{"type":"reference","argument":"stickers","category":"compact","description":" Sticker list"}],"expandable":"true","attributes":[ +{"type":"int32","id":1,"name":"id"} +,{"type":"int64","id":2,"name":"accessHash"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"StickerDescriptor"}},"id":3,"name":"stickers"} +]}},{"type":"response","content":{ +"name":"StickersReponse", +"header":240, +"doc":[ +"Stickers response",{"type":"reference","argument":"collections","category":"full","description":" Sticker collections"},{"type":"reference","argument":"seq","category":"full","description":" Seq of update"},{"type":"reference","argument":"state","category":"full","description":" State of update"}],"attributes":[ +{"type":{"type":"list","childType":{"type":"struct","childType":"StickerCollection"}},"id":1,"name":"collections"} +,{"type":"int32","id":2,"name":"seq"} +,{"type":{"type":"alias","childType":"seq_state"},"id":3,"name":"state"} +]}},{"type":"rpc","content":{ +"name":"LoadOwnStickers", +"header":238, +"response":{"type":"anonymous","header":239, "doc":[ +"Own Stickers collections",{"type":"reference","argument":"ownStickers","category":"hidden","description":" Own sticker collections"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"StickerCollection"}},"id":1,"name":"ownStickers"} +]}, +"doc":[ +"Loading own stickers"],"attributes":[ +]}},{"type":"update","content":{ +"name":"OwnStickersChanged", +"header":161, +"doc":[ +"Own Stickers changed",{"type":"reference","argument":"collections","category":"compact","description":" New own sticker collections"}],"attributes":[ +{"type":{"type":"list","childType":{"type":"struct","childType":"StickerCollection"}},"id":1,"name":"collections"} +]}},{"type":"update","content":{ +"name":"StickerCollectionsChanged", +"header":164, +"doc":[ +"Sticker collection changed",{"type":"reference","argument":"collections","category":"full","description":" Updated sticker collections"}],"attributes":[ +{"type":{"type":"list","childType":{"type":"struct","childType":"StickerCollection"}},"id":1,"name":"collections"} +]}},{"type":"rpc","content":{ +"name":"AddStickerCollection", +"header":244, +"response":{"type":"reference","name":"StickersReponse"}, +"doc":[ +"Adding sticker collection",{"type":"reference","argument":"id","category":"full","description":"Collection id"},{"type":"reference","argument":"accessHash","category":"full","description":"Collection access hash"}],"attributes":[ +{"type":"int32","id":1,"name":"id"} +,{"type":"int64","id":2,"name":"accessHash"} +]}},{"type":"rpc","content":{ +"name":"RemoveStickerCollection", +"header":245, +"response":{"type":"reference","name":"StickersReponse"}, +"doc":[ +"Removing sticker collection",{"type":"reference","argument":"id","category":"full","description":"Collection id"},{"type":"reference","argument":"accessHash","category":"full","description":"Collection access hash"}],"attributes":[ +{"type":"int32","id":1,"name":"id"} +,{"type":"int64","id":2,"name":"accessHash"} +]}},{"type":"rpc","content":{ +"name":"LoadStickerCollection", +"header":246, +"response":{"type":"anonymous","header":247, "doc":[ +"Loaded collection",{"type":"reference","argument":"collection","category":"full","description":" Collection of stickers"}] ,"attributes":[{"type":{"type":"struct","childType":"StickerCollection"},"id":1,"name":"collection"} +]}, +"doc":[ +"Loading stickers",{"type":"reference","argument":"id","category":"full","description":"Collection id"},{"type":"reference","argument":"accessHash","category":"full","description":"Collection access hash"}],"attributes":[ +{"type":"int32","id":1,"name":"id"} +,{"type":"int64","id":2,"name":"accessHash"} +]}}]}, { + "title": "Search", + "package": "search", + "doc": [ + "Searching API" + ], + "items": [ { - "type": "rpc", + "type": "enum", "content": { - "name": "StartTokenAuth", - "header": 203, - "response": { - "type": "reference", - "name": "Auth" - }, - "doc": [ - "Starting token-based login", + "name": "SearchPeerType", + "values": [ { - "type": "reference", - "argument": "token", - "category": "full", - "description": "Token for authentication" + "name": "Groups", + "id": 1 }, { - "type": "reference", - "argument": "appId", - "category": "hidden", - "description": "Application Id" + "name": "Contacts", + "id": 2 }, { - "type": "reference", - "argument": "apiKey", - "category": "hidden", - "description": "Application API key" - }, + "name": "Public", + "id": 3 + } + ] + } + }, { + "type": "enum", + "content": { + "name": "SearchContentType", + "values": [ { - "type": "reference", - "argument": "deviceHash", - "category": "full", - "description": "Hash of device unique id and app bundle id. Used for autologout users when app is reinstalled" + "name": "Any", + "id": 1 }, { - "type": "reference", - "argument": "deviceTitle", - "category": "full", - "description": "Device Title" - }, - { - "type": "reference", - "argument": "timeZone", - "category": "full", - "description": "TimeZone of device" - }, - { - "type": "reference", - "argument": "preferredLanguages", - "category": "full", - "description": "Preferred languages" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "token" - }, - { - "type": "int32", - "id": 2, - "name": "appId" - }, - { - "type": "string", - "id": 3, - "name": "apiKey" - }, - { - "type": "bytes", - "id": 4, - "name": "deviceHash" - }, - { - "type": "string", - "id": 5, - "name": "deviceTitle" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 6, - "name": "timeZone" - }, - { - "type": { - "type": "list", - "childType": "string" - }, - "id": 7, - "name": "preferredLanguages" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "StartUsernameAuth", - "header": 2571, - "response": { - "type": "anonymous", - "header": 2572, - "doc": [ - "Result of login auth start. If is not registered move to signup.", - { - "type": "reference", - "argument": "transactionHash", - "category": "danger", - "description": " Authentication transaction hash" - }, - { - "type": "reference", - "argument": "isRegistered", - "category": "full", - "description": " If user is registered with this username" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "transactionHash" - }, - { - "type": "bool", - "id": 2, - "name": "isRegistered" - } - ] - }, - "doc": [ - "Starting Login Authentication", - { - "type": "reference", - "argument": "username", - "category": "full", - "description": "Username for signing in" - }, - { - "type": "reference", - "argument": "appId", - "category": "hidden", - "description": "Application id" - }, - { - "type": "reference", - "argument": "apiKey", - "category": "hidden", - "description": "Application API key" - }, - { - "type": "reference", - "argument": "deviceHash", - "category": "full", - "description": "Hash of device unique id and app bundle id. Used for autologout users when app is reinstalled" - }, - { - "type": "reference", - "argument": "deviceTitle", - "category": "full", - "description": "Device Title" - }, - { - "type": "reference", - "argument": "timeZone", - "category": "full", - "description": "Time Zone of device" - }, - { - "type": "reference", - "argument": "preferredLanguages", - "category": "full", - "description": "Preferred languages of device" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "username" - }, - { - "type": "int32", - "id": 2, - "name": "appId" - }, - { - "type": "string", - "id": 3, - "name": "apiKey" - }, - { - "type": "bytes", - "id": 4, - "name": "deviceHash" - }, - { - "type": "string", - "id": 5, - "name": "deviceTitle" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 6, - "name": "timeZone" - }, - { - "type": { - "type": "list", - "childType": "string" - }, - "id": 7, - "name": "preferredLanguages" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "ValidateCode", - "header": 189, - "response": { - "type": "reference", - "name": "Auth" - }, - "doc": [ - "Performing user sign in.", - { - "type": "reference", - "argument": "transactionHash", - "category": "danger", - "description": "Hash of transaction" - }, - { - "type": "reference", - "argument": "code", - "category": "hidden", - "description": "Activation code" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "transactionHash" - }, - { - "type": "string", - "id": 2, - "name": "code" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "ValidatePassword", - "header": 207, - "response": { - "type": "reference", - "name": "Auth" - }, - "doc": [ - "Validation of account password", - { - "type": "reference", - "argument": "transactionHash", - "category": "full", - "description": "Hash of transaction" - }, - { - "type": "reference", - "argument": "password", - "category": "full", - "description": "Password for account" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "transactionHash" - }, - { - "type": "string", - "id": 2, - "name": "password" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "GetOAuth2Params", - "header": 194, - "response": { - "type": "anonymous", - "header": 195, - "doc": [ - { - "type": "reference", - "argument": "authUrl", - "category": "hidden", - "description": " Authentication url" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "authUrl" - } - ] - }, - "doc": [ - "Loading OAuth2 Parameters", - { - "type": "reference", - "argument": "transactionHash", - "category": "danger", - "description": "Hash of transaction" - }, - { - "type": "reference", - "argument": "redirectUrl", - "category": "full", - "description": "Redirect URL for Application" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "transactionHash" - }, - { - "type": "string", - "id": 2, - "name": "redirectUrl" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "CompleteOAuth2", - "header": 196, - "response": { - "type": "reference", - "name": "Auth" - }, - "doc": [ - "Complete OAuth2 Authentication", - { - "type": "reference", - "argument": "transactionHash", - "category": "danger", - "description": "Hash of transaction" - }, - { - "type": "reference", - "argument": "code", - "category": "danger", - "description": "Authentication Code" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "transactionHash" - }, - { - "type": "string", - "id": 2, - "name": "code" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "SignUp", - "header": 190, - "response": { - "type": "reference", - "name": "Auth" - }, - "doc": [ - "Perform user SignUp", - { - "type": "reference", - "argument": "transactionHash", - "category": "danger", - "description": "Hash of transaction" - }, - { - "type": "reference", - "argument": "name", - "category": "full", - "description": "User name" - }, - { - "type": "reference", - "argument": "sex", - "category": "full", - "description": "Optional user sex" - }, - { - "type": "reference", - "argument": "password", - "category": "full", - "description": "Password for password-based accounts" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "transactionHash" - }, - { - "type": "string", - "id": 2, - "name": "name" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "enum", - "childType": "Sex" - } - }, - "id": 3, - "name": "sex" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 4, - "name": "password" - } - ] - } - }, - { - "type": "response", - "content": { - "name": "Auth", - "header": 5, - "doc": [ - "Authentication result", - { - "type": "reference", - "argument": "user", - "category": "compact", - "description": " The authenticated User" - }, - { - "type": "reference", - "argument": "config", - "category": "full", - "description": " Current config of server" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "User" - }, - "id": 2, - "name": "user" - }, - { - "type": { - "type": "struct", - "childType": "Config" - }, - "id": 3, - "name": "config" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "AuthSession", - "doc": [ - "Authentication session", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": " Unuque ID of session" - }, - { - "type": "reference", - "argument": "authHolder", - "category": "full", - "description": " holder of session. 0 - this device, 1 - other." - }, - { - "type": "reference", - "argument": "appId", - "category": "full", - "description": " Application Id (user in SignIn/SignUp)" - }, - { - "type": "reference", - "argument": "appTitle", - "category": "full", - "description": " Title of application" - }, - { - "type": "reference", - "argument": "deviceTitle", - "category": "full", - "description": " Title of device" - }, - { - "type": "reference", - "argument": "authTime", - "category": "full", - "description": " Time of session creating" - }, - { - "type": "reference", - "argument": "authLocation", - "category": "hidden", - "description": " two-letter country code of session create" - }, - { - "type": "reference", - "argument": "latitude", - "category": "hidden", - "description": " optional latitude of auth if available" - }, - { - "type": "reference", - "argument": "longitude", - "category": "hidden", - "description": " optional longitude of auth if available" - } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "id" - }, - { - "type": { - "type": "enum", - "childType": "AuthHolder" - }, - "id": 2, - "name": "authHolder" - }, - { - "type": "int32", - "id": 3, - "name": "appId" - }, - { - "type": "string", - "id": 4, - "name": "appTitle" - }, - { - "type": "string", - "id": 5, - "name": "deviceTitle" - }, - { - "type": "int32", - "id": 6, - "name": "authTime" - }, - { - "type": "string", - "id": 7, - "name": "authLocation" - }, - { - "type": { - "type": "opt", - "childType": "double" - }, - "id": 8, - "name": "latitude" - }, - { - "type": { - "type": "opt", - "childType": "double" - }, - "id": 9, - "name": "longitude" - } - ] - } - }, - { - "type": "enum", - "content": { - "name": "AuthHolder", - "values": [ - { - "name": "ThisDevice", - "id": 1 - }, - { - "name": "OtherDevice", - "id": 2 - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "GetAuthSessions", - "header": 80, - "response": { - "type": "anonymous", - "header": 81, - "doc": [ - "Current Auth sessions", - { - "type": "reference", - "argument": "userAuths", - "category": "compact", - "description": " User authentications" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "AuthSession" - } - }, - "id": 1, - "name": "userAuths" - } - ] - }, - "doc": [ - "Getting of all active user's authentication sessions" - ], - "attributes": [] - } - }, - { - "type": "rpc", - "content": { - "name": "TerminateSession", - "header": 82, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "SignOut on specified user's session", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": "id from AuthItem" - } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "id" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "TerminateAllSessions", - "header": 83, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "SignOut on all exept current sessions" - ], - "attributes": [] - } - }, - { - "type": "rpc", - "content": { - "name": "SignOut", - "header": 84, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "SignOut current session" - ], - "attributes": [] - } - }, - { - "type": "comment", - "content": "OBSOLETE METHODS" - }, - { - "type": "rpc", - "content": { - "name": "SignInObsolete", - "header": 3, - "response": { - "type": "reference", - "name": "Auth" - }, - "doc": [ - "Performing user signin", - { - "type": "reference", - "argument": "phoneNumber", - "category": "danger", - "description": "Phone number in international format" - }, - { - "type": "reference", - "argument": "smsHash", - "category": "danger", - "description": "Code request hash from RequestAuthCode" - }, - { - "type": "reference", - "argument": "smsCode", - "category": "danger", - "description": "Confirmation code from SMS" - }, - { - "type": "reference", - "argument": "deviceHash", - "category": "full", - "description": "Hash of device unique id and app bundle id. Used for autologout users when app is reinstalled" - }, - { - "type": "reference", - "argument": "deviceTitle", - "category": "full", - "description": "Device title like 'Steven's iPhone'" - }, - { - "type": "reference", - "argument": "appId", - "category": "hidden", - "description": "Application ID" - }, - { - "type": "reference", - "argument": "appKey", - "category": "hidden", - "description": "Application API key" - } - ], - "attributes": [ - { - "type": "int64", - "id": 1, - "name": "phoneNumber" - }, - { - "type": "string", - "id": 2, - "name": "smsHash" - }, - { - "type": "string", - "id": 3, - "name": "smsCode" - }, - { - "type": "bytes", - "id": 5, - "name": "deviceHash" - }, - { - "type": "string", - "id": 6, - "name": "deviceTitle" - }, - { - "type": "int32", - "id": 7, - "name": "appId" - }, - { - "type": "string", - "id": 8, - "name": "appKey" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "SignUpObsolete", - "header": 4, - "response": { - "type": "reference", - "name": "Auth" - }, - "doc": [ - "Performing user signup. If user perform signup on already registered user it just override previous", - "profile information", - { - "type": "reference", - "argument": "phoneNumber", - "category": "danger", - "description": "Phone number in international format" - }, - { - "type": "reference", - "argument": "smsHash", - "category": "danger", - "description": "Code request hash from RequestAuthCode" - }, - { - "type": "reference", - "argument": "smsCode", - "category": "danger", - "description": "Confirmation code from SMS" - }, - { - "type": "reference", - "argument": "name", - "category": "full", - "description": "User name" - }, - { - "type": "reference", - "argument": "deviceHash", - "category": "full", - "description": "Hash of device unique id and app bundle id. Used for autologout users when app is reinstalled" - }, - { - "type": "reference", - "argument": "deviceTitle", - "category": "full", - "description": "Device title like 'Steven's iPhone'" - }, - { - "type": "reference", - "argument": "appId", - "category": "hidden", - "description": "Application ID" - }, - { - "type": "reference", - "argument": "appKey", - "category": "hidden", - "description": "pplication API key" - } - ], - "attributes": [ - { - "type": "int64", - "id": 1, - "name": "phoneNumber" - }, - { - "type": "string", - "id": 2, - "name": "smsHash" - }, - { - "type": "string", - "id": 3, - "name": "smsCode" - }, - { - "type": "string", - "id": 4, - "name": "name" - }, - { - "type": "bytes", - "id": 7, - "name": "deviceHash" - }, - { - "type": "string", - "id": 8, - "name": "deviceTitle" - }, - { - "type": "int32", - "id": 9, - "name": "appId" - }, - { - "type": "string", - "id": 10, - "name": "appKey" - }, - { - "type": "bool", - "id": 11, - "name": "isSilent" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "SendAuthCodeObsolete", - "header": 1, - "response": { - "type": "anonymous", - "header": 2, - "doc": [ - "Sms Request response", - { - "type": "reference", - "argument": "smsHash", - "category": "danger", - "description": " Hash of SMS request" - }, - { - "type": "reference", - "argument": "isRegistered", - "category": "full", - "description": " true if user is registered" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "smsHash" - }, - { - "type": "bool", - "id": 2, - "name": "isRegistered" - } - ] - }, - "doc": [ - "Sending SMS with activation code", - { - "type": "reference", - "argument": "phoneNumber", - "category": "full", - "description": "Phone number in international format" - }, - { - "type": "reference", - "argument": "appId", - "category": "hidden", - "description": "Application ID" - }, - { - "type": "reference", - "argument": "apiKey", - "category": "hidden", - "description": "Application API key" - } - ], - "attributes": [ - { - "type": "int64", - "id": 1, - "name": "phoneNumber" - }, - { - "type": "int32", - "id": 2, - "name": "appId" - }, - { - "type": "string", - "id": 3, - "name": "apiKey" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "SendAuthCallObsolete", - "header": 90, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Requesting Phone activation", - { - "type": "reference", - "argument": "phoneNumber", - "category": "full", - "description": "Phone number in international format" - }, - { - "type": "reference", - "argument": "smsHash", - "category": "danger", - "description": "Code request hash from RequestAuthCode" - }, - { - "type": "reference", - "argument": "appId", - "category": "hidden", - "description": "Application ID" - }, - { - "type": "reference", - "argument": "apiKey", - "category": "hidden", - "description": "Application API key" - } - ], - "attributes": [ - { - "type": "int64", - "id": 1, - "name": "phoneNumber" - }, - { - "type": "string", - "id": 2, - "name": "smsHash" - }, - { - "type": "int32", - "id": 3, - "name": "appId" - }, - { - "type": "string", - "id": 4, - "name": "apiKey" - } - ] - } - } - ] - }, - { - "title": "Users", - "package": "users", - "doc": [ - "Users are objects that secured by accessHash. You can't load user profile by it's id.", - "You can't send message to user without finding it's object in Updates or by calling", - "method for user search, contacts import or some other methods.", - "", - "Applications need to keep all Users information forever.", - "", - "Each User have optional localName - name of user that was set by current user and can be changed", - "any time by calling EditUserLocalName method." - ], - "items": [ - { - "type": "enum", - "content": { - "name": "Sex", - "values": [ - { - "name": "Unknown", - "id": 1 - }, - { - "name": "Male", - "id": 2 - }, - { - "name": "Female", - "id": 3 - } - ] - } - }, - { - "type": "enum", - "content": { - "name": "ContactType", - "values": [ - { - "name": "Phone", - "id": 1 - }, - { - "name": "Email", - "id": 2 - }, - { - "name": "Web", - "id": 3 - }, - { - "name": "Social", - "id": 4 - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "ContactRecord", - "doc": [ - "Contact information record", - { - "type": "reference", - "argument": "type", - "category": "full", - "description": " Record type" - }, - { - "type": "reference", - "argument": "typeSpec", - "category": "hidden", - "description": " Value for specification type of contact, for example 'mobile/standalone/office' for phones or 'vk/fb/telegram' for extenrnal networks." - }, - { - "type": "reference", - "argument": "stringValue", - "category": "full", - "description": " String value of record" - }, - { - "type": "reference", - "argument": "longValue", - "category": "full", - "description": " Long value of record" - }, - { - "type": "reference", - "argument": "title", - "category": "full", - "description": " Title of record" - }, - { - "type": "reference", - "argument": "subtitle", - "category": "hidden", - "description": " Subtitle of record" - } - ], - "expandable": "true", - "attributes": [ - { - "type": { - "type": "enum", - "childType": "ContactType" - }, - "id": 1, - "name": "type" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 6, - "name": "typeSpec" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 2, - "name": "stringValue" - }, - { - "type": { - "type": "opt", - "childType": "int64" - }, - "id": 3, - "name": "longValue" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 4, - "name": "title" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 5, - "name": "subtitle" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "User", - "doc": [ - "Main user object", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": " uid" - }, - { - "type": "reference", - "argument": "accessHash", - "category": "danger", - "description": " user's access hash" - }, - { - "type": "reference", - "argument": "name", - "category": "full", - "description": " user's name" - }, - { - "type": "reference", - "argument": "localName", - "category": "full", - "description": " user's local name" - }, - { - "type": "reference", - "argument": "nick", - "category": "full", - "description": " User's nickname" - }, - { - "type": "reference", - "argument": "sex", - "category": "full", - "description": " optional sex of user" - }, - { - "type": "reference", - "argument": "avatar", - "category": "compact", - "description": " avatar of user" - }, - { - "type": "reference", - "argument": "isBot", - "category": "full", - "description": " Is user actually bot. By default is false." - }, - { - "type": "reference", - "argument": "ext", - "category": "full", - "description": " Extension values" - }, - { - "type": "reference", - "argument": "about", - "category": "full", - "description": " [DEPRECATED] User's about information" - }, - { - "type": "reference", - "argument": "contactInfo", - "category": "compact", - "description": " [DEPRECATED] Contact information of user" - }, - { - "type": "reference", - "argument": "preferredLanguages", - "category": "full", - "description": " [DEPRECATED] Preferred user languages" - }, - { - "type": "reference", - "argument": "timeZone", - "category": "full", - "description": " [DEPRECATED] Time Zone of user in TZ format" - }, - { - "type": "reference", - "argument": "botCommands", - "category": "full", - "description": " [DEPRECATED] Available Bot Commands" - } - ], - "expandable": "true", - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "id" - }, - { - "type": "int64", - "id": 2, - "name": "accessHash" - }, - { - "type": "string", - "id": 3, - "name": "name" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 4, - "name": "localName" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 13, - "name": "nick" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "enum", - "childType": "Sex" - } - }, - "id": 5, - "name": "sex" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "Avatar" - } - }, - "id": 8, - "name": "avatar" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 11, - "name": "isBot" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "MapValue" - } - }, - "id": 20, - "name": "ext" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "ContactRecord" - } - }, - "id": 12, - "name": "contactInfo", - "deprecated": "true" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 14, - "name": "about", - "deprecated": "true" - }, - { - "type": { - "type": "list", - "childType": "string" - }, - "id": 16, - "name": "preferredLanguages", - "deprecated": "true" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 17, - "name": "timeZone", - "deprecated": "true" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "BotCommand" - } - }, - "id": 19, - "name": "botCommands", - "deprecated": "true" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "FullUser", - "doc": [ - "Full User representation", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": " User's Id" - }, - { - "type": "reference", - "argument": "contactInfo", - "category": "compact", - "description": " User's contact information" - }, - { - "type": "reference", - "argument": "about", - "category": "full", - "description": " User's about information" - }, - { - "type": "reference", - "argument": "preferredLanguages", - "category": "full", - "description": " Preferred user languages" - }, - { - "type": "reference", - "argument": "timeZone", - "category": "full", - "description": " Time Zone of user in TZ format" - }, - { - "type": "reference", - "argument": "botCommands", - "category": "full", - "description": " Available Commands for Bot" - }, - { - "type": "reference", - "argument": "ext", - "category": "full", - "description": " Extension values. NOTE: This values are not related to ext field in User object." - }, - { - "type": "reference", - "argument": "isBlocked", - "category": "full", - "description": " Is user blocked. Default is false." - } - ], - "expandable": "true", - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "id" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "ContactRecord" - } - }, - "id": 2, - "name": "contactInfo" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 3, - "name": "about" - }, - { - "type": { - "type": "list", - "childType": "string" - }, - "id": 4, - "name": "preferredLanguages" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 5, - "name": "timeZone" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "BotCommand" - } - }, - "id": 6, - "name": "botCommands" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "MapValue" - } - }, - "id": 7, - "name": "ext" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 8, - "name": "isBlocked" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "BotCommand", - "doc": [ - "Available bot commands", - { - "type": "reference", - "argument": "slashCommand", - "category": "full", - "description": " Slash command name (wihtout slash)" - }, - { - "type": "reference", - "argument": "description", - "category": "full", - "description": " Slash command description" - }, - { - "type": "reference", - "argument": "locKey", - "category": "full", - "description": " Optional Localization Key for i18n" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "slashCommand" - }, - { - "type": "string", - "id": 2, - "name": "description" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 3, - "name": "locKey" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "EditUserLocalName", - "header": 96, - "response": { - "type": "reference", - "name": "Seq" - }, - "doc": [ - "Renaming of user's visible name", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": "target User's uid" - }, - { - "type": "reference", - "argument": "accessHash", - "category": "danger", - "description": "User's accessHash" - }, - { - "type": "reference", - "argument": "name", - "category": "full", - "description": "New user name" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": "int64", - "id": 2, - "name": "accessHash" - }, - { - "type": "string", - "id": 3, - "name": "name" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "UserAvatarChanged", - "header": 16, - "doc": [ - "Update about avatar changed", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " user's uid" - }, - { - "type": "reference", - "argument": "avatar", - "category": "compact", - "description": " user's new avatar" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "Avatar" - } - }, - "id": 2, - "name": "avatar" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "UserNameChanged", - "header": 32, - "doc": [ - "Update about name changed", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " user's uid" - }, - { - "type": "reference", - "argument": "name", - "category": "full", - "description": " user's name" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": "string", - "id": 2, - "name": "name" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "UserLocalNameChanged", - "header": 51, - "doc": [ - "Update about local name changed", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " user's uid" - }, - { - "type": "reference", - "argument": "localName", - "category": "full", - "description": " new user's local name" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 2, - "name": "localName" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "UserContactsChanged", - "header": 134, - "doc": [ - "Update about contact information change", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " user's uid" - }, - { - "type": "reference", - "argument": "contactRecords", - "category": "compact", - "description": " new phones list" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "ContactRecord" - } - }, - "id": 4, - "name": "contactRecords" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "UserNickChanged", - "header": 209, - "doc": [ - "Update about nick changed", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " user's uid" - }, - { - "type": "reference", - "argument": "nickname", - "category": "full", - "description": " user's new nickname" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 2, - "name": "nickname" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "UserAboutChanged", - "header": 210, - "doc": [ - "Update about user's about changed", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " User's uid" - }, - { - "type": "reference", - "argument": "about", - "category": "full", - "description": " User's about" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 2, - "name": "about" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "UserPreferredLanguagesChanged", - "header": 212, - "doc": [ - "Update about user's preferred languages", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " User's uid" - }, - { - "type": "reference", - "argument": "preferredLanguages", - "category": "full", - "description": " User's preferred languages. Can be empty." - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": { - "type": "list", - "childType": "string" - }, - "id": 2, - "name": "preferredLanguages" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "UserTimeZoneChanged", - "header": 216, - "doc": [ - "User TimeZone changed", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " User's uid" - }, - { - "type": "reference", - "argument": "timeZone", - "category": "full", - "description": " User's new time zone in TZ format" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 2, - "name": "timeZone" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "UserBotCommandsChanged", - "header": 217, - "doc": [ - "Update about bot commands changed", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " User's Id" - }, - { - "type": "reference", - "argument": "commands", - "category": "full", - "description": " New List of commands" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "BotCommand" - } - }, - "id": 2, - "name": "commands" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "UserExtChanged", - "header": 218, - "doc": [ - "Update about user ext changed", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " User's id" - }, - { - "type": "reference", - "argument": "ext", - "category": "full", - "description": " New Ext Value in User (NOT FullUser) object." - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "MapValue" - } - }, - "id": 2, - "name": "ext" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "UserFullExtChanged", - "header": 219, - "doc": [ - "Update about user ext changed", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " User's Id" - }, - { - "type": "reference", - "argument": "ext", - "category": "full", - "description": " New Ext Value in FullUser (NOT User) object." - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "MapValue" - } - }, - "id": 3, - "name": "ext" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "LoadFullUsers", - "header": 2649, - "response": { - "type": "anonymous", - "header": 2650, - "doc": [ - { - "type": "reference", - "argument": "fullUsers", - "category": "compact", - "description": " Loaded users" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "FullUser" - } - }, - "id": 1, - "name": "fullUsers" - } - ] - }, - "doc": [ - "Loading Full User information", - { - "type": "reference", - "argument": "userPeers", - "category": "compact", - "description": "User's peers to load. Should be non-empy" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "UserOutPeer" - } - }, - "id": 1, - "name": "userPeers" - } - ] - } - } - ] - }, - { - "title": "Profile", - "package": "profile", - "items": [ - { - "type": "rpc", - "content": { - "name": "EditName", - "header": 53, - "response": { - "type": "reference", - "name": "Seq" - }, - "doc": [ - "Changing account's name", - { - "type": "reference", - "argument": "name", - "category": "full", - "description": "New name" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "name" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "EditNickName", - "header": 205, - "response": { - "type": "reference", - "name": "Seq" - }, - "doc": [ - "Changing account's nickname", - { - "type": "reference", - "argument": "nickname", - "category": "full", - "description": "New Nickname" - } - ], - "attributes": [ - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 1, - "name": "nickname" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "CheckNickName", - "header": 206, - "response": { - "type": "reference", - "name": "Bool" - }, - "doc": [ - "Checking availability of nickname", - { - "type": "reference", - "argument": "nickname", - "category": "full", - "description": "Nickname for checking" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "nickname" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "EditAbout", - "header": 212, - "response": { - "type": "reference", - "name": "Seq" - }, - "doc": [ - "Changing about information", - { - "type": "reference", - "argument": "about", - "category": "full", - "description": "new about information" - } - ], - "attributes": [ - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 1, - "name": "about" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "EditAvatar", - "header": 31, - "response": { - "type": "anonymous", - "header": 103, - "doc": [ - "Response for change account avatar", - { - "type": "reference", - "argument": "avatar", - "category": "full", - "description": " New avatar" - }, - { - "type": "reference", - "argument": "seq", - "category": "full", - "description": " Sequence number" - }, - { - "type": "reference", - "argument": "state", - "category": "compact", - "description": " Sequence state" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Avatar" - }, - "id": 1, - "name": "avatar" - }, - { - "type": "int32", - "id": 2, - "name": "seq" - }, - { - "type": { - "type": "alias", - "childType": "seq_state" - }, - "id": 3, - "name": "state" - } - ] - }, - "doc": [ - "Changing account's avatar", - { - "type": "reference", - "argument": "fileLocation", - "category": "compact", - "description": "File Location of uploaded unencrypted avatar" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "FileLocation" - }, - "id": 1, - "name": "fileLocation" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "RemoveAvatar", - "header": 91, - "response": { - "type": "reference", - "name": "Seq" - }, - "doc": [ - "Removing account's avatar" - ], - "attributes": [] - } - }, - { - "type": "rpc", - "content": { - "name": "EditMyTimeZone", - "header": 144, - "response": { - "type": "reference", - "name": "Seq" - }, - "doc": [ - "Updating user's time zone", - { - "type": "reference", - "argument": "tz", - "category": "full", - "description": "New Time Zone" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "tz" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "EditMyPreferredLanguages", - "header": 145, - "response": { - "type": "reference", - "name": "Seq" - }, - "doc": [ - "Changing preffered languages", - { - "type": "reference", - "argument": "preferredLanguages", - "category": "full", - "description": "Preffered Languages" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": "string" - }, - "id": 1, - "name": "preferredLanguages" - } - ] - } - } - ] - }, - { - "title": "Contacts", - "package": "contacts", - "doc": [ - "Before working with contact list is is useful to import contacts from phone first by calling", - "method ImportContacts#0x07.", - "", - "All phone numbers MUST be preprocessed before import by some library (like libphonenumber)", - "and build international phone number depending on current users phone and/or locale.", - "", - "For loading contact list from server use GetContacts#0x57.", - "If during this call there are some updates about contact list change", - "it is recommended to call it again. Also applications need to sync contacts on application start.", - "", - "For searching for users without adding to contacts list use method FindContacts#0x70.", - "", - "For adding/deleting contacts AddContact#0x72 and DeleteContact#0x59." - ], - "items": [ - { - "type": "struct", - "content": { - "name": "PhoneToImport", - "doc": [ - "Phone for import", - { - "type": "reference", - "argument": "phoneNumber", - "category": "full", - "description": " phone number for import in international format" - }, - { - "type": "reference", - "argument": "name", - "category": "full", - "description": " optional name for contact" - } - ], - "attributes": [ - { - "type": "int64", - "id": 1, - "name": "phoneNumber" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 2, - "name": "name" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "EmailToImport", - "doc": [ - "Email for import", - { - "type": "reference", - "argument": "email", - "category": "full", - "description": " email for importing" - }, - { - "type": "reference", - "argument": "name", - "category": "full", - "description": " optional name for contact" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "email" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 2, - "name": "name" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "ImportContacts", - "header": 7, - "response": { - "type": "anonymous", - "header": 8, - "doc": [ - "Imported contacts", - { - "type": "reference", - "argument": "users", - "category": "compact", - "description": " Imported users" - }, - { - "type": "reference", - "argument": "seq", - "category": "full", - "description": " Sequence number if users are imported" - }, - { - "type": "reference", - "argument": "state", - "category": "compact", - "description": " Sequence state if users are imported" - }, - { - "type": "reference", - "argument": "userPeers", - "category": "full", - "description": " Imported user peers" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "User" - } - }, - "id": 1, - "name": "users" - }, - { - "type": "int32", - "id": 2, - "name": "seq" - }, - { - "type": { - "type": "alias", - "childType": "seq_state" - }, - "id": 3, - "name": "state" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "UserOutPeer" - } - }, - "id": 4, - "name": "userPeers" - } - ] - }, - "doc": [ - "Importing phones and emails for building contact list", - "Maximum amount of items for import per method call equals to 100.", - { - "type": "reference", - "argument": "phones", - "category": "compact", - "description": "Phones for import" - }, - { - "type": "reference", - "argument": "emails", - "category": "compact", - "description": "Emails for import" - }, - { - "type": "reference", - "argument": "optimizations", - "category": "full", - "description": "Enabled optimizations" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "PhoneToImport" - } - }, - "id": 1, - "name": "phones" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "EmailToImport" - } - }, - "id": 2, - "name": "emails" - }, - { - "type": { - "type": "list", - "childType": { - "type": "enum", - "childType": "UpdateOptimization" - } - }, - "id": 3, - "name": "optimizations" - } - ] - } - }, - { - "type": "empty" - }, - { - "type": "rpc", - "content": { - "name": "GetContacts", - "header": 87, - "response": { - "type": "anonymous", - "header": 88, - "doc": [ - "Current contact list", - { - "type": "reference", - "argument": "users", - "category": "hidden", - "description": " User list if list is changed" - }, - { - "type": "reference", - "argument": "isNotChanged", - "category": "full", - "description": " is list changed" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "User" - } - }, - "id": 1, - "name": "users" - }, - { - "type": "bool", - "id": 2, - "name": "isNotChanged" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "UserOutPeer" - } - }, - "id": 3, - "name": "userPeers" - } - ] - }, - "doc": [ - "Getting current contact list", - "SHA256 hash of list of a comma-separated list of contact UIDs in ascending", - "order may be passed in contactsHash parameter.", - "If the contact list was not changed, isNotChanged will be true.", - { - "type": "reference", - "argument": "contactsHash", - "category": "full", - "description": "Hash of saved list in application" - }, - { - "type": "reference", - "argument": "optimizations", - "category": "full", - "description": "Enabled optimizations" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "contactsHash" - }, - { - "type": { - "type": "list", - "childType": { - "type": "enum", - "childType": "UpdateOptimization" - } - }, - "id": 2, - "name": "optimizations" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "RemoveContact", - "header": 89, - "response": { - "type": "reference", - "name": "Seq" - }, - "doc": [ - "Removing contact from contact list", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": "Contact's UID" - }, - { - "type": "reference", - "argument": "accessHash", - "category": "danger", - "description": "Contact's AccessHash" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": "int64", - "id": 2, - "name": "accessHash" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "AddContact", - "header": 114, - "response": { - "type": "reference", - "name": "Seq" - }, - "doc": [ - "Adding contact to contact list", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": "Contact's UID" - }, - { - "type": "reference", - "argument": "accessHash", - "category": "danger", - "description": "Contact's AccessHash" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": "int64", - "id": 2, - "name": "accessHash" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "SearchContacts", - "header": 112, - "response": { - "type": "anonymous", - "header": 113, - "doc": [ - "Founded users", - { - "type": "reference", - "argument": "users", - "category": "compact", - "description": " Founded users" - }, - { - "type": "reference", - "argument": "userPeers", - "category": "compact", - "description": " Founded users peers" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "User" - } - }, - "id": 1, - "name": "users" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "UserOutPeer" - } - }, - "id": 2, - "name": "userPeers" - } - ] - }, - "doc": [ - "Searching contacts by user's query", - { - "type": "reference", - "argument": "request", - "category": "full", - "description": "Search query" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "request" - }, - { - "type": { - "type": "list", - "childType": { - "type": "enum", - "childType": "UpdateOptimization" - } - }, - "id": 2, - "name": "optimizations" - } - ] - } - }, - { - "type": "empty" - }, - { - "type": "update", - "content": { - "name": "ContactRegistered", - "header": 5, - "doc": [ - "Update about contact registration", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " contact's uid" - }, - { - "type": "reference", - "argument": "isSilent", - "category": "full", - "description": " is registration silent. If this value is true then don't show notification about registration" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " date of registration" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": "bool", - "id": 2, - "name": "isSilent" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 3, - "name": "date" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 4, - "name": "rid" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "ContactsAdded", - "header": 40, - "doc": [ - "Update about contacts added", - { - "type": "reference", - "argument": "uids", - "category": "compact", - "description": " added contacts" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "alias", - "childType": "userId" - } - }, - "id": 1, - "name": "uids" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "ContactsRemoved", - "header": 41, - "doc": [ - "Update about contacts removed", - { - "type": "reference", - "argument": "uids", - "category": "compact", - "description": " removed contacts" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "alias", - "childType": "userId" - } - }, - "id": 1, - "name": "uids" - } - ] - } - } - ] - }, - { - "title": "Privacy", - "package": "privacy", - "items": [ - { - "type": "rpc", - "content": { - "name": "BlockUser", - "header": 2636, - "response": { - "type": "reference", - "name": "Seq" - }, - "doc": [ - "Block User", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": "Peer for blocking" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "UserOutPeer" - }, - "id": 1, - "name": "peer" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "UnblockUser", - "header": 2637, - "response": { - "type": "reference", - "name": "Seq" - }, - "doc": [ - "Unblock User", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": "Peer for unblocking" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "UserOutPeer" - }, - "id": 1, - "name": "peer" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "LoadBlockedUsers", - "header": 2638, - "response": { - "type": "anonymous", - "header": 2639, - "doc": [ - { - "type": "reference", - "argument": "userPeers", - "category": "full", - "description": " Blocked user peers" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "UserOutPeer" - } - }, - "id": 1, - "name": "userPeers" - } - ] - }, - "doc": [ - "Load Blocked Users" - ], - "attributes": [] - } - }, - { - "type": "update", - "content": { - "name": "UserBlocked", - "header": 2629, - "doc": [ - "Update about User Blocked", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " User Id" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "UserUnblocked", - "header": 2630, - "doc": [ - "Update about User Unblocked", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " User Id" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - } - ] - } - } - ] - }, - { - "title": "Messaging", - "package": "messaging", - "doc": [ - "Actor can work with encrypted and plain messages in one conversation. For both types of messages API", - "contains a bit different methods. Also encrypted and plain messages have different schemes.", - "

Messages

", - "Message entity contains:", - "
    ", - "
  • PeerType - group chat or private
  • ", - "
  • PeerId - group or user id of conversation
  • ", - "
  • RandomId - unique id of message that generated by sender. In Encrypted messages random id is encrypted.
  • ", - "
  • Date - date of message (calculated on server)
  • ", - "
  • Content
  • ", - "
", - "

Message content

", - "Message can be one of three basic types of messages: Text Message, File Message and Service message.", - "All messages can contain extensions. For example we can send text message and add markdown extension with", - "formatted text in markdown and clients that support this extension will show markdown, and that clients that", - "not supported extension then show simple text. File messages can have photo, video or voice extensions.", - "Service message can have extensions extensions such as \"user added\", \"group created\", \"avatar changed\", etc.", - "

Send messages

", - "Sending messages looks same for encrypted and plain messages. Client MUST prepare all required data", - "before sending message (for example FastThumb for photo/video/documents) and call required methods.", - "Encrypted messages differs here only by a little different scheme and encryption.", - "

WRONG_KEYS and incorrect keys

", - "For sending encrypted messages client MUST send messages encrypted for all own and receivers keys.", - "If client send encryption with missing, old or incorrect keys it will receive WRONG_KEYS.", - "In WRONG_KEYS you need to deserialize relatedData from RpcError to WrongKeysErrorData", - "and get detailed information about keys. Sometimes there are some broken keys on server and client can't", - "encrypt messages with it than client MUST send empty encrypted key in request elsewhere API return WRONG_KEYS.", - "

Encrypted messages and New Devices

", - "When you send message to someone and when he registered with new device there are no way to receive old encrypted", - "messages on new device and because of this there are a problem about read/delivery statuses.", - "Alice send messages to Bob, but Bob lose his device and buy new iPhone and installed Actor.", - "Alice receive notification about new device and send another message. Bob open chat with Alice and", - "send read status with maximum message read date. Alice will mark all sent messages as read and one that", - "was not delivered. We can use status notifications per message, but in VERY heavy conversations it will be", - "a lot of unnecessary traffic. For resolving this small issue we have different ways of message statuses", - "for encrypted and plain messages. Also it is recomended to mark all undelivered messages on new device update as", - "not devered with warring sign.", - "

Message Read and Delivery

", - "There are two different ways for read and delivery statuses for encrypted and plain messages.", - "For encrypted messages used status change by RandomId and for plain messages used by maximum", - "date of read/delivered message." - ], - "items": [ - { - "type": "struct", - "content": { - "name": "MessageAttributes", - "doc": [ - "Message Attributes", - { - "type": "reference", - "argument": "isMentioned", - "category": "full", - "description": " Is mentioned. If set overrides built-in value." - }, - { - "type": "reference", - "argument": "isHighlighted", - "category": "full", - "description": " Is message highlighted. Default is false." - }, - { - "type": "reference", - "argument": "isNotified", - "category": "full", - "description": " Is notified. If set overrides built-in settings." - }, - { - "type": "reference", - "argument": "isOnlyForYou", - "category": "full", - "description": " If this message is only for you. Default is false" - } - ], - "attributes": [ - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 1, - "name": "isMentioned" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 2, - "name": "isHighlighted" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 3, - "name": "isNotified" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 4, - "name": "isOnlyForYou" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "QuotedMessage", - "doc": [ - "Quoted Message", - { - "type": "reference", - "argument": "messageId", - "category": "full", - "description": " Message Id if present" - }, - { - "type": "reference", - "argument": "publicGroupId", - "category": "full", - "description": " Public Group id if present" - }, - { - "type": "reference", - "argument": "senderUserId", - "category": "full", - "description": " Sender of message" - }, - { - "type": "reference", - "argument": "messageDate", - "category": "full", - "description": " Date of message" - }, - { - "type": "reference", - "argument": "quotedMessageContent", - "category": "full", - "description": " Optional Quoted Message Content. Can be empty if messageId is present and message is in current peer." - } - ], - "attributes": [ - { - "type": { - "type": "opt", - "childType": { - "type": "alias", - "childType": "randomId" - } - }, - "id": 1, - "name": "messageId" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "alias", - "childType": "groupId" - } - }, - "id": 2, - "name": "publicGroupId" - }, - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 3, - "name": "senderUserId" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 4, - "name": "messageDate" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "trait", - "childType": "Message" - } - }, - "id": 5, - "name": "quotedMessageContent" - } - ] - } - }, - { - "type": "trait", - "content": { - "isContainer": "true", - "name": "Message", - "attributes": [] - } - }, - { - "type": "struct", - "content": { - "name": "TextMessage", - "doc": [ - "Text message", - { - "type": "reference", - "argument": "text", - "category": "danger", - "description": " the text" - }, - { - "type": "reference", - "argument": "mentions", - "category": "full", - "description": " User mentions in message" - }, - { - "type": "reference", - "argument": "ext", - "category": "full", - "description": " Optional bytes of extension" - } - ], - "trait": { - "name": "Message", - "key": 1 - }, - "expandable": "true", - "attributes": [ - { - "type": "string", - "id": 1, - "name": "text" - }, - { - "type": { - "type": "list", - "childType": { - "type": "alias", - "childType": "userId" - } - }, - "id": 2, - "name": "mentions" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "trait", - "childType": "TextMessageEx" - } - }, - "id": 3, - "name": "ext" - } - ] - } - }, - { - "type": "trait", - "content": { - "isContainer": "true", - "name": "TextMessageEx", - "attributes": [] - } - }, - { - "type": "struct", - "content": { - "name": "TextExMarkdown", - "doc": [ - "Markdown extension", - { - "type": "reference", - "argument": "markdown", - "category": "full", - "description": " Markdown text" - } - ], - "trait": { - "name": "TextMessageEx", - "key": 1 - }, - "expandable": "true", - "attributes": [ - { - "type": "string", - "id": 2, - "name": "markdown" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "TextModernMessage", - "doc": [ - "Modern text message", - { - "type": "reference", - "argument": "text", - "category": "full", - "description": " optional text of message" - }, - { - "type": "reference", - "argument": "senderNameOverride", - "category": "full", - "description": " optional overriding of sender" - }, - { - "type": "reference", - "argument": "senderPhotoOverride", - "category": "full", - "description": " optional overriding sender's photo" - }, - { - "type": "reference", - "argument": "style", - "category": "full", - "description": " optional paragraph style" - }, - { - "type": "reference", - "argument": "attaches", - "category": "full", - "description": " optional Attaches of message" - } - ], - "trait": { - "name": "TextMessageEx", - "key": 2 - }, - "expandable": "true", - "attributes": [ - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 1, - "name": "text" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 2, - "name": "senderNameOverride" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "Avatar" - } - }, - "id": 3, - "name": "senderPhotoOverride" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "ParagraphStyle" - } - }, - "id": 4, - "name": "style" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "TextModernAttach" - } - }, - "id": 5, - "name": "attaches" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "ParagraphStyle", - "doc": [ - "Paragraph style", - { - "type": "reference", - "argument": "showParagraph", - "category": "full", - "description": " Show quote-like paragraph?" - }, - { - "type": "reference", - "argument": "paragraphColor", - "category": "full", - "description": " Override paragraph color" - }, - { - "type": "reference", - "argument": "bgColor", - "category": "full", - "description": " Override background color" - } - ], - "attributes": [ - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 1, - "name": "showParagraph" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "trait", - "childType": "Color" - } - }, - "id": 2, - "name": "paragraphColor" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "trait", - "childType": "Color" - } - }, - "id": 3, - "name": "bgColor" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "TextModernAttach", - "doc": [ - "Attaches to message", - { - "type": "reference", - "argument": "title", - "category": "full", - "description": " Attach of message" - }, - { - "type": "reference", - "argument": "titleUrl", - "category": "full", - "description": " Attach title url" - }, - { - "type": "reference", - "argument": "titleIcon", - "category": "full", - "description": " Attach title icon" - }, - { - "type": "reference", - "argument": "text", - "category": "full", - "description": " Attach text" - }, - { - "type": "reference", - "argument": "style", - "category": "full", - "description": " Attach style" - } - ], - "expandable": "true", - "attributes": [ - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 1, - "name": "title" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 2, - "name": "titleUrl" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "ImageLocation" - } - }, - "id": 3, - "name": "titleIcon" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 4, - "name": "text" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "ParagraphStyle" - } - }, - "id": 5, - "name": "style" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "TextModernField" - } - }, - "id": 6, - "name": "fields" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "TextModernField", - "doc": [ - "Modern message fields", - { - "type": "reference", - "argument": "title", - "category": "full", - "description": " Field title" - }, - { - "type": "reference", - "argument": "value", - "category": "full", - "description": " Field value" - }, - { - "type": "reference", - "argument": "isShort", - "category": "full", - "description": " Is field can be shown in compact way (default is TRUE)" - } - ], - "expandable": "true", - "attributes": [ - { - "type": "string", - "id": 1, - "name": "title" - }, - { - "type": "string", - "id": 2, - "name": "value" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 3, - "name": "isShort" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "TextCommand", - "doc": [ - "Text Command Message for bots", - { - "type": "reference", - "argument": "command", - "category": "full", - "description": " Slash-Command For execution" - }, - { - "type": "reference", - "argument": "args", - "category": "full", - "description": " Arguments of slash command" - } - ], - "trait": { - "name": "TextMessageEx", - "key": 3 - }, - "expandable": "true", - "attributes": [ - { - "type": "string", - "id": 1, - "name": "command" - }, - { - "type": "string", - "id": 2, - "name": "args" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "ServiceMessage", - "doc": [ - "Service message", - { - "type": "reference", - "argument": "text", - "category": "full", - "description": " service message text" - }, - { - "type": "reference", - "argument": "ext", - "category": "compact", - "description": " Extension" - } - ], - "trait": { - "name": "Message", - "key": 2 - }, - "expandable": "true", - "attributes": [ - { - "type": "string", - "id": 1, - "name": "text" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "trait", - "childType": "ServiceEx" - } - }, - "id": 3, - "name": "ext" - } - ] - } - }, - { - "type": "trait", - "content": { - "isContainer": "true", - "name": "ServiceEx", - "attributes": [] - } - }, - { - "type": "struct", - "content": { - "name": "ServiceExUserInvited", - "doc": [ - "Service message about adding user to group", - { - "type": "reference", - "argument": "invitedUid", - "category": "full", - "description": " added user id" - } - ], - "trait": { - "name": "ServiceEx", - "key": 1 - }, - "expandable": "true", - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "invitedUid" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "ServiceExUserJoined", - "doc": [ - "Service message about user join to group" - ], - "trait": { - "name": "ServiceEx", - "key": 17 - }, - "expandable": "true", - "attributes": [] - } - }, - { - "type": "struct", - "content": { - "name": "ServiceExUserKicked", - "doc": [ - "Service message about kicking user from group", - { - "type": "reference", - "argument": "kickedUid", - "category": "full", - "description": " kicked user id" - } - ], - "trait": { - "name": "ServiceEx", - "key": 2 - }, - "expandable": "true", - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "kickedUid" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "ServiceExUserLeft", - "doc": [ - "Service message about user left group" - ], - "trait": { - "name": "ServiceEx", - "key": 3 - }, - "expandable": "true", - "attributes": [] - } - }, - { - "type": "struct", - "content": { - "name": "ServiceExGroupCreated", - "doc": [ - "Service message about group creating" - ], - "trait": { - "name": "ServiceEx", - "key": 4 - }, - "expandable": "true", - "attributes": [] - } - }, - { - "type": "struct", - "content": { - "name": "ServiceExChangedTitle", - "doc": [ - "Service message about group title change", - { - "type": "reference", - "argument": "title", - "category": "full", - "description": " New group title" - } - ], - "trait": { - "name": "ServiceEx", - "key": 5 - }, - "expandable": "true", - "attributes": [ - { - "type": "string", - "id": 1, - "name": "title" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "ServiceExChangedTopic", - "doc": [ - "Service message on group topic change", - { - "type": "reference", - "argument": "topic", - "category": "full", - "description": " New group topic" - } - ], - "trait": { - "name": "ServiceEx", - "key": 18 - }, - "expandable": "true", - "attributes": [ - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 1, - "name": "topic" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "ServiceExChangedAbout", - "doc": [ - "Service message on group about change", - { - "type": "reference", - "argument": "about", - "category": "full", - "description": " New group about" - } - ], - "trait": { - "name": "ServiceEx", - "key": 19 - }, - "expandable": "true", - "attributes": [ - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 1, - "name": "about" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "ServiceExChangedAvatar", - "doc": [ - "Service message about avatar change", - { - "type": "reference", - "argument": "avatar", - "category": "compact", - "description": " Updated avatar" - } - ], - "trait": { - "name": "ServiceEx", - "key": 6 - }, - "expandable": "true", - "attributes": [ - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "Avatar" - } - }, - "id": 1, - "name": "avatar" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "ServiceExContactRegistered", - "doc": [ - "Service message about user registration", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " User Id" - } - ], - "trait": { - "name": "ServiceEx", - "key": 8 - }, - "expandable": "true", - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "ServiceExPhoneMissed", - "doc": [ - "Update about missing phone call" - ], - "trait": { - "name": "ServiceEx", - "key": 9 - }, - "expandable": "true", - "attributes": [] - } - }, - { - "type": "struct", - "content": { - "name": "ServiceExPhoneCall", - "doc": [ - "Update about phone call", - { - "type": "reference", - "argument": "duration", - "category": "full", - "description": " Duration of a phone call" - } - ], - "trait": { - "name": "ServiceEx", - "key": 16 - }, - "expandable": "true", - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "duration" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "ServiceExChatArchived", - "doc": [ - "Message about chat archived" - ], - "trait": { - "name": "ServiceEx", - "key": 20 - }, - "expandable": "true", - "attributes": [] - } - }, - { - "type": "struct", - "content": { - "name": "ServiceExChatRestored", - "doc": [ - "Message about chat restored" - ], - "trait": { - "name": "ServiceEx", - "key": 21 - }, - "expandable": "true", - "attributes": [] - } - }, - { - "type": "struct", - "content": { - "name": "DocumentMessage", - "doc": [ - "File message", - { - "type": "reference", - "argument": "fileId", - "category": "full", - "description": " file id" - }, - { - "type": "reference", - "argument": "accessHash", - "category": "danger", - "description": " file access hash" - }, - { - "type": "reference", - "argument": "fileSize", - "category": "full", - "description": " file size" - }, - { - "type": "reference", - "argument": "name", - "category": "full", - "description": " name of file" - }, - { - "type": "reference", - "argument": "mimeType", - "category": "full", - "description": " mimetype of file" - }, - { - "type": "reference", - "argument": "thumb", - "category": "compact", - "description": " optional thumb of file. JPEG less that 90x90 with 60-70 quality." - }, - { - "type": "reference", - "argument": "ext", - "category": "compact", - "description": " Extension" - } - ], - "trait": { - "name": "Message", - "key": 3 - }, - "expandable": "true", - "attributes": [ - { - "type": "int64", - "id": 1, - "name": "fileId" - }, - { - "type": "int64", - "id": 2, - "name": "accessHash" - }, - { - "type": "int32", - "id": 3, - "name": "fileSize" - }, - { - "type": "string", - "id": 4, - "name": "name" - }, - { - "type": "string", - "id": 5, - "name": "mimeType" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "FastThumb" - } - }, - "id": 6, - "name": "thumb" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "trait", - "childType": "DocumentEx" - } - }, - "id": 8, - "name": "ext" - } - ] - } - }, - { - "type": "trait", - "content": { - "isContainer": "true", - "name": "DocumentEx", - "attributes": [] - } - }, - { - "type": "struct", - "content": { - "name": "DocumentExPhoto", - "doc": [ - "File photo extension. Can be set ONLY for JPEG.", - { - "type": "reference", - "argument": "w", - "category": "full", - "description": " image width" - }, - { - "type": "reference", - "argument": "h", - "category": "full", - "description": " image height" - } - ], - "trait": { - "name": "DocumentEx", - "key": 1 - }, - "expandable": "true", - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "w" - }, - { - "type": "int32", - "id": 2, - "name": "h" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "DocumentExVideo", - "doc": [ - "File video extension", - { - "type": "reference", - "argument": "w", - "category": "full", - "description": " video width" - }, - { - "type": "reference", - "argument": "h", - "category": "full", - "description": " video height" - }, - { - "type": "reference", - "argument": "duration", - "category": "full", - "description": " video duration" - } - ], - "trait": { - "name": "DocumentEx", - "key": 2 - }, - "expandable": "true", - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "w" - }, - { - "type": "int32", - "id": 2, - "name": "h" - }, - { - "type": "int32", - "id": 3, - "name": "duration" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "DocumentExVoice", - "doc": [ - "File voice extension", - { - "type": "reference", - "argument": "duration", - "category": "full", - "description": " voice duration" - } - ], - "trait": { - "name": "DocumentEx", - "key": 3 - }, - "expandable": "true", - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "duration" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "DocumentExAnimation", - "doc": [ - "Animation extension. Can be set ONLY for GIF.", - { - "type": "reference", - "argument": "w", - "category": "full", - "description": " Animation width" - }, - { - "type": "reference", - "argument": "h", - "category": "full", - "description": " Animation height" - } - ], - "trait": { - "name": "DocumentEx", - "key": 6 - }, - "expandable": "true", - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "w" - }, - { - "type": "int32", - "id": 2, - "name": "h" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "DocumentExAnimationVid", - "doc": [ - "Animation video extension. More compact version of Animation with video codec instead of GIF.", - "Can be set ONLY for MP4.", - { - "type": "reference", - "argument": "w", - "category": "full", - "description": " Animation width" - }, - { - "type": "reference", - "argument": "h", - "category": "full", - "description": " Animation height" - }, - { - "type": "reference", - "argument": "duration", - "category": "full", - "description": " Animation duration" - } - ], - "trait": { - "name": "DocumentEx", - "key": 7 - }, - "expandable": "true", - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "w" - }, - { - "type": "int32", - "id": 2, - "name": "h" - }, - { - "type": "int32", - "id": 3, - "name": "duration" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "JsonMessage", - "doc": [ - "Custom-data JsonMessage", - { - "type": "reference", - "argument": "rawJson", - "category": "danger", - "description": " JSON object" - } - ], - "trait": { - "name": "Message", - "key": 4 - }, - "expandable": "true", - "attributes": [ - { - "type": "string", - "id": 1, - "name": "rawJson" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "UnsupportedMessage", - "doc": [ - "Explicit type for unsupported message" - ], - "trait": { - "name": "Message", - "key": 5 - }, - "expandable": "true", - "attributes": [] - } - }, - { - "type": "struct", - "content": { - "name": "StickerMessage", - "doc": [ - "Sticker message", - { - "type": "reference", - "argument": "stickerId", - "category": "full", - "description": " Optional Unique ID of sticker" - }, - { - "type": "reference", - "argument": "fastPreview", - "category": "full", - "description": " Optional Fast preview of sticker in webp format" - }, - { - "type": "reference", - "argument": "image512", - "category": "full", - "description": " Optional 512x512 sticker image in webp format" - }, - { - "type": "reference", - "argument": "image256", - "category": "full", - "description": " Optional 256x256 sticker image in webp format" - }, - { - "type": "reference", - "argument": "stickerCollectionId", - "category": "full", - "description": " Optional Collection ID" - }, - { - "type": "reference", - "argument": "stickerCollectionAccessHash", - "category": "full", - "description": " Optional Collection Access Hash" - } - ], - "trait": { - "name": "Message", - "key": 6 - }, - "expandable": "true", - "attributes": [ - { - "type": { - "type": "opt", - "childType": "int32" - }, - "id": 1, - "name": "stickerId" - }, - { - "type": { - "type": "opt", - "childType": "bytes" - }, - "id": 2, - "name": "fastPreview" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "ImageLocation" - } - }, - "id": 3, - "name": "image512" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "ImageLocation" - } - }, - "id": 4, - "name": "image256" - }, - { - "type": { - "type": "opt", - "childType": "int32" - }, - "id": 5, - "name": "stickerCollectionId" - }, - { - "type": { - "type": "opt", - "childType": "int64" - }, - "id": 6, - "name": "stickerCollectionAccessHash" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "BinaryMessage", - "doc": [ - "Binary Message. Useful for implementing your own content types", - { - "type": "reference", - "argument": "contentTag", - "category": "full", - "description": " Content Tag" - }, - { - "type": "reference", - "argument": "msg", - "category": "compact", - "description": " Message contents" - } - ], - "trait": { - "name": "Message", - "key": 7 - }, - "expandable": "true", - "attributes": [ - { - "type": "string", - "id": 1, - "name": "contentTag" - }, - { - "type": "bytes", - "id": 2, - "name": "msg" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "EncryptedMessage", - "doc": [ - "Encrypted Message", - { - "type": "reference", - "argument": "box", - "category": "full", - "description": " Encrypted box" - } - ], - "trait": { - "name": "Message", - "key": 8 - }, - "expandable": "true", - "attributes": [ - { - "type": { - "type": "struct", - "childType": "EncryptedBox" - }, - "id": 1, - "name": "box" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "EmptyMessage", - "doc": [ - "Empty Message" - ], - "trait": { - "name": "Message", - "key": 9 - }, - "expandable": "true", - "attributes": [] - } - }, - { - "type": "struct", - "content": { - "name": "DialogShort", - "doc": [ - "Short Dialog from grouped conversation list", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": " Peer of conversation" - }, - { - "type": "reference", - "argument": "counter", - "category": "full", - "description": " Conversation unread count" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " Conversation top message date" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Peer" - }, - "id": 1, - "name": "peer" - }, - { - "type": "int32", - "id": 2, - "name": "counter" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 4, - "name": "date" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "DialogGroup", - "doc": [ - "Grouped dialog list", - { - "type": "reference", - "argument": "title", - "category": "full", - "description": " Title of group" - }, - { - "type": "reference", - "argument": "key", - "category": "full", - "description": " Key of group" - }, - { - "type": "reference", - "argument": "dialogs", - "category": "full", - "description": " Conversations in group" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "title" - }, - { - "type": "string", - "id": 2, - "name": "key" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "DialogShort" - } - }, - "id": 3, - "name": "dialogs" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "MessageReaction", - "doc": [ - "Reaction to message", - { - "type": "reference", - "argument": "users", - "category": "full", - "description": " User's reaction" - }, - { - "type": "reference", - "argument": "code", - "category": "full", - "description": " Reaction EMOJI code" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "alias", - "childType": "userId" - } - }, - "id": 1, - "name": "users" - }, - { - "type": "string", - "id": 2, - "name": "code" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "MessageOutReference", - "doc": [ - "Message Out Reference", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": " Out Peer of message" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": " Message random id" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "OutPeer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 2, - "name": "rid" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "SendMessage", - "header": 92, - "response": { - "type": "reference", - "name": "SeqDate" - }, - "doc": [ - "Sending plain message", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": "Destination peer for message" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": "Message random id (generated on client side)" - }, - { - "type": "reference", - "argument": "message", - "category": "full", - "description": "The message" - }, - { - "type": "reference", - "argument": "isOnlyForUser", - "category": "full", - "description": "If message is shown only for specific user" - }, - { - "type": "reference", - "argument": "quotedMessageReference", - "category": "full", - "description": "Quoted message if present" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "OutPeer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 3, - "name": "rid" - }, - { - "type": { - "type": "trait", - "childType": "Message" - }, - "id": 4, - "name": "message" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "alias", - "childType": "userId" - } - }, - "id": 5, - "name": "isOnlyForUser" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "MessageOutReference" - } - }, - "id": 6, - "name": "quotedMessageReference" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "UpdateMessage", - "header": 2658, - "response": { - "type": "reference", - "name": "SeqDate" - }, - "doc": [ - "Changing Message content", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": "Destination Peer" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": "Message random id" - }, - { - "type": "reference", - "argument": "updatedMessage", - "category": "full", - "description": "Updated Message content" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "OutPeer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 2, - "name": "rid" - }, - { - "type": { - "type": "trait", - "childType": "Message" - }, - "id": 3, - "name": "updatedMessage" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "MessageReceived", - "header": 55, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Confirmation of plain message receive by device", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": "Destination peer" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": "Maximum date of received messages" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "OutPeer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 3, - "name": "date" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "MessageRead", - "header": 57, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Marking plain messages as read", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": "Destination peer" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": "Maximum date of read messages" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "OutPeer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 3, - "name": "date" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "DeleteMessage", - "header": 98, - "response": { - "type": "reference", - "name": "Seq" - }, - "doc": [ - "Deleting messages", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": "Destination peer" - }, - { - "type": "reference", - "argument": "rids", - "category": "full", - "description": "Message random id" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "OutPeer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "list", - "childType": { - "type": "alias", - "childType": "randomId" - } - }, - "id": 3, - "name": "rids" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "ClearChat", - "header": 99, - "response": { - "type": "reference", - "name": "Seq" - }, - "doc": [ - "Clearing of conversation (without removing dialog from dialogs list)", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": "Conversation peer" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "OutPeer" - }, - "id": 1, - "name": "peer" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "DeleteChat", - "header": 100, - "response": { - "type": "reference", - "name": "Seq" - }, - "doc": [ - "Deleting of conversation (also leave group for group conversations)", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": "Conversation peer" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "OutPeer" - }, - "id": 1, - "name": "peer" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "ArchiveChat", - "header": 2654, - "response": { - "type": "reference", - "name": "Seq" - }, - "doc": [ - "Archiving chat", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": "Conversation peer" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "OutPeer" - }, - "id": 1, - "name": "peer" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "MessageSetReaction", - "header": 210, - "response": { - "type": "reference", - "name": "ReactionsResponse" - }, - "doc": [ - "Setting Message reaction", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": "Destination peer" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": "Message random id" - }, - { - "type": "reference", - "argument": "code", - "category": "full", - "description": "Reaction code" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "OutPeer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 2, - "name": "rid" - }, - { - "type": "string", - "id": 3, - "name": "code" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "MessageRemoveReaction", - "header": 220, - "response": { - "type": "reference", - "name": "ReactionsResponse" - }, - "doc": [ - "Removing Message reaction", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": "Destination peer" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": "Message random id" - }, - { - "type": "reference", - "argument": "code", - "category": "full", - "description": "Reaction code" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "OutPeer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 2, - "name": "rid" - }, - { - "type": "string", - "id": 3, - "name": "code" - } - ] - } - }, - { - "type": "response", - "content": { - "name": "ReactionsResponse", - "header": 219, - "doc": [ - "Response for reactions change" - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "seq" - }, - { - "type": { - "type": "alias", - "childType": "seq_state" - }, - "id": 2, - "name": "state" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "MessageReaction" - } - }, - "id": 3, - "name": "reactions" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "Message", - "header": 55, - "doc": [ - "Update about plain message", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": " Destination peer" - }, - { - "type": "reference", - "argument": "senderUid", - "category": "full", - "description": " Sender of message" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " date of message" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": " Rid of message" - }, - { - "type": "reference", - "argument": "message", - "category": "full", - "description": " message content" - }, - { - "type": "reference", - "argument": "attributes", - "category": "full", - "description": " optional message attributes" - }, - { - "type": "reference", - "argument": "quotedMessage", - "category": "full", - "description": " optional quoted message" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Peer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 2, - "name": "senderUid" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 3, - "name": "date" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 4, - "name": "rid" - }, - { - "type": { - "type": "trait", - "childType": "Message" - }, - "id": 5, - "name": "message" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "MessageAttributes" - } - }, - "id": 6, - "name": "attributes" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "QuotedMessage" - } - }, - "id": 7, - "name": "quotedMessage" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "MessageContentChanged", - "header": 162, - "doc": [ - "Update about message change", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": " Destination peer" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": " Rid of message" - }, - { - "type": "reference", - "argument": "message", - "category": "full", - "description": " Message content" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Peer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 2, - "name": "rid" - }, - { - "type": { - "type": "trait", - "childType": "Message" - }, - "id": 3, - "name": "message" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "MessageQuotedChanged", - "header": 169, - "doc": [ - "Update about quoted message changed", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": " Destination peer" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": " Rid of message" - }, - { - "type": "reference", - "argument": "quotedMessage", - "category": "full", - "description": " Quoted Message" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Peer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 2, - "name": "rid" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "QuotedMessage" - } - }, - "id": 3, - "name": "quotedMessage" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "MessageDateChanged", - "header": 163, - "doc": [ - "Update about message date changed", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": " Destination peer" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": " Rid of message" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " Date of message" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Peer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 2, - "name": "rid" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 3, - "name": "date" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "MessageSent", - "header": 4, - "doc": [ - "Update about message sent", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": " Destination peer" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": " Rid of message" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " Date of message" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Peer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 2, - "name": "rid" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 3, - "name": "date" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "MessageReceived", - "header": 54, - "doc": [ - "Update about message received", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": " Destination peer" - }, - { - "type": "reference", - "argument": "startDate", - "category": "full", - "description": " Start date of received message" - }, - { - "type": "reference", - "argument": "receivedDate", - "category": "full", - "description": " Date of receive" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Peer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 2, - "name": "startDate" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 3, - "name": "receivedDate" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "MessageRead", - "header": 19, - "doc": [ - "Update about message read", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": " Destination peer" - }, - { - "type": "reference", - "argument": "startDate", - "category": "full", - "description": " Start date of read message" - }, - { - "type": "reference", - "argument": "readDate", - "category": "full", - "description": " Date of read" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Peer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 2, - "name": "startDate" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 3, - "name": "readDate" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "MessageReadByMe", - "header": 50, - "doc": [ - "Update about message read by me", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": " Destination peer" - }, - { - "type": "reference", - "argument": "startDate", - "category": "full", - "description": " Start date of read message" - }, - { - "type": "reference", - "argument": "unreadCounter", - "category": "full", - "description": " Optional unread counter in conversation" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Peer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 2, - "name": "startDate" - }, - { - "type": { - "type": "opt", - "childType": "int32" - }, - "id": 3, - "name": "unreadCounter" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "MessageDelete", - "header": 46, - "doc": [ - "Update about message delete", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": " Destination peer" - }, - { - "type": "reference", - "argument": "rids", - "category": "full", - "description": " Deleted messages" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Peer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "list", - "childType": { - "type": "alias", - "childType": "randomId" - } - }, - "id": 2, - "name": "rids" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "ChatClear", - "header": 47, - "doc": [ - "Update about chat clear", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": " Destination peer" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Peer" - }, - "id": 1, - "name": "peer" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "ChatDelete", - "header": 48, - "doc": [ - "Update about chat delete", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": " Destination peer" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Peer" - }, - "id": 1, - "name": "peer" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "ChatArchive", - "header": 94, - "doc": [ - "Update about chat archive", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": " Destination peer" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Peer" - }, - "id": 1, - "name": "peer" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "ChatDropCache", - "header": 2690, - "doc": [ - "Update about cache drop", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": " Destination peer" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Peer" - }, - "id": 1, - "name": "peer" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "ChatGroupsChanged", - "header": 1, - "doc": [ - "Update about chat groups changed. Called only when adding, removing and reordering of grouped dialog.", - { - "type": "reference", - "argument": "dialogs", - "category": "compact", - "description": " New dialgos list" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "DialogGroup" - } - }, - "id": 1, - "name": "dialogs" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "ReactionsUpdate", - "header": 222, - "doc": [ - "Update about reactions change", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": " Destination peer" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": " Message random id" - }, - { - "type": "reference", - "argument": "reactions", - "category": "full", - "description": " New Reactions" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Peer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 2, - "name": "rid" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "MessageReaction" - } - }, - "id": 3, - "name": "reactions" - } - ] - } - }, - { - "type": "enum", - "content": { - "name": "MessageState", - "values": [ - { - "name": "Sent", - "id": 1 - }, - { - "name": "Received", - "id": 2 - }, - { - "name": "Read", - "id": 3 - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "MessageContainer", - "doc": [ - "Message from history", - { - "type": "reference", - "argument": "senderUid", - "category": "full", - "description": " Sender of mesasge" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": " Random Id of message" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " Date of message" - }, - { - "type": "reference", - "argument": "message", - "category": "full", - "description": " Content of message" - }, - { - "type": "reference", - "argument": "reactions", - "category": "full", - "description": " Message reactions" - }, - { - "type": "reference", - "argument": "attribute", - "category": "full", - "description": " Optional message attributes" - }, - { - "type": "reference", - "argument": "quotedMessage", - "category": "full", - "description": " Optional quoted Message" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "senderUid" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 2, - "name": "rid" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 3, - "name": "date" - }, - { - "type": { - "type": "trait", - "childType": "Message" - }, - "id": 5, - "name": "message" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "enum", - "childType": "MessageState" - } - }, - "id": 6, - "name": "state" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "MessageReaction" - } - }, - "id": 7, - "name": "reactions" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "MessageAttributes" - } - }, - "id": 8, - "name": "attribute" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "QuotedMessage" - } - }, - "id": 9, - "name": "quotedMessage" - } - ] - } - }, - { - "type": "enum", - "content": { - "name": "ListLoadMode", - "values": [ - { - "name": "Forward", - "id": 1 - }, - { - "name": "Backward", - "id": 2 - }, - { - "name": "Both", - "id": 3 - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "LoadHistory", - "header": 118, - "response": { - "type": "anonymous", - "header": 119, - "doc": [ - "Loaded history", - { - "type": "reference", - "argument": "history", - "category": "compact", - "description": " Messages" - }, - { - "type": "reference", - "argument": "users", - "category": "compact", - "description": " Loaded users" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "MessageContainer" - } - }, - "id": 1, - "name": "history" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "User" - } - }, - "id": 2, - "name": "users" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "UserOutPeer" - } - }, - "id": 4, - "name": "userPeers" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Group" - } - }, - "id": 5, - "name": "groups" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "GroupOutPeer" - } - }, - "id": 6, - "name": "groupPeers" - } - ] - }, - "doc": [ - "Loading history of chat", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": "Peer of conversation" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": "start date of messages for loading or 0 for loading from start" - }, - { - "type": "reference", - "argument": "loadMode", - "category": "full", - "description": "Loading mode: Forward loading, backward or both ways" - }, - { - "type": "reference", - "argument": "limit", - "category": "full", - "description": "maximum amount of messages (max is 100)" - }, - { - "type": "reference", - "argument": "optimizations", - "category": "full", - "description": "Enabled optimizations" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "OutPeer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 3, - "name": "date" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "enum", - "childType": "ListLoadMode" - } - }, - "id": 5, - "name": "loadMode" - }, - { - "type": "int32", - "id": 4, - "name": "limit" - }, - { - "type": { - "type": "list", - "childType": { - "type": "enum", - "childType": "UpdateOptimization" - } - }, - "id": 6, - "name": "optimizations" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "Dialog", - "doc": [ - "Conversation from history", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": " Peer of conversation" - }, - { - "type": "reference", - "argument": "unreadCount", - "category": "full", - "description": " plain messages unread messages count" - }, - { - "type": "reference", - "argument": "sortDate", - "category": "full", - "description": " date of conversation for sorting" - }, - { - "type": "reference", - "argument": "senderUid", - "category": "full", - "description": " Sender of top message (may be zero)" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": " Random ID of top message (may be zero)" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " Date of top message (can't be zero)" - }, - { - "type": "reference", - "argument": "message", - "category": "full", - "description": " Content of message" - }, - { - "type": "reference", - "argument": "firstUnreadDate", - "category": "full", - "description": " Date of first unread message" - }, - { - "type": "reference", - "argument": "attributes", - "category": "full", - "description": " Optional top message attributes" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Peer" - }, - "id": 1, - "name": "peer" - }, - { - "type": "int32", - "id": 3, - "name": "unreadCount" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 4, - "name": "sortDate" - }, - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 5, - "name": "senderUid" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 6, - "name": "rid" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 7, - "name": "date" - }, - { - "type": { - "type": "trait", - "childType": "Message" - }, - "id": 8, - "name": "message" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "enum", - "childType": "MessageState" - } - }, - "id": 9, - "name": "state" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "alias", - "childType": "date" - } - }, - "id": 10, - "name": "firstUnreadDate" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "MessageAttributes" - } - }, - "id": 11, - "name": "attributes" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "LoadDialogs", - "header": 104, - "response": { - "type": "anonymous", - "header": 105, - "doc": [ - "Loaded dialogs", - { - "type": "reference", - "argument": "groups", - "category": "compact", - "description": " Loaded groups" - }, - { - "type": "reference", - "argument": "users", - "category": "compact", - "description": " Loaded users" - }, - { - "type": "reference", - "argument": "dialogs", - "category": "compact", - "description": " Loaded dialogs" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Group" - } - }, - "id": 1, - "name": "groups" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "User" - } - }, - "id": 2, - "name": "users" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Dialog" - } - }, - "id": 3, - "name": "dialogs" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "UserOutPeer" - } - }, - "id": 4, - "name": "userPeers" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "GroupOutPeer" - } - }, - "id": 5, - "name": "groupPeers" - } - ] - }, - "doc": [ - "Loading conversation history", - { - "type": "reference", - "argument": "minDate", - "category": "full", - "description": "start date of conversation loading. Use 0 to load latest messages" - }, - { - "type": "reference", - "argument": "limit", - "category": "full", - "description": "limit maximum amount of messages (max is 100)" - }, - { - "type": "reference", - "argument": "optimizations", - "category": "full", - "description": "Enabled optimizations" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 1, - "name": "minDate" - }, - { - "type": "int32", - "id": 2, - "name": "limit" - }, - { - "type": { - "type": "list", - "childType": { - "type": "enum", - "childType": "UpdateOptimization" - } - }, - "id": 3, - "name": "optimizations" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "LoadArchived", - "header": 2651, - "response": { - "type": "anonymous", - "header": 2652, - "doc": [ - "Archived dialogs", - { - "type": "reference", - "argument": "groups", - "category": "full", - "description": " Referenced groups" - }, - { - "type": "reference", - "argument": "users", - "category": "full", - "description": " Referenced users" - }, - { - "type": "reference", - "argument": "dialogs", - "category": "full", - "description": " Archived dialogs" - }, - { - "type": "reference", - "argument": "nextOffset", - "category": "compact", - "description": " Offset for next bunch" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Group" - } - }, - "id": 1, - "name": "groups" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "User" - } - }, - "id": 2, - "name": "users" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Dialog" - } - }, - "id": 3, - "name": "dialogs" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "UserOutPeer" - } - }, - "id": 5, - "name": "userPeers" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "GroupOutPeer" - } - }, - "id": 6, - "name": "groupPeers" - }, - { - "type": { - "type": "opt", - "childType": "bytes" - }, - "id": 4, - "name": "nextOffset" - } - ] - }, - "doc": [ - "Loading archived messages", - { - "type": "reference", - "argument": "nextOffset", - "category": "compact", - "description": "Optional next offset" - }, - { - "type": "reference", - "argument": "limit", - "category": "full", - "description": "Maximum number of elements" - }, - { - "type": "reference", - "argument": "optimizations", - "category": "full", - "description": "Enabled optimizations" - } - ], - "attributes": [ - { - "type": { - "type": "opt", - "childType": "bytes" - }, - "id": 1, - "name": "nextOffset" - }, - { - "type": "int32", - "id": 2, - "name": "limit" - }, - { - "type": { - "type": "list", - "childType": { - "type": "enum", - "childType": "UpdateOptimization" - } - }, - "id": 3, - "name": "optimizations" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "LoadGroupedDialogs", - "header": 225, - "response": { - "type": "anonymous", - "header": 226, - "doc": [ - "Loaded grouped dialogs", - { - "type": "reference", - "argument": "dialogs", - "category": "compact", - "description": " Loaded groups of dialogs" - }, - { - "type": "reference", - "argument": "users", - "category": "compact", - "description": " Loaded users" - }, - { - "type": "reference", - "argument": "groups", - "category": "full", - "description": " Loaded groups" - }, - { - "type": "reference", - "argument": "showArchived", - "category": "full", - "description": " Show archived section" - }, - { - "type": "reference", - "argument": "showInvite", - "category": "full", - "description": " Show invite message" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "DialogGroup" - } - }, - "id": 1, - "name": "dialogs" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "User" - } - }, - "id": 2, - "name": "users" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Group" - } - }, - "id": 3, - "name": "groups" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 4, - "name": "showArchived" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 5, - "name": "showInvite" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "UserOutPeer" - } - }, - "id": 6, - "name": "userPeers" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "GroupOutPeer" - } - }, - "id": 7, - "name": "groupPeers" - } - ] - }, - "doc": [ - "Load all dialogs from grouped list" - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "enum", - "childType": "UpdateOptimization" - } - }, - "id": 1, - "name": "optimizations" - } - ] - } - }, - { - "type": "response", - "content": { - "name": "DialogsOrder", - "header": 235, - "doc": [ - "Dialogs order response", - { - "type": "reference", - "argument": "seq", - "category": "full", - "description": " update seq" - }, - { - "type": "reference", - "argument": "state", - "category": "full", - "description": " update state" - }, - { - "type": "reference", - "argument": "groups", - "category": "full", - "description": " Update groups" - } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "seq" - }, - { - "type": { - "type": "alias", - "childType": "seq_state" - }, - "id": 2, - "name": "state" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "DialogGroup" - } - }, - "id": 3, - "name": "groups" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "HideDialog", - "header": 231, - "response": { - "type": "reference", - "name": "DialogsOrder" - }, - "doc": [ - "Hide Dialog from grouped list", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": "Dialog peer" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "OutPeer" - }, - "id": 1, - "name": "peer" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "ShowDialog", - "header": 232, - "response": { - "type": "reference", - "name": "DialogsOrder" - }, - "doc": [ - "Show Dialog in grouped list" - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "OutPeer" - }, - "id": 1, - "name": "peer" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "FavouriteDialog", - "header": 224, - "response": { - "type": "reference", - "name": "DialogsOrder" - }, - "doc": [ - "Marking dialog as favourite", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": "Peer for favouriting" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "OutPeer" - }, - "id": 1, - "name": "peer" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "UnfavouriteDialog", - "header": 227, - "response": { - "type": "reference", - "name": "DialogsOrder" - }, - "doc": [ - "Making dialog as unfavourite", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": "Peer for favouriting" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "OutPeer" - }, - "id": 1, - "name": "peer" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "NotifyDialogOpened", - "header": 2785, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Notifying about dialog open", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": "Peer that was opened" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "OutPeer" - }, - "id": 1, - "name": "peer" - } - ] - } - } - ] - }, - { - "title": "Groups", - "package": "groups", - "items": [ - { - "type": "comment", - "content": "Entities" - }, - { - "type": "struct", - "content": { - "name": "Member", - "doc": [ - "Member information", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " User id" - }, - { - "type": "reference", - "argument": "inviterUid", - "category": "full", - "description": " User inviter id" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " Adding date" - }, - { - "type": "reference", - "argument": "isAdmin", - "category": "full", - "description": " is member admin of group" - } - ], - "expandable": "true", - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 2, - "name": "inviterUid" - }, - { - "type": "int64", - "id": 3, - "name": "date" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 4, - "name": "isAdmin" - } - ] - } - }, - { - "type": "enum", - "content": { - "name": "GroupType", - "values": [ - { - "name": "GROUP", - "id": 1 - }, - { - "name": "CHANNEL", - "id": 2 - } - ] - } - }, - { - "type": "enum", - "content": { - "name": "GroupPermissions", - "values": [ - { - "name": "SEND_MESSAGE", - "id": 1 - }, - { - "name": "CLEAR", - "id": 2 - }, - { - "name": "LEAVE", - "id": 3 - }, - { - "name": "DELETE", - "id": 4 - }, - { - "name": "JOIN", - "id": 5 - }, - { - "name": "VIEW_INFO", - "id": 6 - } - ] - } - }, - { - "type": "enum", - "content": { - "name": "GroupFullPermissions", - "values": [ - { - "name": "EDIT_INFO", - "id": 1 - }, - { - "name": "VIEW_MEMBERS", - "id": 2 - }, - { - "name": "INVITE_MEMBERS", - "id": 3 - }, - { - "name": "INVITE_VIA_LINK", - "id": 4 - }, - { - "name": "CALL", - "id": 5 - }, - { - "name": "EDIT_ADMIN_SETTINGS", - "id": 6 - }, - { - "name": "VIEW_ADMINS", - "id": 7 - }, - { - "name": "EDIT_ADMINS", - "id": 8 - }, - { - "name": "KICK_INVITED", - "id": 9 - }, - { - "name": "KICK_ANYONE", - "id": 10 - }, - { - "name": "EDIT_FOREIGN", - "id": 11 - }, - { - "name": "DELETE_FOREIGN", - "id": 12 - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "Group", - "doc": [ - "Group information", - "", - "Permissions.", - "Permissions of this structure is about group messages operation, such as", - "ability to send messages, clear chat, leave group and so on. This operations", - "Can be held outside of the Group Info page.", - "", - "Default value is ZERO, Opposide iz ONE. If Default is FALSE then ONE == TRUE.", - "If default is TRUE then ONE == FALSE.", - "Bits:", - "0 - canSendMessage. Default is FALSE.", - "1 - canClear. Default is FALSE.", - "2 - canLeave. Default is FALSE.", - "3 - canDelete. Default is FALSE.", - "4 - canJoin. Default is FALSE.", - "5 - canViewInfo. Default is FALSE.", - "", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": " group id" - }, - { - "type": "reference", - "argument": "accessHash", - "category": "danger", - "description": " Access hash of group" - }, - { - "type": "reference", - "argument": "title", - "category": "full", - "description": " Title of group" - }, - { - "type": "reference", - "argument": "avatar", - "category": "compact", - "description": " Avatar of group" - }, - { - "type": "reference", - "argument": "membersCount", - "category": "full", - "description": " Number of members" - }, - { - "type": "reference", - "argument": "isHidden", - "category": "full", - "description": " Is group hidden (not showing it in recent list). Default is false." - }, - { - "type": "reference", - "argument": "isMember", - "category": "full", - "description": " Is current user a member of a group. Default is true." - }, - { - "type": "reference", - "argument": "groupType", - "category": "full", - "description": " Group Type. Used only for displaying information. Default is GROUP." - }, - { - "type": "reference", - "argument": "permissions", - "category": "full", - "description": " Permissions of group object" - }, - { - "type": "reference", - "argument": "isDeleted", - "category": "full", - "description": " Is this group deleted" - }, - { - "type": "reference", - "argument": "ext", - "category": "full", - "description": " Group extension Data" - }, - { - "type": "reference", - "argument": "isAdmin", - "category": "full", - "description": " [DEPRECATED] Is current user an admin of a group" - }, - { - "type": "reference", - "argument": "theme", - "category": "hidden", - "description": " [DEPRECATED] Theme of group" - }, - { - "type": "reference", - "argument": "about", - "category": "hidden", - "description": " [DEPRECATED] About of group" - }, - { - "type": "reference", - "argument": "creatorUid", - "category": "hidden", - "description": " [DEPRECATED] Group creator" - }, - { - "type": "reference", - "argument": "members", - "category": "compact", - "description": " [DEPRECATED] Members of group" - }, - { - "type": "reference", - "argument": "createDate", - "category": "full", - "description": " [DEPRECATED] Date of creation" - } - ], - "expandable": "true", - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "id" - }, - { - "type": "int64", - "id": 2, - "name": "accessHash" - }, - { - "type": "string", - "id": 3, - "name": "title" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "Avatar" - } - }, - "id": 4, - "name": "avatar" - }, - { - "type": { - "type": "opt", - "childType": "int32" - }, - "id": 24, - "name": "membersCount" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 6, - "name": "isMember" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 20, - "name": "isHidden" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "enum", - "childType": "GroupType" - } - }, - "id": 25, - "name": "groupType" - }, - { - "type": { - "type": "opt", - "childType": "int64" - }, - "id": 26, - "name": "permissions" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 27, - "name": "isDeleted" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "MapValue" - } - }, - "id": 22, - "name": "ext" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 16, - "name": "isAdmin", - "deprecated": "true" - }, - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 8, - "name": "creatorUid", - "deprecated": "true" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Member" - } - }, - "id": 9, - "name": "members", - "deprecated": "true" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 10, - "name": "createDate", - "deprecated": "true" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 17, - "name": "theme", - "deprecated": "true" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 18, - "name": "about", - "deprecated": "true" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "GroupFull", - "doc": [ - "Goup Full information", - "Permissions.", - "Idea of Group Full mermissions is about Group Info pages. This permissions", - "are usefull only when trying to view and update group settings and not related", - "to chat messages itself.", - "Default value is ZERO, Opposide iz ONE. If Default is FALSE then ONE == TRUE.", - "If default is TRUE then ONE == FALSE.", - "Bits:", - "0 - canEditInfo. Default is FALSE.", - "1 - canViewMembers. Default is FALSE.", - "2 - canInviteMembers. Default is FALSE.", - "3 - canInviteViaLink. Default is FALSE.", - "4 - canCall. Default is FALSE.", - "5 - canEditAdminSettings. Default is FALSE.", - "6 - canViewAdmins. Default is FALSE.", - "7 - canEditAdmins. Default is FALSE.", - "8 - canKickInvited. Default is FALSE.", - "9 - canKickAnyone. Default is FALSE.", - "10 - canEditForeign. Default is FALSE.", - "11 - canDeleteForeign. Default is FALSE.", - "", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": " Group Id" - }, - { - "type": "reference", - "argument": "createDate", - "category": "full", - "description": " Date created" - }, - { - "type": "reference", - "argument": "ownerUid", - "category": "full", - "description": " Optional group owner" - }, - { - "type": "reference", - "argument": "members", - "category": "full", - "description": " Group members. Can be empty when isAsyncMembers enabled." - }, - { - "type": "reference", - "argument": "theme", - "category": "full", - "description": " Group Theme" - }, - { - "type": "reference", - "argument": "about", - "category": "full", - "description": " Group about" - }, - { - "type": "reference", - "argument": "isAsyncMembers", - "category": "full", - "description": " Is Members need to be loaded asynchronous. Default is false." - }, - { - "type": "reference", - "argument": "isSharedHistory", - "category": "full", - "description": " Is history shared among all users. Default is false." - }, - { - "type": "reference", - "argument": "shortName", - "category": "full", - "description": " Group's short name" - }, - { - "type": "reference", - "argument": "permissions", - "category": "full", - "description": " Group Permissions" - } - ], - "expandable": "true", - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "id" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 6, - "name": "createDate" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "alias", - "childType": "userId" - } - }, - "id": 5, - "name": "ownerUid" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Member" - } - }, - "id": 12, - "name": "members" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 2, - "name": "theme" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 3, - "name": "about" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "MapValue" - } - }, - "id": 7, - "name": "ext" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 11, - "name": "isAsyncMembers" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 10, - "name": "isSharedHistory" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 14, - "name": "shortName" - }, - { - "type": { - "type": "opt", - "childType": "int64" - }, - "id": 27, - "name": "permissions" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "LoadFullGroups", - "header": 2782, - "response": { - "type": "anonymous", - "header": 2783, - "doc": [ - { - "type": "reference", - "argument": "groups", - "category": "compact", - "description": " Groups to load" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "GroupFull" - } - }, - "id": 1, - "name": "groups" - } - ] - }, - "doc": [ - "Loading Full Groups", - { - "type": "reference", - "argument": "groups", - "category": "compact", - "description": "Groups to load" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "GroupOutPeer" - } - }, - "id": 1, - "name": "groups" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "LoadMembers", - "header": 2786, - "response": { - "type": "anonymous", - "header": 2787, - "doc": [ - { - "type": "reference", - "argument": "users", - "category": "full", - "description": " Group members" - }, - { - "type": "reference", - "argument": "next", - "category": "full", - "description": " Load more reference" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Member" - } - }, - "id": 3, - "name": "members" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "UserOutPeer" - } - }, - "id": 1, - "name": "users" - }, - { - "type": { - "type": "opt", - "childType": "bytes" - }, - "id": 2, - "name": "next" - } - ] - }, - "doc": [ - "Loading group members", - { - "type": "reference", - "argument": "group", - "category": "full", - "description": "Group peer" - }, - { - "type": "reference", - "argument": "limit", - "category": "full", - "description": "Limit members" - }, - { - "type": "reference", - "argument": "next", - "category": "full", - "description": "Load more reference" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "GroupOutPeer" - }, - "id": 1, - "name": "group" - }, - { - "type": "int32", - "id": 2, - "name": "limit" - }, - { - "type": { - "type": "opt", - "childType": "bytes" - }, - "id": 3, - "name": "next" - } - ] - } - }, - { - "type": "comment", - "content": "Update" - }, - { - "type": "update", - "content": { - "name": "GroupTitleChanged", - "header": 2609, - "doc": [ - "Update about title changed", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - }, - { - "type": "reference", - "argument": "title", - "category": "full", - "description": " Group Title" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - }, - { - "type": "string", - "id": 2, - "name": "title" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "GroupAvatarChanged", - "header": 2610, - "doc": [ - "Update about avatar changed", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - }, - { - "type": "reference", - "argument": "avatar", - "category": "full", - "description": " Group Avatar" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "Avatar" - } - }, - "id": 2, - "name": "avatar" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "GroupTopicChanged", - "header": 2616, - "doc": [ - "Update about topic changed", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - }, - { - "type": "reference", - "argument": "topic", - "category": "full", - "description": " Updated topic" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 2, - "name": "topic" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "GroupAboutChanged", - "header": 2617, - "doc": [ - "Update about about changed", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - }, - { - "type": "reference", - "argument": "about", - "category": "full", - "description": " Updated about" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 2, - "name": "about" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "GroupExtChanged", - "header": 2613, - "doc": [ - "Update about ext changed", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - }, - { - "type": "reference", - "argument": "ext", - "category": "full", - "description": " Updated ext" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "MapValue" - } - }, - "id": 2, - "name": "ext" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "GroupFullExtChanged", - "header": 2618, - "doc": [ - "Update about full ext changed", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - }, - { - "type": "reference", - "argument": "ext", - "category": "full", - "description": " Updated ext" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "MapValue" - } - }, - "id": 2, - "name": "ext" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "GroupShortNameChanged", - "header": 2628, - "doc": [ - "Group's short name changed", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - }, - { - "type": "reference", - "argument": "shortName", - "category": "full", - "description": " Group short name" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 2, - "name": "shortName" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "GroupOwnerChanged", - "header": 2619, - "doc": [ - "Update about owner changed", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - }, - { - "type": "reference", - "argument": "userId", - "category": "full", - "description": " New Owner" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - }, - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 2, - "name": "userId" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "GroupHistoryShared", - "header": 2620, - "doc": [ - "Update about history shared", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "GroupDeleted", - "header": 2658, - "doc": [ - "Update about group deleted", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "GroupPermissionsChanged", - "header": 2663, - "doc": [ - "Update about group permissions changed", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - }, - { - "type": "reference", - "argument": "permissions", - "category": "full", - "description": " New Permissions" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - }, - { - "type": "int64", - "id": 2, - "name": "permissions" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "GroupFullPermissionsChanged", - "header": 2664, - "doc": [ - "Update about Full Group permissions changed", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - }, - { - "type": "reference", - "argument": "permissions", - "category": "full", - "description": " New Permissions" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - }, - { - "type": "int64", - "id": 2, - "name": "permissions" - } - ] - } - }, - { - "type": "comment", - "content": " " - }, - { - "type": "update", - "content": { - "name": "GroupMemberChanged", - "header": 2612, - "doc": [ - "Update about membership changed", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - }, - { - "type": "reference", - "argument": "isMember", - "category": "full", - "description": " Is current user a member" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - }, - { - "type": "bool", - "id": 2, - "name": "isMember" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "GroupMembersBecameAsync", - "header": 2615, - "doc": [ - "Update about members became async", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "GroupMembersUpdated", - "header": 2614, - "doc": [ - "Update about members updated", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - }, - { - "type": "reference", - "argument": "members", - "category": "full", - "description": " Group Members" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Member" - } - }, - "id": 2, - "name": "members" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "GroupMemberDiff", - "header": 2623, - "doc": [ - "Update about members changed", - { - "type": "reference", - "argument": "removedUsers", - "category": "full", - "description": " Removed Users" - }, - { - "type": "reference", - "argument": "addedMembers", - "category": "full", - "description": " Added members" - }, - { - "type": "reference", - "argument": "membersCount", - "category": "full", - "description": " Current Members count" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - }, - { - "type": { - "type": "list", - "childType": { - "type": "alias", - "childType": "userId" - } - }, - "id": 2, - "name": "removedUsers" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Member" - } - }, - "id": 3, - "name": "addedMembers" - }, - { - "type": "int32", - "id": 4, - "name": "membersCount" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "GroupMembersCountChanged", - "header": 2622, - "doc": [ - "Update about members count changed", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - }, - { - "type": "reference", - "argument": "membersCount", - "category": "full", - "description": " Members count" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - }, - { - "type": "int32", - "id": 2, - "name": "membersCount" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "GroupMemberAdminChanged", - "header": 2627, - "doc": [ - "Update about member admin changed", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - }, - { - "type": "reference", - "argument": "userId", - "category": "full", - "description": " User Id" - }, - { - "type": "reference", - "argument": "isAdmin", - "category": "full", - "description": " Is Admin flag" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - }, - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 2, - "name": "userId" - }, - { - "type": "bool", - "id": 3, - "name": "isAdmin" - } - ] - } - }, - { - "type": "comment", - "content": "Actions" - }, - { - "type": "rpc", - "content": { - "name": "CreateGroup", - "header": 230, - "response": { - "type": "anonymous", - "header": 216, - "doc": [ - "Created group", - { - "type": "reference", - "argument": "seq", - "category": "full", - "description": " Update Seq" - }, - { - "type": "reference", - "argument": "state", - "category": "compact", - "description": " Update state" - }, - { - "type": "reference", - "argument": "group", - "category": "full", - "description": " Created group" - }, - { - "type": "reference", - "argument": "users", - "category": "full", - "description": " Referenced users" - }, - { - "type": "reference", - "argument": "userPeers", - "category": "full", - "description": " Referenced users" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " Group creation date" - } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "seq" - }, - { - "type": { - "type": "alias", - "childType": "seq_state" - }, - "id": 2, - "name": "state" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 6, - "name": "date" - }, - { - "type": { - "type": "struct", - "childType": "Group" - }, - "id": 3, - "name": "group" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "User" - } - }, - "id": 4, - "name": "users" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "UserOutPeer" - } - }, - "id": 5, - "name": "userPeers" - } - ] - }, - "doc": [ - "Creating group chat", - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": "Random Id for avoiding double create" - }, - { - "type": "reference", - "argument": "title", - "category": "full", - "description": "Group Title" - }, - { - "type": "reference", - "argument": "users", - "category": "hidden", - "description": "Members of group" - }, - { - "type": "reference", - "argument": "groupType", - "category": "full", - "description": "Group Type" - }, - { - "type": "reference", - "argument": "optimizations", - "category": "full", - "description": "Enabled Optimizations" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 1, - "name": "rid" - }, - { - "type": "string", - "id": 2, - "name": "title" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "UserOutPeer" - } - }, - "id": 3, - "name": "users" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "enum", - "childType": "GroupType" - } - }, - "id": 6, - "name": "groupType" - }, - { - "type": { - "type": "list", - "childType": { - "type": "enum", - "childType": "UpdateOptimization" - } - }, - "id": 7, - "name": "optimizations" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "EditGroupTitle", - "header": 85, - "response": { - "type": "reference", - "name": "SeqDate" - }, - "doc": [ - "Changing group title", - { - "type": "reference", - "argument": "groupPeer", - "category": "full", - "description": "Group's peer" - }, - { - "type": "reference", - "argument": "title", - "category": "full", - "description": "new group title" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": "Random Id of operation" - }, - { - "type": "reference", - "argument": "optimizations", - "category": "full", - "description": "Enabled Optimizations" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "GroupOutPeer" - }, - "id": 1, - "name": "groupPeer" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 4, - "name": "rid" - }, - { - "type": "string", - "id": 3, - "name": "title" - }, - { - "type": { - "type": "list", - "childType": { - "type": "enum", - "childType": "UpdateOptimization" - } - }, - "id": 5, - "name": "optimizations" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "EditGroupAvatar", - "header": 86, - "response": { - "type": "anonymous", - "header": 115, - "doc": [ - "Updated group avatar", - { - "type": "reference", - "argument": "avatar", - "category": "compact", - "description": " Changed avatar" - }, - { - "type": "reference", - "argument": "seq", - "category": "full", - "description": " Sequence number" - }, - { - "type": "reference", - "argument": "state", - "category": "compact", - "description": " Sequence state" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " Avatar change date" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Avatar" - }, - "id": 1, - "name": "avatar" - }, - { - "type": "int32", - "id": 2, - "name": "seq" - }, - { - "type": { - "type": "alias", - "childType": "seq_state" - }, - "id": 3, - "name": "state" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 4, - "name": "date" - } - ] - }, - "doc": [ - "Changing group avatar", - { - "type": "reference", - "argument": "groupPeer", - "category": "full", - "description": "Group's peer" - }, - { - "type": "reference", - "argument": "fileLocation", - "category": "compact", - "description": "uploaded file for avatar" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": "Random Id of operation" - }, - { - "type": "reference", - "argument": "optimizations", - "category": "full", - "description": "Enabled Optimizations" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "GroupOutPeer" - }, - "id": 1, - "name": "groupPeer" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 4, - "name": "rid" - }, - { - "type": { - "type": "struct", - "childType": "FileLocation" - }, - "id": 3, - "name": "fileLocation" - }, - { - "type": { - "type": "list", - "childType": { - "type": "enum", - "childType": "UpdateOptimization" - } - }, - "id": 5, - "name": "optimizations" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "RemoveGroupAvatar", - "header": 101, - "response": { - "type": "reference", - "name": "SeqDate" - }, - "doc": [ - "Removing group avatar", - { - "type": "reference", - "argument": "groupPeer", - "category": "full", - "description": "Group's peer" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": "Random Id of operation" - }, - { - "type": "reference", - "argument": "optimizations", - "category": "full", - "description": "Enabled Optimizations" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "GroupOutPeer" - }, - "id": 1, - "name": "groupPeer" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 4, - "name": "rid" - }, - { - "type": { - "type": "list", - "childType": { - "type": "enum", - "childType": "UpdateOptimization" - } - }, - "id": 5, - "name": "optimizations" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "EditGroupShortName", - "header": 2793, - "response": { - "type": "reference", - "name": "Seq" - }, - "doc": [ - "Edit Group Short Name", - { - "type": "reference", - "argument": "groupPeer", - "category": "full", - "description": "Group's peer" - }, - { - "type": "reference", - "argument": "shortName", - "category": "full", - "description": "New group's short name" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "GroupOutPeer" - }, - "id": 1, - "name": "groupPeer" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 2, - "name": "shortName" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "EditGroupTopic", - "header": 211, - "response": { - "type": "reference", - "name": "SeqDate" - }, - "doc": [ - "Edit group topic", - { - "type": "reference", - "argument": "groupPeer", - "category": "full", - "description": "Group's peer" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": "Random id of operation" - }, - { - "type": "reference", - "argument": "topic", - "category": "full", - "description": "New Topic" - }, - { - "type": "reference", - "argument": "optimizations", - "category": "full", - "description": "Enabled Optimizations" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "GroupOutPeer" - }, - "id": 1, - "name": "groupPeer" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 2, - "name": "rid" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 3, - "name": "topic" - }, - { - "type": { - "type": "list", - "childType": { - "type": "enum", - "childType": "UpdateOptimization" - } - }, - "id": 4, - "name": "optimizations" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "EditGroupAbout", - "header": 213, - "response": { - "type": "reference", - "name": "SeqDate" - }, - "doc": [ - "Edit Group About", - { - "type": "reference", - "argument": "groupPeer", - "category": "full", - "description": "Group's peer" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": "Random id of operation" - }, - { - "type": "reference", - "argument": "about", - "category": "full", - "description": "New About" - }, - { - "type": "reference", - "argument": "optimizations", - "category": "full", - "description": "Enabled Optimizations" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "GroupOutPeer" - }, - "id": 1, - "name": "groupPeer" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 2, - "name": "rid" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 3, - "name": "about" - }, - { - "type": { - "type": "list", - "childType": { - "type": "enum", - "childType": "UpdateOptimization" - } - }, - "id": 5, - "name": "optimizations" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "InviteUser", - "header": 69, - "response": { - "type": "reference", - "name": "SeqDate" - }, - "doc": [ - "Inviting user to group", - { - "type": "reference", - "argument": "groupPeer", - "category": "full", - "description": "Group's peer" - }, - { - "type": "reference", - "argument": "user", - "category": "full", - "description": "Users for invitation" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": "Random Id of operation" - }, - { - "type": "reference", - "argument": "optimizations", - "category": "full", - "description": "Enabled Optimizations" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "GroupOutPeer" - }, - "id": 1, - "name": "groupPeer" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 4, - "name": "rid" - }, - { - "type": { - "type": "struct", - "childType": "UserOutPeer" - }, - "id": 3, - "name": "user" - }, - { - "type": { - "type": "list", - "childType": { - "type": "enum", - "childType": "UpdateOptimization" - } - }, - "id": 5, - "name": "optimizations" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "LeaveGroup", - "header": 70, - "response": { - "type": "reference", - "name": "SeqDate" - }, - "doc": [ - "Leaving group", - { - "type": "reference", - "argument": "groupPeer", - "category": "full", - "description": "Group's peer" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": "Random Id of operation" - }, - { - "type": "reference", - "argument": "optimizations", - "category": "full", - "description": "Enabled Optimizations" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "GroupOutPeer" - }, - "id": 1, - "name": "groupPeer" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 2, - "name": "rid" - }, - { - "type": { - "type": "list", - "childType": { - "type": "enum", - "childType": "UpdateOptimization" - } - }, - "id": 3, - "name": "optimizations" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "LeaveAndDelete", - "header": 2721, - "response": { - "type": "reference", - "name": "Seq" - }, - "doc": [ - "Leave group and Delete Chat", - { - "type": "reference", - "argument": "groupPeer", - "category": "full", - "description": "Group peer" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "GroupOutPeer" - }, - "id": 1, - "name": "groupPeer" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "KickUser", - "header": 71, - "response": { - "type": "reference", - "name": "SeqDate" - }, - "doc": [ - "Kicking user from group", - { - "type": "reference", - "argument": "groupPeer", - "category": "full", - "description": "Group's peer" - }, - { - "type": "reference", - "argument": "user", - "category": "full", - "description": "users for removing" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": "Random Id of operation" - }, - { - "type": "reference", - "argument": "optimizations", - "category": "full", - "description": "Enabled Optimizations" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "GroupOutPeer" - }, - "id": 1, - "name": "groupPeer" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 4, - "name": "rid" - }, - { - "type": { - "type": "struct", - "childType": "UserOutPeer" - }, - "id": 3, - "name": "user" - }, - { - "type": { - "type": "list", - "childType": { - "type": "enum", - "childType": "UpdateOptimization" - } - }, - "id": 5, - "name": "optimizations" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "JoinGroupByPeer", - "header": 2722, - "response": { - "type": "reference", - "name": "Seq" - }, - "doc": [ - "Join group by peer", - { - "type": "reference", - "argument": "groupPeer", - "category": "full", - "description": "Group's peer" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "GroupOutPeer" - }, - "id": 1, - "name": "groupPeer" - } - ] - } - }, - { - "type": "comment", - "content": "Administration" - }, - { - "type": "rpc", - "content": { - "name": "MakeUserAdmin", - "header": 2784, - "response": { - "type": "reference", - "name": "SeqDate" - }, - "doc": [ - "Make user admin", - { - "type": "reference", - "argument": "groupPeer", - "category": "full", - "description": "Group's peer" - }, - { - "type": "reference", - "argument": "userPeer", - "category": "full", - "description": "User's peer" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "GroupOutPeer" - }, - "id": 1, - "name": "groupPeer" - }, - { - "type": { - "type": "struct", - "childType": "UserOutPeer" - }, - "id": 2, - "name": "userPeer" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "DismissUserAdmin", - "header": 2791, - "response": { - "type": "reference", - "name": "Seq" - }, - "doc": [ - "Dismissing user admin", - { - "type": "reference", - "argument": "groupPeer", - "category": "full", - "description": "Group's peer" - }, - { - "type": "reference", - "argument": "userPeer", - "category": "full", - "description": "User's peer" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "GroupOutPeer" - }, - "id": 1, - "name": "groupPeer" - }, - { - "type": { - "type": "struct", - "childType": "UserOutPeer" - }, - "id": 2, - "name": "userPeer" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "TransferOwnership", - "header": 2789, - "response": { - "type": "reference", - "name": "SeqDate" - }, - "doc": [ - "Transfer ownership of group", - { - "type": "reference", - "argument": "groupPeer", - "category": "full", - "description": "Group's peer" - }, - { - "type": "reference", - "argument": "newOwner", - "category": "full", - "description": "New group's owner" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "GroupOutPeer" - }, - "id": 1, - "name": "groupPeer" - }, - { - "type": { - "type": "struct", - "childType": "UserOutPeer" - }, - "id": 2, - "name": "newOwner" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "AdminSettings", - "doc": [ - "Admin Settings", - { - "type": "reference", - "argument": "showAdminsToMembers", - "category": "full", - "description": " Show admins in member list" - }, - { - "type": "reference", - "argument": "canMembersInvite", - "category": "full", - "description": " Can members of a group invite people" - }, - { - "type": "reference", - "argument": "canMembersEditGroupInfo", - "category": "full", - "description": " Can members edit group info" - }, - { - "type": "reference", - "argument": "canAdminsEditGroupInfo", - "category": "full", - "description": " Can admins edit group info" - }, - { - "type": "reference", - "argument": "showJoinLeaveMessages", - "category": "full", - "description": " Should join and leave messages be visible to members" - } - ], - "expandable": "true", - "attributes": [ - { - "type": "bool", - "id": 1, - "name": "showAdminsToMembers" - }, - { - "type": "bool", - "id": 2, - "name": "canMembersInvite" - }, - { - "type": "bool", - "id": 3, - "name": "canMembersEditGroupInfo" - }, - { - "type": "bool", - "id": 4, - "name": "canAdminsEditGroupInfo" - }, - { - "type": "bool", - "id": 5, - "name": "showJoinLeaveMessages" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "LoadAdminSettings", - "header": 2790, - "response": { - "type": "anonymous", - "header": 2794, - "doc": [ - "Loaded settings", - { - "type": "reference", - "argument": "settings", - "category": "full", - "description": " Current group admin settings" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "AdminSettings" - }, - "id": 1, - "name": "settings" - } - ] - }, - "doc": [ - "Loading administration settings", - { - "type": "reference", - "argument": "groupPeer", - "category": "full", - "description": "Group's peer" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "GroupOutPeer" - }, - "id": 1, - "name": "groupPeer" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "SaveAdminSettings", - "header": 2792, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Save administartion settings", - { - "type": "reference", - "argument": "groupPeer", - "category": "full", - "description": "Group's Peer" - }, - { - "type": "reference", - "argument": "settings", - "category": "full", - "description": "Group's settings" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "GroupOutPeer" - }, - "id": 1, - "name": "groupPeer" - }, - { - "type": { - "type": "struct", - "childType": "AdminSettings" - }, - "id": 2, - "name": "settings" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "DeleteGroup", - "header": 2795, - "response": { - "type": "reference", - "name": "Seq" - }, - "doc": [ - "Delete Group", - { - "type": "reference", - "argument": "groupPeer", - "category": "full", - "description": "Group's peer" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "GroupOutPeer" - }, - "id": 1, - "name": "groupPeer" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "ShareHistory", - "header": 2796, - "response": { - "type": "reference", - "name": "Seq" - }, - "doc": [ - "Share History", - { - "type": "reference", - "argument": "groupPeer", - "category": "full", - "description": "Group's peer" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "GroupOutPeer" - }, - "id": 1, - "name": "groupPeer" - } - ] - } - }, - { - "type": "comment", - "content": "Invite" - }, - { - "type": "response", - "content": { - "name": "InviteUrl", - "header": 178, - "doc": [ - "Response for invite url methods" - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "url" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "GetGroupInviteUrl", - "header": 177, - "response": { - "type": "reference", - "name": "InviteUrl" - }, - "doc": [ - "Building invite url", - { - "type": "reference", - "argument": "groupPeer", - "category": "full", - "description": "Destination group peer" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "GroupOutPeer" - }, - "id": 1, - "name": "groupPeer" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "RevokeInviteUrl", - "header": 179, - "response": { - "type": "reference", - "name": "InviteUrl" - }, - "doc": [ - "Revoking invite urls", - { - "type": "reference", - "argument": "groupPeer", - "category": "full", - "description": "Destination group peer" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "GroupOutPeer" - }, - "id": 1, - "name": "groupPeer" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "JoinGroup", - "header": 180, - "response": { - "type": "anonymous", - "header": 181, - "doc": [ - { - "type": "reference", - "argument": "group", - "category": "hidden", - "description": " Joined group" - }, - { - "type": "reference", - "argument": "users", - "category": "hidden", - "description": " Users from members" - }, - { - "type": "reference", - "argument": "userPeers", - "category": "hidden", - "description": " User Peers" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": " Random id" - }, - { - "type": "reference", - "argument": "seq", - "category": "full", - "description": " Sequence number" - }, - { - "type": "reference", - "argument": "state", - "category": "hidden", - "description": " State" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " Date of join" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Group" - }, - "id": 1, - "name": "group" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "User" - } - }, - "id": 5, - "name": "users" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "UserOutPeer" - } - }, - "id": 7, - "name": "userPeers" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 6, - "name": "rid" - }, - { - "type": "int32", - "id": 2, - "name": "seq" - }, - { - "type": { - "type": "alias", - "childType": "seq_state" - }, - "id": 3, - "name": "state" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 4, - "name": "date" - } - ] - }, - "doc": [ - "Join group method", - { - "type": "reference", - "argument": "token", - "category": "full", - "description": "Url or Token for joining to group" - }, - { - "type": "reference", - "argument": "optimizations", - "category": "hidden", - "description": "Enabled Optimizations" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "token" - }, - { - "type": { - "type": "list", - "childType": { - "type": "enum", - "childType": "UpdateOptimization" - } - }, - "id": 2, - "name": "optimizations" - } - ] - } - }, - { - "type": "comment", - "content": "Obsolete Actions" - }, - { - "type": "rpc", - "content": { - "name": "CreateGroupObsolete", - "header": 65, - "response": { - "type": "anonymous", - "header": 66, - "doc": [ - "Created group", - { - "type": "reference", - "argument": "groupPeer", - "category": "full", - "description": " Peer of created group" - }, - { - "type": "reference", - "argument": "seq", - "category": "full", - "description": " Sequence number" - }, - { - "type": "reference", - "argument": "state", - "category": "compact", - "description": " Sequence state" - }, - { - "type": "reference", - "argument": "users", - "category": "compact", - "description": " Members of created group" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " Group creation date" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "GroupOutPeer" - }, - "id": 1, - "name": "groupPeer" - }, - { - "type": "int32", - "id": 3, - "name": "seq" - }, - { - "type": { - "type": "alias", - "childType": "seq_state" - }, - "id": 4, - "name": "state" - }, - { - "type": { - "type": "list", - "childType": "int32" - }, - "id": 5, - "name": "users" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 6, - "name": "date" - } - ] - }, - "doc": [ - "[OBSOLETE] Creating group chat", - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": "Random Id for avoiding double create" - }, - { - "type": "reference", - "argument": "title", - "category": "full", - "description": "Title of new group" - }, - { - "type": "reference", - "argument": "users", - "category": "compact", - "description": "Members of new group" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 1, - "name": "rid" - }, - { - "type": "string", - "id": 2, - "name": "title" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "UserOutPeer" - } - }, - "id": 3, - "name": "users" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "EnterGroupObsolete", - "header": 199, - "response": { - "type": "anonymous", - "header": 200, - "doc": [ - "Joined group", - { - "type": "reference", - "argument": "group", - "category": "full", - "description": " Joined group" - }, - { - "type": "reference", - "argument": "users", - "category": "full", - "description": " Referenced users" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": " Rid of join message" - }, - { - "type": "reference", - "argument": "seq", - "category": "full", - "description": " Seq of Update" - }, - { - "type": "reference", - "argument": "state", - "category": "full", - "description": " State of Update" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " Date of update" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Group" - }, - "id": 1, - "name": "group" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "User" - } - }, - "id": 2, - "name": "users" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 3, - "name": "rid" - }, - { - "type": "int32", - "id": 4, - "name": "seq" - }, - { - "type": { - "type": "alias", - "childType": "seq_state" - }, - "id": 5, - "name": "state" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 6, - "name": "date" - } - ] - }, - "doc": [ - "[OBSOLETE] Join random group by peer id", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": "Public group peer" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "GroupOutPeer" - }, - "id": 1, - "name": "peer" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "MakeUserAdminObsolete", - "header": 214, - "response": { - "type": "anonymous", - "header": 215, - "doc": [ - { - "type": "reference", - "argument": "members", - "category": "full", - "description": " new members" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Member" - } - }, - "id": 1, - "name": "members" - }, - { - "type": "int32", - "id": 2, - "name": "seq" - }, - { - "type": { - "type": "alias", - "childType": "seq_state" - }, - "id": 3, - "name": "state" - } - ] - }, - "doc": [ - "[OBSOLETE] Make user admin", - { - "type": "reference", - "argument": "groupPeer", - "category": "full", - "description": "Group's peer" - }, - { - "type": "reference", - "argument": "userPeer", - "category": "full", - "description": "User's peer" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "GroupOutPeer" - }, - "id": 1, - "name": "groupPeer" - }, - { - "type": { - "type": "struct", - "childType": "UserOutPeer" - }, - "id": 2, - "name": "userPeer" - } - ] - } - }, - { - "type": "comment", - "content": "Obsolete Updates" - }, - { - "type": "update", - "content": { - "name": "GroupInviteObsolete", - "header": 36, - "doc": [ - "Update about inviting current user to group", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - }, - { - "type": "reference", - "argument": "inviteUid", - "category": "full", - "description": " Inviter UID. If equals to current uid than group created by user." - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " Date of creating" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": " Random Id of operation" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 9, - "name": "rid" - }, - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 5, - "name": "inviteUid" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 8, - "name": "date" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "GroupUserInvitedObsolete", - "header": 21, - "doc": [ - "Update about inviting user to group", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - }, - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " Added user ID" - }, - { - "type": "reference", - "argument": "inviterUid", - "category": "full", - "description": " Inviter user ID" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " Date of adding user to group" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": " Random Id of operation" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 5, - "name": "rid" - }, - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 2, - "name": "uid" - }, - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 3, - "name": "inviterUid" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 4, - "name": "date" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "GroupUserLeaveObsolete", - "header": 23, - "doc": [ - "Update about leaving user", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - }, - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " User's ID" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " Date of user leave" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": " Random Id of operation" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 4, - "name": "rid" - }, - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 2, - "name": "uid" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 3, - "name": "date" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "GroupUserKickObsolete", - "header": 24, - "doc": [ - "Update about kicking user", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - }, - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " Kicked user's ID" - }, - { - "type": "reference", - "argument": "kickerUid", - "category": "full", - "description": " Kicker user's ID" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " Date of user kick" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": " Random Id of operation" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 5, - "name": "rid" - }, - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 2, - "name": "uid" - }, - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 3, - "name": "kickerUid" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 4, - "name": "date" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "GroupMembersUpdateObsolete", - "header": 44, - "doc": [ - "Silent group members update", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - }, - { - "type": "reference", - "argument": "members", - "category": "full", - "description": " New members list" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Member" - } - }, - "id": 2, - "name": "members" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "GroupTitleChangedObsolete", - "header": 38, - "doc": [ - "Update about group title change", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - }, - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " Changer UID" - }, - { - "type": "reference", - "argument": "title", - "category": "full", - "description": " New Title of group" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " Date of title change" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": " Random Id of operation" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 5, - "name": "rid" - }, - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 2, - "name": "uid" - }, - { - "type": "string", - "id": 3, - "name": "title" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 4, - "name": "date" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "GroupTopicChangedObsolete", - "header": 213, - "doc": [ - "Update about group topic change", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - }, - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " Changer UID" - }, - { - "type": "reference", - "argument": "topic", - "category": "full", - "description": " New topic of group" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " Date of theme change" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": " Randomd Id of operation" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 2, - "name": "rid" - }, - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 3, - "name": "uid" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 4, - "name": "topic" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 5, - "name": "date" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "GroupAboutChangedObsolete", - "header": 214, - "doc": [ - "Update about group about change", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - }, - { - "type": "reference", - "argument": "about", - "category": "full", - "description": " Group about" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 2, - "name": "about" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "GroupAvatarChangedObsolete", - "header": 39, - "doc": [ - "Update about group avatar change", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group Id" - }, - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " Avatar changer uid" - }, - { - "type": "reference", - "argument": "avatar", - "category": "compact", - "description": " New Avatar. If null then avatar is removed" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " Date of avatar change" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": " Random Id of operation" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 5, - "name": "rid" - }, - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 2, - "name": "uid" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "Avatar" - } - }, - "id": 3, - "name": "avatar" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 4, - "name": "date" - } - ] - } - } - ] - }, - { - "title": "Stickers", - "package": "stickers", - "doc": [ - "Stickers support in Actor" - ], - "items": [ - { - "type": "struct", - "content": { - "name": "StickerDescriptor", - "doc": [ - "Descriptor of a Sticker", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": " Sticker unique id" - }, - { - "type": "reference", - "argument": "emoji", - "category": "full", - "description": " Emoji code for sticker" - }, - { - "type": "reference", - "argument": "image128", - "category": "full", - "description": " Image of sticker 128x128 in WebP format" - }, - { - "type": "reference", - "argument": "image512", - "category": "full", - "description": " Image of sticker 512x512 in WebP format" - }, - { - "type": "reference", - "argument": "image256", - "category": "full", - "description": " Image of sticker 256x256 in WebP format" - } - ], - "expandable": "true", - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "id" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 2, - "name": "emoji" - }, - { - "type": { - "type": "struct", - "childType": "ImageLocation" - }, - "id": 3, - "name": "image128" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "ImageLocation" - } - }, - "id": 4, - "name": "image512" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "ImageLocation" - } - }, - "id": 5, - "name": "image256" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "StickerCollection", - "doc": [ - "Sticker collection", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": " Unique id of a collection" - }, - { - "type": "reference", - "argument": "accessHash", - "category": "full", - "description": " Access Hash of a collection" - }, - { - "type": "reference", - "argument": "stickers", - "category": "compact", - "description": " Sticker list" - } - ], - "expandable": "true", - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "id" - }, - { - "type": "int64", - "id": 2, - "name": "accessHash" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "StickerDescriptor" - } - }, - "id": 3, - "name": "stickers" - } - ] - } - }, - { - "type": "response", - "content": { - "name": "StickersReponse", - "header": 240, - "doc": [ - "Stickers response", - { - "type": "reference", - "argument": "collections", - "category": "full", - "description": " Sticker collections" - }, - { - "type": "reference", - "argument": "seq", - "category": "full", - "description": " Seq of update" - }, - { - "type": "reference", - "argument": "state", - "category": "full", - "description": " State of update" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "StickerCollection" - } - }, - "id": 1, - "name": "collections" - }, - { - "type": "int32", - "id": 2, - "name": "seq" - }, - { - "type": { - "type": "alias", - "childType": "seq_state" - }, - "id": 3, - "name": "state" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "LoadOwnStickers", - "header": 238, - "response": { - "type": "anonymous", - "header": 239, - "doc": [ - "Own Stickers collections", - { - "type": "reference", - "argument": "ownStickers", - "category": "hidden", - "description": " Own sticker collections" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "StickerCollection" - } - }, - "id": 1, - "name": "ownStickers" - } - ] - }, - "doc": [ - "Loading own stickers" - ], - "attributes": [] - } - }, - { - "type": "update", - "content": { - "name": "OwnStickersChanged", - "header": 161, - "doc": [ - "Own Stickers changed", - { - "type": "reference", - "argument": "collections", - "category": "compact", - "description": " New own sticker collections" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "StickerCollection" - } - }, - "id": 1, - "name": "collections" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "StickerCollectionsChanged", - "header": 164, - "doc": [ - "Sticker collection changed", - { - "type": "reference", - "argument": "collections", - "category": "full", - "description": " Updated sticker collections" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "StickerCollection" - } - }, - "id": 1, - "name": "collections" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "AddStickerCollection", - "header": 244, - "response": { - "type": "reference", - "name": "StickersReponse" - }, - "doc": [ - "Adding sticker collection", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": "Collection id" - }, - { - "type": "reference", - "argument": "accessHash", - "category": "full", - "description": "Collection access hash" - } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "id" - }, - { - "type": "int64", - "id": 2, - "name": "accessHash" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "RemoveStickerCollection", - "header": 245, - "response": { - "type": "reference", - "name": "StickersReponse" - }, - "doc": [ - "Removing sticker collection", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": "Collection id" - }, - { - "type": "reference", - "argument": "accessHash", - "category": "full", - "description": "Collection access hash" - } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "id" - }, - { - "type": "int64", - "id": 2, - "name": "accessHash" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "LoadStickerCollection", - "header": 246, - "response": { - "type": "anonymous", - "header": 247, - "doc": [ - "Loaded collection", - { - "type": "reference", - "argument": "collection", - "category": "full", - "description": " Collection of stickers" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "StickerCollection" - }, - "id": 1, - "name": "collection" - } - ] - }, - "doc": [ - "Loading stickers", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": "Collection id" - }, - { - "type": "reference", - "argument": "accessHash", - "category": "full", - "description": "Collection access hash" - } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "id" - }, - { - "type": "int64", - "id": 2, - "name": "accessHash" - } - ] - } - } - ] - }, - { - "title": "Search", - "package": "search", - "doc": [ - "Searching API" - ], - "items": [ - { - "type": "enum", - "content": { - "name": "SearchPeerType", - "values": [ - { - "name": "Groups", - "id": 1 - }, - { - "name": "Contacts", - "id": 2 - }, - { - "name": "Public", - "id": 3 - } - ] - } - }, - { - "type": "enum", - "content": { - "name": "SearchContentType", - "values": [ - { - "name": "Any", - "id": 1 - }, - { - "name": "Text", - "id": 2 - }, - { - "name": "Links", - "id": 3 - }, - { - "name": "Documents", - "id": 4 - }, - { - "name": "Photos", - "id": 5 - } - ] - } - }, - { - "type": "trait", - "content": { - "isContainer": "true", - "name": "SearchCondition", - "attributes": [] - } - }, - { - "type": "struct", - "content": { - "name": "SearchPeerTypeCondition", - "doc": [ - "Search peer type condition", - { - "type": "reference", - "argument": "peerType", - "category": "full", - "description": " Peer type for searching" - } - ], - "trait": { - "name": "SearchCondition", - "key": 1 - }, - "attributes": [ - { - "type": { - "type": "enum", - "childType": "SearchPeerType" - }, - "id": 1, - "name": "peerType" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "SearchPieceText", - "doc": [ - "Search peer name condition", - { - "type": "reference", - "argument": "query", - "category": "full", - "description": " Search query" - } - ], - "trait": { - "name": "SearchCondition", - "key": 2 - }, - "attributes": [ - { - "type": "string", - "id": 1, - "name": "query" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "SearchAndCondition", - "doc": [ - "Search AND condion", - { - "type": "reference", - "argument": "andQuery", - "category": "full", - "description": " And Query" - } - ], - "trait": { - "name": "SearchCondition", - "key": 3 - }, - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "trait", - "childType": "SearchCondition" - } - }, - "id": 1, - "name": "andQuery" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "SearchOrCondition", - "doc": [ - "Search OR condition", - { - "type": "reference", - "argument": "orQuery", - "category": "full", - "description": " Or Query" - } - ], - "trait": { - "name": "SearchCondition", - "key": 4 - }, - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "trait", - "childType": "SearchCondition" - } - }, - "id": 2, - "name": "orQuery" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "SearchPeerCondition", - "doc": [ - "Serch Peer condition", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": " Peer condition" - } - ], - "trait": { - "name": "SearchCondition", - "key": 5 - }, - "attributes": [ - { - "type": { - "type": "struct", - "childType": "OutPeer" - }, - "id": 1, - "name": "peer" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "SearchPeerContentType", - "doc": [ - "Search content type condition", - { - "type": "reference", - "argument": "contentType", - "category": "full", - "description": " Content Type" - } - ], - "trait": { - "name": "SearchCondition", - "key": 6 - }, - "attributes": [ - { - "type": { - "type": "enum", - "childType": "SearchContentType" - }, - "id": 1, - "name": "contentType" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "SearchSenderIdConfition", - "doc": [ - "Searching sender uid condition", - { - "type": "reference", - "argument": "senderId", - "category": "full", - "description": " sender UID" - } - ], - "trait": { - "name": "SearchCondition", - "key": 7 - }, - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "senderId" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "PeerSearchResult", - "doc": [ - "Peer search result", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": " Peer information" - }, - { - "type": "reference", - "argument": "optMatchString", - "category": "full", - "description": " Description" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Peer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 3, - "name": "optMatchString" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "PeerSearch", - "header": 233, - "response": { - "type": "anonymous", - "header": 234, - "doc": [ - "Found peers", - { - "type": "reference", - "argument": "searchResults", - "category": "full", - "description": " Search Results" - }, - { - "type": "reference", - "argument": "users", - "category": "full", - "description": " Related users" - }, - { - "type": "reference", - "argument": "groups", - "category": "full", - "description": " Related groups" - }, - { - "type": "reference", - "argument": "userPeers", - "category": "full", - "description": " Related user peers" - }, - { - "type": "reference", - "argument": "groupPeers", - "category": "full", - "description": " Related group peers" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "PeerSearchResult" - } - }, - "id": 1, - "name": "searchResults" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "User" - } - }, - "id": 2, - "name": "users" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Group" - } - }, - "id": 3, - "name": "groups" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "UserOutPeer" - } - }, - "id": 4, - "name": "userPeers" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "GroupOutPeer" - } - }, - "id": 5, - "name": "groupPeers" - } - ] - }, - "doc": [ - "Performing peer search", - { - "type": "reference", - "argument": "query", - "category": "full", - "description": "Search query. Warring not all combinations can be processed by server. (acts as OR)" - }, - { - "type": "reference", - "argument": "optimizations", - "category": "full", - "description": "Enabled Optimizations" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "trait", - "childType": "SearchCondition" - } - }, - "id": 1, - "name": "query" - }, - { - "type": { - "type": "list", - "childType": { - "type": "enum", - "childType": "UpdateOptimization" - } - }, - "id": 2, - "name": "optimizations" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "MessageSearchResult", - "doc": [ - "Message container", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": " Message Peer" - }, - { - "type": "reference", - "argument": "rid", - "category": "full", - "description": " Message Random Id" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " Message Date" - }, - { - "type": "reference", - "argument": "senderId", - "category": "full", - "description": " Message sender UID" - }, - { - "type": "reference", - "argument": "content", - "category": "full", - "description": " Message content" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Peer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 2, - "name": "rid" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 3, - "name": "date" - }, - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 4, - "name": "senderId" - }, - { - "type": { - "type": "trait", - "childType": "Message" - }, - "id": 5, - "name": "content" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "MessageSearchItem", - "doc": [ - "Message Search result container" - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "MessageSearchResult" - }, - "id": 1, - "name": "result" - } - ] - } - }, - { - "type": "response", - "content": { - "name": "MessageSearchResponse", - "header": 218, - "doc": [ - "Search Result", - { - "type": "reference", - "argument": "searchResults", - "category": "full", - "description": " Search results" - }, - { - "type": "reference", - "argument": "users", - "category": "full", - "description": " Search users" - }, - { - "type": "reference", - "argument": "groups", - "category": "full", - "description": " Search groups" - }, - { - "type": "reference", - "argument": "loadMoreState", - "category": "hidden", - "description": " State for loading more results" - }, - { - "type": "reference", - "argument": "userOutPeers", - "category": "full", - "description": " Search user peers" - }, - { - "type": "reference", - "argument": "groupOutPeers", - "category": "full", - "description": " Search group peers" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "MessageSearchItem" - } - }, - "id": 1, - "name": "searchResults" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "User" - } - }, - "id": 2, - "name": "users" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Group" - } - }, - "id": 3, - "name": "groups" - }, - { - "type": { - "type": "opt", - "childType": "bytes" - }, - "id": 4, - "name": "loadMoreState" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "UserOutPeer" - } - }, - "id": 5, - "name": "userOutPeers" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "GroupOutPeer" - } - }, - "id": 6, - "name": "groupOutPeers" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "MessageSearch", - "header": 217, - "response": { - "type": "reference", - "name": "MessageSearchResponse" - }, - "doc": [ - "Performing message search", - { - "type": "reference", - "argument": "query", - "category": "full", - "description": "Search query" - }, - { - "type": "reference", - "argument": "optimizations", - "category": "full", - "description": "Enabled Optimizations" - } - ], - "attributes": [ - { - "type": { - "type": "trait", - "childType": "SearchCondition" - }, - "id": 1, - "name": "query" - }, - { - "type": { - "type": "list", - "childType": { - "type": "enum", - "childType": "UpdateOptimization" - } - }, - "id": 2, - "name": "optimizations" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "MessageSearchMore", - "header": 222, - "response": { - "type": "reference", - "name": "MessageSearchResponse" - }, - "doc": [ - "Performing message search paging", - { - "type": "reference", - "argument": "loadMoreState", - "category": "hidden", - "description": "State for loading more results" - }, - { - "type": "reference", - "argument": "optimizations", - "category": "full", - "description": "Enabled Optimizations" - } - ], - "attributes": [ - { - "type": "bytes", - "id": 1, - "name": "loadMoreState" - }, - { - "type": { - "type": "list", - "childType": { - "type": "enum", - "childType": "UpdateOptimization" - } - }, - "id": 2, - "name": "optimizations" - } - ] - } - } - ] - }, - { - "title": "Public Groups", - "package": "pubgroups", - "doc": [ - "Public group is easy way to find communities" - ], - "items": [ - { - "type": "struct", - "content": { - "name": "PublicGroup", - "doc": [ - "Public Group description", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": " Group id" - }, - { - "type": "reference", - "argument": "accessHash", - "category": "danger", - "description": " Group Access hash" - }, - { - "type": "reference", - "argument": "title", - "category": "full", - "description": " Group title" - }, - { - "type": "reference", - "argument": "avatar", - "category": "full", - "description": " Group avatar" - }, - { - "type": "reference", - "argument": "membersCount", - "category": "full", - "description": " Members count in group" - }, - { - "type": "reference", - "argument": "friendsCount", - "category": "full", - "description": " Friends count int group" - }, - { - "type": "reference", - "argument": "description", - "category": "full", - "description": " Description of group" - } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "id" - }, - { - "type": "int64", - "id": 2, - "name": "accessHash" - }, - { - "type": "string", - "id": 3, - "name": "title" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "Avatar" - } - }, - "id": 7, - "name": "avatar" - }, - { - "type": "int32", - "id": 4, - "name": "membersCount" - }, - { - "type": "int32", - "id": 5, - "name": "friendsCount" - }, - { - "type": "string", - "id": 6, - "name": "description" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "GetPublicGroups", - "header": 201, - "response": { - "type": "anonymous", - "header": 202, - "doc": [ - "Loaded public groups", - { - "type": "reference", - "argument": "groups", - "category": "full", - "description": " All available groups" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "PublicGroup" - } - }, - "id": 1, - "name": "groups" - } - ] - }, - "doc": [ - "Getting public groups" - ], - "attributes": [] - } - } - ] - }, - { - "title": "Invites", - "package": "invites", - "doc": [ - "Invite mechanizm" - ], - "items": [ - { - "type": "struct", - "content": { - "name": "InviteState", - "doc": [ - "Invite state", - { - "type": "reference", - "argument": "email", - "category": "full", - "description": " Email of invite" - }, - { - "type": "reference", - "argument": "name", - "category": "full", - "description": " Name of invited user" - }, - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " Uid of registered user" - }, - { - "type": "reference", - "argument": "tid", - "category": "full", - "description": " Team id of invite" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "email" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 2, - "name": "name" - }, - { - "type": { - "type": "opt", - "childType": "int32" - }, - "id": 3, - "name": "uid" - }, - { - "type": { - "type": "opt", - "childType": "int32" - }, - "id": 4, - "name": "tid" - } - ] - } - }, - { - "type": "response", - "content": { - "name": "InviteList", - "header": 2564, - "doc": [ - "Intites list", - { - "type": "reference", - "argument": "invites", - "category": "full", - "description": " Intvites" - }, - { - "type": "reference", - "argument": "relatedUsers", - "category": "full", - "description": " Related users in invites" - }, - { - "type": "reference", - "argument": "relatedGroups", - "category": "full", - "description": " Related groups in invites" - }, - { - "type": "reference", - "argument": "relatedTeams", - "category": "full", - "description": " Related teams in invites" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "InviteState" - } - }, - "id": 1, - "name": "invites" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "User" - } - }, - "id": 2, - "name": "relatedUsers" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Group" - } - }, - "id": 3, - "name": "relatedGroups" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Team" - } - }, - "id": 4, - "name": "relatedTeams" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "LoadOwnSentInvites", - "header": 2563, - "response": { - "type": "reference", - "name": "InviteList" - }, - "doc": [ - "Loading current invite states" - ], - "attributes": [] - } - }, - { - "type": "rpc", - "content": { - "name": "SendInvite", - "header": 2565, - "response": { - "type": "reference", - "name": "InviteList" - }, - "doc": [ - "Sending an email invite", - { - "type": "reference", - "argument": "email", - "category": "full", - "description": "Email for invite" - }, - { - "type": "reference", - "argument": "name", - "category": "full", - "description": "Optional name for invite" - }, - { - "type": "reference", - "argument": "destTeam", - "category": "full", - "description": "Optional team for invite" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "email" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 2, - "name": "name" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "OutTeam" - } - }, - "id": 3, - "name": "destTeam" - } - ] - } - } - ] - }, - { - "title": "Teams", - "package": "teams", - "doc": [ - "Teams support for Actor" - ], - "items": [ - { - "type": "struct", - "content": { - "name": "Team", - "doc": [ - "Team entity", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": " Team Id" - }, - { - "type": "reference", - "argument": "accessHash", - "category": "danger", - "description": " Team Access Hash" - }, - { - "type": "reference", - "argument": "name", - "category": "full", - "description": " Team name" - } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "id" - }, - { - "type": "int64", - "id": 2, - "name": "accessHash" - }, - { - "type": "string", - "id": 3, - "name": "name" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "OutTeam", - "doc": [ - "Reference to a team", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": " Team Id" - }, - { - "type": "reference", - "argument": "accessHash", - "category": "full", - "description": " Team access hash" - } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "id" - }, - { - "type": "int64", - "id": 2, - "name": "accessHash" - } - ] - } - }, - { - "type": "response", - "content": { - "name": "TeamsList", - "header": 2562, - "doc": [ - "Teams response", - { - "type": "reference", - "argument": "teams", - "category": "hidden", - "description": " Teams list" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Team" - } - }, - "id": 1, - "name": "teams" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "LoadOwnTeams", - "header": 2561, - "response": { - "type": "reference", - "name": "TeamsList" - }, - "doc": [ - "Loading own teams" - ], - "attributes": [] - } - }, - { - "type": "update", - "content": { - "name": "OwnTeamsChanged", - "header": 165, - "doc": [ - "Update about own teams changed", - { - "type": "reference", - "argument": "ownTeams", - "category": "full", - "description": " Updated own teams list" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Team" - } - }, - "id": 1, - "name": "ownTeams" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "CreateTeam", - "header": 2566, - "response": { - "type": "anonymous", - "header": 2567, - "doc": [ - "Created team response", - { - "type": "reference", - "argument": "createdTeam", - "category": "full", - "description": " Created Team" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Team" - }, - "id": 1, - "name": "createdTeam" - } - ] - }, - "doc": [ - "Creation of a Team", - { - "type": "reference", - "argument": "title", - "category": "full", - "description": "Title of a team" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "title" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "InviteToTeam", - "header": 2568, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Inviting people to team", - { - "type": "reference", - "argument": "user", - "category": "full", - "description": "Dest user" - }, - { - "type": "reference", - "argument": "destTeam", - "category": "full", - "description": "Dest team" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "UserOutPeer" - }, - "id": 1, - "name": "user" - }, - { - "type": { - "type": "struct", - "childType": "OutTeam" - }, - "id": 3, - "name": "destTeam" - } - ] - } - } - ] - }, - { - "title": "Integrations", - "package": "integrations", - "doc": [ - "Package contains methods for providing integration" - ], - "items": [ - { - "type": "response", - "content": { - "name": "IntegrationToken", - "header": 183, - "doc": [ - "Group token response", - { - "type": "reference", - "argument": "token", - "category": "danger", - "description": " current group token" - }, - { - "type": "reference", - "argument": "url", - "category": "danger", - "description": " current group url" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "token" - }, - { - "type": "string", - "id": 2, - "name": "url" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "GetIntegrationToken", - "header": 182, - "response": { - "type": "reference", - "name": "IntegrationToken" - }, - "doc": [ - "Getting current group token", - { - "type": "reference", - "argument": "groupPeer", - "category": "full", - "description": "Peer" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "OutPeer" - }, - "id": 1, - "name": "groupPeer" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "RevokeIntegrationToken", - "header": 184, - "response": { - "type": "reference", - "name": "IntegrationToken" - }, - "doc": [ - "Revoke group token", - { - "type": "reference", - "argument": "groupPeer", - "category": "full", - "description": "Peer" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "OutPeer" - }, - "id": 1, - "name": "groupPeer" - } - ] - } - } - ] - }, - { - "title": "Typing and Online", - "package": "weak", - "items": [ - { - "type": "enum", - "content": { - "name": "TypingType", - "values": [ - { - "name": "Text", - "id": 0 - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "Typing", - "header": 27, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Sending typing notification", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": "Destination peer" - }, - { - "type": "reference", - "argument": "typingType", - "category": "full", - "description": "typing type." - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "OutPeer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "enum", - "childType": "TypingType" - }, - "id": 3, - "name": "typingType" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "StopTyping", - "header": 30, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Stop typing", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": "Destination peer" - }, - { - "type": "reference", - "argument": "typingType", - "category": "full", - "description": "typing type" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "OutPeer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "enum", - "childType": "TypingType" - }, - "id": 2, - "name": "typingType" - } - ] - } - }, - { - "type": "enum", - "content": { - "name": "DeviceType", - "values": [ - { - "name": "GENERIC", - "id": 1 - }, - { - "name": "PC", - "id": 2 - }, - { - "name": "MOBILE", - "id": 3 - }, - { - "name": "TABLET", - "id": 4 - }, - { - "name": "WATCH", - "id": 5 - }, - { - "name": "MIRROR", - "id": 6 - }, - { - "name": "CAR", - "id": 7 - }, - { - "name": "TABLE", - "id": 8 - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "SetOnline", - "header": 29, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Sending online state", - { - "type": "reference", - "argument": "isOnline", - "category": "full", - "description": "is user online" - }, - { - "type": "reference", - "argument": "timeout", - "category": "full", - "description": "timeout of online state in milliseconds" - }, - { - "type": "reference", - "argument": "deviceType", - "category": "full", - "description": "Optional device type" - }, - { - "type": "reference", - "argument": "deviceCategory", - "category": "full", - "description": "Optional device category, for example android or ios" - } - ], - "attributes": [ - { - "type": "bool", - "id": 1, - "name": "isOnline" - }, - { - "type": { - "type": "alias", - "childType": "msec" - }, - "id": 2, - "name": "timeout" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "enum", - "childType": "DeviceType" - } - }, - "id": 3, - "name": "deviceType" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 4, - "name": "deviceCategory" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "PauseNotifications", - "header": 166, - "doc": [ - "Update about pausing notifications", - { - "type": "reference", - "argument": "timeout", - "category": "full", - "description": " Timeout for notifications resume" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "sec" - }, - "id": 1, - "name": "timeout" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "RestoreNotifications", - "header": 167, - "doc": [ - "Update about restoring notifications" - ], - "attributes": [] - } - }, - { - "type": "rpc", - "content": { - "name": "PauseNotifications", - "header": 2641, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Pause notifications", - { - "type": "reference", - "argument": "timeout", - "category": "hidden", - "description": "Timeout of pause" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "sec" - }, - "id": 1, - "name": "timeout" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "RestoreNotifications", - "header": 2642, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Restoring notifications" - ], - "attributes": [] - } - }, - { - "type": "empty" - }, - { - "type": "update", - "content": { - "name": "Typing", - "header": 6, - "doc": [ - "Update about user's typing", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": " Conversation peer" - }, - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " User's id" - }, - { - "type": "reference", - "argument": "typingType", - "category": "full", - "description": " Type of typing" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Peer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 2, - "name": "uid" - }, - { - "type": { - "type": "enum", - "childType": "TypingType" - }, - "id": 3, - "name": "typingType" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "TypingStop", - "header": 81, - "doc": [ - "Update about user's typing stop", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": " Conversation peer" - }, - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " User's id" - }, - { - "type": "reference", - "argument": "typingType", - "category": "hidden", - "description": " Type of typing" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Peer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 2, - "name": "uid" - }, - { - "type": { - "type": "enum", - "childType": "TypingType" - }, - "id": 3, - "name": "typingType" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "UserOnline", - "header": 7, - "doc": [ - "Update about user became online", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " User's Id" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "enum", - "childType": "DeviceType" - } - }, - "id": 2, - "name": "deviceType" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 3, - "name": "deviceCategory" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "UserOffline", - "header": 8, - "doc": [ - "Update about user became offline", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " User's id" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "enum", - "childType": "DeviceType" - } - }, - "id": 2, - "name": "deviceType" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 3, - "name": "deviceCategory" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "UserLastSeen", - "header": 9, - "doc": [ - "Update about user's last seen state", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " User's id" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " Last seen time" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 2, - "name": "date" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "enum", - "childType": "DeviceType" - } - }, - "id": 3, - "name": "deviceType" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 4, - "name": "deviceCategory" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "GroupOnline", - "header": 33, - "doc": [ - "Update about group online change", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group id" - }, - { - "type": "reference", - "argument": "count", - "category": "full", - "description": " current online user's count" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" - }, - { - "type": "int32", - "id": 2, - "name": "count" - } - ] - } - } - ] - }, - { - "title": "Media and Files", - "package": "files", - "items": [ - { - "type": "struct", - "content": { - "name": "FileLocation", - "doc": [ - "Location of file on server", - { - "type": "reference", - "argument": "fileId", - "category": "full", - "description": " Unique Id of file" - }, - { - "type": "reference", - "argument": "accessHash", - "category": "danger", - "description": " Access hash of file" - } - ], - "expandable": "true", - "attributes": [ - { - "type": "int64", - "id": 1, - "name": "fileId" - }, - { - "type": "int64", - "id": 2, - "name": "accessHash" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "ImageLocation", - "doc": [ - "Image location", - { - "type": "reference", - "argument": "fileLocation", - "category": "full", - "description": " Location of file" - }, - { - "type": "reference", - "argument": "width", - "category": "full", - "description": " Width of avatar image" - }, - { - "type": "reference", - "argument": "height", - "category": "full", - "description": " Height of avatar image" - }, - { - "type": "reference", - "argument": "fileSize", - "category": "full", - "description": " Size of file" - } - ], - "expandable": "true", - "attributes": [ - { - "type": { - "type": "struct", - "childType": "FileLocation" - }, - "id": 1, - "name": "fileLocation" - }, - { - "type": "int32", - "id": 2, - "name": "width" - }, - { - "type": "int32", - "id": 3, - "name": "height" - }, - { - "type": "int32", - "id": 4, - "name": "fileSize" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "AvatarImage", - "doc": [ - "Avatar Image", - { - "type": "reference", - "argument": "fileLocation", - "category": "full", - "description": " Location of file" - }, - { - "type": "reference", - "argument": "width", - "category": "full", - "description": " Width of avatar image" - }, - { - "type": "reference", - "argument": "height", - "category": "full", - "description": " Height of avatar image" - }, - { - "type": "reference", - "argument": "fileSize", - "category": "full", - "description": " Size of file" - } - ], - "expandable": "true", - "attributes": [ - { - "type": { - "type": "struct", - "childType": "FileLocation" - }, - "id": 1, - "name": "fileLocation" - }, - { - "type": "int32", - "id": 2, - "name": "width" - }, - { - "type": "int32", - "id": 3, - "name": "height" - }, - { - "type": "int32", - "id": 4, - "name": "fileSize" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "Avatar", - "doc": [ - "Avatar of User or Group", - { - "type": "reference", - "argument": "smallImage", - "category": "compact", - "description": " Optional small image of avatar box in 100x100" - }, - { - "type": "reference", - "argument": "largeImage", - "category": "compact", - "description": " Optional large image of avatar box in 200x200" - }, - { - "type": "reference", - "argument": "fullImage", - "category": "compact", - "description": " Optional full screen image of avatar" - } - ], - "expandable": "true", - "attributes": [ - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "AvatarImage" - } - }, - "id": 1, - "name": "smallImage" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "AvatarImage" - } - }, - "id": 2, - "name": "largeImage" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "AvatarImage" - } - }, - "id": 3, - "name": "fullImage" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "FastThumb", - "doc": [ - "Fast thumb of media messages. Less than 90x90 and compressed by JPEG with low quality", - { - "type": "reference", - "argument": "w", - "category": "full", - "description": " Width of thumb" - }, - { - "type": "reference", - "argument": "h", - "category": "full", - "description": " Height of thump" - }, - { - "type": "reference", - "argument": "thumb", - "category": "compact", - "description": " compressed image data" - } - ], - "expandable": "true", - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "w" - }, - { - "type": "int32", - "id": 2, - "name": "h" - }, - { - "type": "bytes", - "id": 3, - "name": "thumb" - } - ] - } - }, - { - "type": "enum", - "content": { - "name": "Colors", - "values": [ - { - "name": "red", - "id": 1 - }, - { - "name": "yellow", - "id": 2 - }, - { - "name": "green", - "id": 3 - } - ] - } - }, - { - "type": "trait", - "content": { - "isContainer": "true", - "name": "Color", - "attributes": [] - } - }, - { - "type": "struct", - "content": { - "name": "RgbColor", - "doc": [ - "RGB Color", - { - "type": "reference", - "argument": "rgb", - "category": "full", - "description": " RGB color value" - } - ], - "trait": { - "name": "Color", - "key": 1 - }, - "expandable": "true", - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "rgb" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "PredefinedColor", - "doc": [ - "Predefined color", - { - "type": "reference", - "argument": "color", - "category": "hidden", - "description": " Predefined color value" - } - ], - "trait": { - "name": "Color", - "key": 2 - }, - "expandable": "true", - "attributes": [ - { - "type": { - "type": "enum", - "childType": "Colors" - }, - "id": 1, - "name": "color" - } - ] - } - }, - { - "type": "empty" - }, - { - "type": "struct", - "content": { - "name": "HTTPHeader", - "doc": [ - "HTTP Header record", - { - "type": "reference", - "argument": "key", - "category": "full", - "description": " HTTP Header name" - }, - { - "type": "reference", - "argument": "value", - "category": "full", - "description": " HTTP Header value" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "key" - }, - { - "type": "string", - "id": 2, - "name": "value" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "FileUrlDescription", - "doc": [ - "File url description", - { - "type": "reference", - "argument": "fileId", - "category": "full", - "description": " File id of url" - }, - { - "type": "reference", - "argument": "url", - "category": "full", - "description": " Url for downloading" - }, - { - "type": "reference", - "argument": "timeout", - "category": "full", - "description": " Timeout of url" - }, - { - "type": "reference", - "argument": "unsignedUrl", - "category": "hidden", - "description": " Unsigned URL (used to honor web caches)" - }, - { - "type": "reference", - "argument": "unsignedUrlHeaders", - "category": "hidden", - "description": " Headers that is required to download files with unsigned url" - } - ], - "attributes": [ - { - "type": "int64", - "id": 1, - "name": "fileId" - }, - { - "type": "string", - "id": 2, - "name": "url" - }, - { - "type": { - "type": "alias", - "childType": "sec" - }, - "id": 3, - "name": "timeout" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 4, - "name": "unsignedUrl" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "HTTPHeader" - } - }, - "id": 5, - "name": "unsignedUrlHeaders" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "GetFileUrl", - "header": 77, - "response": { - "type": "anonymous", - "header": 78, - "doc": [ - { - "type": "reference", - "argument": "url", - "category": "full", - "description": " Url for downloading" - }, - { - "type": "reference", - "argument": "timeout", - "category": "full", - "description": " Timeout of url" - }, - { - "type": "reference", - "argument": "unsignedUrl", - "category": "full", - "description": " Unsigned URL (used to honor web caches)" - }, - { - "type": "reference", - "argument": "unsignedUrlHeaders", - "category": "full", - "description": " Headers that is required to download files with unsigned url" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "url" - }, - { - "type": { - "type": "alias", - "childType": "sec" - }, - "id": 2, - "name": "timeout" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 3, - "name": "unsignedUrl" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "HTTPHeader" - } - }, - "id": 4, - "name": "unsignedUrlHeaders" - } - ] - }, - "doc": [ - "Requesting file URL for downloading", - { - "type": "reference", - "argument": "file", - "category": "full", - "description": "file's location" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "FileLocation" - }, - "id": 1, - "name": "file" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "GetFileUrls", - "header": 2573, - "response": { - "type": "anonymous", - "header": 2574, - "doc": [ - { - "type": "reference", - "argument": "fileUrls", - "category": "full", - "description": " File urls" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "FileUrlDescription" - } - }, - "id": 1, - "name": "fileUrls" - } - ] - }, - "doc": [ - "Requesting multiple fle URL for downloading", - { - "type": "reference", - "argument": "files", - "category": "hidden", - "description": "File locations to load urls" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "FileLocation" - } - }, - "id": 1, - "name": "files" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "GetFileUrlBuilder", - "header": 2579, - "response": { - "type": "anonymous", - "header": 2580, - "doc": [ - { - "type": "reference", - "argument": "baseUrl", - "category": "full", - "description": " Base Url for files" - }, - { - "type": "reference", - "argument": "algo", - "category": "full", - "description": " Signature algorithm" - }, - { - "type": "reference", - "argument": "seed", - "category": "full", - "description": " Public-visible seed of signature" - }, - { - "type": "reference", - "argument": "signatureSecret", - "category": "full", - "description": " Signature Secret" - }, - { - "type": "reference", - "argument": "timeout", - "category": "full", - "description": " Timeout of url builder" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "baseUrl" - }, - { - "type": "string", - "id": 2, - "name": "algo" - }, - { - "type": "string", - "id": 5, - "name": "seed" - }, - { - "type": "bytes", - "id": 3, - "name": "signatureSecret" - }, - { - "type": { - "type": "alias", - "childType": "sec" - }, - "id": 4, - "name": "timeout" - } - ] - }, - "doc": [ - "Get File URL Builder that allows to build file urls from client side", - { - "type": "reference", - "argument": "supportedSignatureAlgorithms", - "category": "hidden", - "description": "Supported signature algorithms by client" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": "string" - }, - "id": 1, - "name": "supportedSignatureAlgorithms" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "GetFileUploadUrl", - "header": 97, - "response": { - "type": "anonymous", - "header": 121, - "doc": [ - { - "type": "reference", - "argument": "url", - "category": "full", - "description": " Url for uploading" - }, - { - "type": "reference", - "argument": "uploadKey", - "category": "compact", - "description": " Upload key for upload" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "url" - }, - { - "type": "bytes", - "id": 2, - "name": "uploadKey" - } - ] - }, - "doc": [ - "Requesting pload url", - { - "type": "reference", - "argument": "expectedSize", - "category": "full", - "description": "Expected size of uploading file. May be inaccurate. Used for size allocation optimizations." - } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "expectedSize" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "CommitFileUpload", - "header": 122, - "response": { - "type": "anonymous", - "header": 138, - "doc": [ - { - "type": "reference", - "argument": "uploadedFileLocation", - "category": "hidden", - "description": " Result file location" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "FileLocation" - }, - "id": 1, - "name": "uploadedFileLocation" - } - ] - }, - "doc": [ - "Comminting uploaded file to storage" - ], - "attributes": [ - { - "type": "bytes", - "id": 1, - "name": "uploadKey" - }, - { - "type": "string", - "id": 2, - "name": "fileName" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "GetFileUploadPartUrl", - "header": 142, - "response": { - "type": "anonymous", - "header": 141, - "doc": [ - { - "type": "reference", - "argument": "url", - "category": "full", - "description": " Upload file part url" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "url" - } - ] - }, - "doc": [ - "Upload file part", - { - "type": "reference", - "argument": "uploadKey", - "category": "compact", - "description": "Upload Key from requestFileUploadUrl" - } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "partNumber" - }, - { - "type": "int32", - "id": 2, - "name": "partSize" - }, - { - "type": "bytes", - "id": 3, - "name": "uploadKey" - } - ] - } - } - ] - }, - { - "title": "Features", - "package": "features", - "doc": [ - "Enable feature discovery. Currently available features:", - "* \"call\" - private audio calls" - ], - "items": [ - { - "type": "rpc", - "content": { - "name": "EnableFeature", - "header": 2588, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Enabling feature on the device", - { - "type": "reference", - "argument": "featureName", - "category": "full", - "description": "Feature name" - }, - { - "type": "reference", - "argument": "args", - "category": "danger", - "description": "Optional arguments to a feature" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "featureName" - }, - { - "type": { - "type": "opt", - "childType": "bytes" - }, - "id": 2, - "name": "args" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "DisableFeature", - "header": 2589, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Disabling feature on the device", - { - "type": "reference", - "argument": "featureName", - "category": "full", - "description": "Feature name" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "featureName" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "CheckFeatureEnabled", - "header": 2590, - "response": { - "type": "reference", - "name": "Bool" - }, - "doc": [ - "Method for checking if feature is available to user" - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "UserOutPeer" - }, - "id": 1, - "name": "userOutPeer" - }, - { - "type": "string", - "id": 2, - "name": "featureName" - } - ] - } - } - ] - }, - { - "title": "EventBus", - "package": "eventbus", - "items": [ - { - "type": "rpc", - "content": { - "name": "CreateNewEventBus", - "header": 2665, - "response": { - "type": "anonymous", - "header": 2666, - "doc": [ - "Created new Event Bus", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": " Event Bus Id" - }, - { - "type": "reference", - "argument": "deviceId", - "category": "full", - "description": " Your Device Id" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "busId" - }, - "id": 1, - "name": "id" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 2, - "name": "deviceId" - } - ] - }, - "doc": [ - "Create new Event Bus", - { - "type": "reference", - "argument": "timeout", - "category": "full", - "description": "Optional timeout of Event Bus" - }, - { - "type": "reference", - "argument": "isOwned", - "category": "full", - "description": "Is Event Bus owned by creator" - } - ], - "attributes": [ - { - "type": { - "type": "opt", - "childType": { - "type": "alias", - "childType": "msec" - } - }, - "id": 1, - "name": "timeout" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 2, - "name": "isOwned" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "JoinEventBus", - "header": 2668, - "response": { - "type": "anonymous", - "header": 2669, - "doc": [ - { - "type": "reference", - "argument": "deviceId", - "category": "full", - "description": " Your Device Id" - }, - { - "type": "reference", - "argument": "rejoinToken", - "category": "full", - "description": " Token that can be used for rejoining event bus with same device id" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 1, - "name": "deviceId" - }, - { - "type": { - "type": "opt", - "childType": "bytes" - }, - "id": 2, - "name": "rejoinToken" - } - ] - }, - "doc": [ - "Joining Event Bus", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": "Event Bus Id" - }, - { - "type": "reference", - "argument": "timeout", - "category": "full", - "description": "Join timeout" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "busId" - }, - "id": 1, - "name": "id" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "alias", - "childType": "msec" - } - }, - "id": 2, - "name": "timeout" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "ReJoinEventBus", - "header": 2675, - "response": { - "type": "anonymous", - "header": 2676, - "doc": [ - { - "type": "reference", - "argument": "deviceId", - "category": "hidden", - "description": " Your Device Id" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 1, - "name": "deviceId" - } - ] - }, - "doc": [ - "Rejoining to event bus after session was disposed", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": "Event Bus Id" - }, - { - "type": "reference", - "argument": "rejoinToken", - "category": "full", - "description": "Rejoin Token" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "busId" - }, - "id": 1, - "name": "id" - }, - { - "type": "bytes", - "id": 2, - "name": "rejoinToken" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "KeepAliveEventBus", - "header": 2670, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Keep Alive Event Bus", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": "Event Bus Id" - }, - { - "type": "reference", - "argument": "timeout", - "category": "full", - "description": "Optional timeout for keep alive" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "busId" - }, - "id": 1, - "name": "id" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "alias", - "childType": "msec" - } - }, - "id": 2, - "name": "timeout" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "DisposeEventBus", - "header": 2667, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Dispose Event Bus", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": "Event Bus Id" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "busId" - }, - "id": 1, - "name": "id" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "PostToEventBus", - "header": 2671, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Event Bus Destination", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": "Bus Id" - }, - { - "type": "reference", - "argument": "destinations", - "category": "full", - "description": "If Empty need to broadcase message to everyone" - }, - { - "type": "reference", - "argument": "message", - "category": "hidden", - "description": "Message" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "busId" - }, - "id": 1, - "name": "id" - }, - { - "type": { - "type": "list", - "childType": { - "type": "alias", - "childType": "randomId" - } - }, - "id": 2, - "name": "destinations" - }, - { - "type": "bytes", - "id": 3, - "name": "message" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "EventBusDeviceConnected", - "header": 2561, - "doc": [ - "Update about pubsub device connected", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": " ID of Event Bus" - }, - { - "type": "reference", - "argument": "userId", - "category": "full", - "description": " Joined User Id" - }, - { - "type": "reference", - "argument": "deviceId", - "category": "full", - "description": " Joined Device Unique Id" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "busId" - }, - "id": 1, - "name": "id" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "alias", - "childType": "userId" - } - }, - "id": 2, - "name": "userId" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 3, - "name": "deviceId" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "EventBusDeviceDisconnected", - "header": 2563, - "doc": [ - "Update about device disconnected", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": " ID of Event Bus" - }, - { - "type": "reference", - "argument": "userId", - "category": "full", - "description": " Joined User Id" - }, - { - "type": "reference", - "argument": "deviceId", - "category": "full", - "description": " Disconnected Device unique Id" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "busId" - }, - "id": 1, - "name": "id" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "alias", - "childType": "userId" - } - }, - "id": 2, - "name": "userId" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 3, - "name": "deviceId" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "EventBusMessage", - "header": 2562, - "doc": [ - "Event Bus Message", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": " Event Bus Id" - }, - { - "type": "reference", - "argument": "senderId", - "category": "full", - "description": " Sender of message" - }, - { - "type": "reference", - "argument": "senderDeviceId", - "category": "full", - "description": " Device Id of sender" - }, - { - "type": "reference", - "argument": "message", - "category": "hidden", - "description": " Message" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "busId" - }, - "id": 1, - "name": "id" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "alias", - "childType": "userId" - } - }, - "id": 2, - "name": "senderId" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "alias", - "childType": "randomId" - } - }, - "id": 3, - "name": "senderDeviceId" - }, - { - "type": "bytes", - "id": 4, - "name": "message" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "EventBusDisposed", - "header": 2564, - "doc": [ - "Event Bus dispose", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": " Event Bus Id" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "busId" - }, - "id": 1, - "name": "id" - } - ] - } - } - ] - }, - { - "title": "Values", - "package": "values", - "doc": [ - "Synced Values" - ], - "items": [ - { - "type": "struct", - "content": { - "name": "SyncedValue", - "doc": [ - "Synced Value container", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": " Unique Id of a value. Unique in the scope of one named value." - }, - { - "type": "reference", - "argument": "value", - "category": "full", - "description": " Optional value" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 1, - "name": "id" - }, - { - "type": { - "type": "opt", - "childType": "bytes" - }, - "id": 2, - "name": "value" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "LoadSyncedSet", - "header": 2679, - "response": { - "type": "anonymous", - "header": 2680, - "doc": [ - { - "type": "reference", - "argument": "values", - "category": "full", - "description": " Current set values" - }, - { - "type": "reference", - "argument": "isStrong", - "category": "full", - "description": " Is this value strong and stored in sequence. By default is true." - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "SyncedValue" - } - }, - "id": 1, - "name": "values" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 2, - "name": "isStrong" - } - ] - }, - "doc": [ - "Loading synced set", - { - "type": "reference", - "argument": "setName", - "category": "hidden", - "description": "readable name of the set" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "setName" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "SynedSetUpdated", - "header": 72, - "doc": [ - "Update about synced set update", - { - "type": "reference", - "argument": "setName", - "category": "full", - "description": " Set Name" - }, - { - "type": "reference", - "argument": "syncedValues", - "category": "full", - "description": " Current set values" - }, - { - "type": "reference", - "argument": "isStrong", - "category": "full", - "description": " Is this value strong and need to be stored on disk" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "setName" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "SyncedValue" - } - }, - "id": 2, - "name": "syncedValues" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 3, - "name": "isStrong" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "SyncedSetAddedOrUpdated", - "header": 73, - "doc": [ - "Update about added or updated values in the synced set", - { - "type": "reference", - "argument": "setName", - "category": "full", - "description": " Set Name" - }, - { - "type": "reference", - "argument": "addedOrUpdatedValues", - "category": "hidden", - "description": " Added or updated values" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "setName" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "SyncedValue" - } - }, - "id": 2, - "name": "addedOrUpdatedValues" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "SyncedSetRemoved", - "header": 74, - "doc": [ - "Update about removed items from synced set", - { - "type": "reference", - "argument": "setName", - "category": "full", - "description": " Set Name" - }, - { - "type": "reference", - "argument": "removedItems", - "category": "full", - "description": " Removed Items from the set" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "setName" - }, - { - "type": { - "type": "list", - "childType": { - "type": "alias", - "childType": "randomId" - } - }, - "id": 2, - "name": "removedItems" - } - ] - } - } - ] - }, - { - "title": "WebRTC", - "package": "webrtc", - "doc": [ - "WebRTC package that enables support to audio and video calls" - ], - "items": [ - { - "type": "update", - "content": { - "name": "IncomingCall", - "header": 52, - "doc": [ - "Update about incoming call (Sent every 10 seconds)", - { - "type": "reference", - "argument": "callId", - "category": "full", - "description": " Call Id" - }, - { - "type": "reference", - "argument": "attemptIndex", - "category": "full", - "description": " Optional attempt Index" - } - ], - "attributes": [ - { - "type": "int64", - "id": 1, - "name": "callId" - }, - { - "type": { - "type": "opt", - "childType": "int32" - }, - "id": 2, - "name": "attemptIndex" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "CallHandled", - "header": 53, - "doc": [ - "Update about incoming call handled", - { - "type": "reference", - "argument": "callId", - "category": "full", - "description": " Call Id" - }, - { - "type": "reference", - "argument": "attemptIndex", - "category": "full", - "description": " Optional attempt Index" - } - ], - "attributes": [ - { - "type": "int64", - "id": 1, - "name": "callId" - }, - { - "type": { - "type": "opt", - "childType": "int32" - }, - "id": 2, - "name": "attemptIndex" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "CallUpgraded", - "header": 56, - "doc": [ - "Update about call moved to other peer", - { - "type": "reference", - "argument": "callId", - "category": "full", - "description": " Call Id" - }, - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Upgraded group id" - } - ], - "attributes": [ - { - "type": "int64", - "id": 1, - "name": "callId" - }, - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 2, - "name": "groupId" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "GetCallInfo", - "header": 2600, - "response": { - "type": "anonymous", - "header": 2606, - "doc": [ - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": " Destination peer" - }, - { - "type": "reference", - "argument": "groups", - "category": "compact", - "description": " Groups" - }, - { - "type": "reference", - "argument": "users", - "category": "compact", - "description": " Users" - }, - { - "type": "reference", - "argument": "eventBusId", - "category": "full", - "description": " Event Bus Id" - }, - { - "type": "reference", - "argument": "isAudioOnlyCall", - "category": "full", - "description": " Is Audio Only Call. Default is true" - }, - { - "type": "reference", - "argument": "isVideoOnlyCall", - "category": "full", - "description": " Is Video Only Call. Default is false." - }, - { - "type": "reference", - "argument": "isVideoPreferred", - "category": "full", - "description": " Is Video preferred" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Peer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "GroupOutPeer" - } - }, - "id": 2, - "name": "groups" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "UserOutPeer" - } - }, - "id": 3, - "name": "users" - }, - { - "type": { - "type": "alias", - "childType": "busId" - }, - "id": 4, - "name": "eventBusId" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 5, - "name": "isAudioOnlyCall" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 6, - "name": "isVideoOnlyCall" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 7, - "name": "isVideoPreferred" - } - ] - }, - "doc": [ - "Getting Call Information", - { - "type": "reference", - "argument": "callId", - "category": "full", - "description": "Call Id" - } - ], - "attributes": [ - { - "type": "int64", - "id": 1, - "name": "callId" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "DoCall", - "header": 2597, - "response": { - "type": "anonymous", - "header": 2598, - "doc": [ - { - "type": "reference", - "argument": "callId", - "category": "full", - "description": " Call Id" - }, - { - "type": "reference", - "argument": "eventBusId", - "category": "full", - "description": " Call Event Bus Id" - } - ], - "attributes": [ - { - "type": "int64", - "id": 1, - "name": "callId" - }, - { - "type": { - "type": "alias", - "childType": "busId" - }, - "id": 2, - "name": "eventBusId" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 3, - "name": "deviceId" - } - ] - }, - "doc": [ - "Do Call. Right after a call client need to start sending CallInProgress", - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": "destination peer" - }, - { - "type": "reference", - "argument": "timeout", - "category": "full", - "description": "Initial timeout" - }, - { - "type": "reference", - "argument": "isAudioOnlyCall", - "category": "full", - "description": "Is Audio only call. Default is true." - }, - { - "type": "reference", - "argument": "isVideoOnlyCall", - "category": "full", - "description": "Is Video Only call. Default is false." - }, - { - "type": "reference", - "argument": "isVideoPreferred", - "category": "full", - "description": "Is Video preferred" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "OutPeer" - }, - "id": 1, - "name": "peer" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "alias", - "childType": "msec" - } - }, - "id": 2, - "name": "timeout" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 3, - "name": "isAudioOnlyCall" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 4, - "name": "isVideoOnlyCall" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 6, - "name": "isVideoPreferred" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "UpgradeCall", - "header": 2677, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Method for upgrading a call from private call to group call", - { - "type": "reference", - "argument": "callId", - "category": "full", - "description": "Call Id" - }, - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": "Destination peer for upgrading" - } - ], - "attributes": [ - { - "type": "int64", - "id": 1, - "name": "callId" - }, - { - "type": { - "type": "struct", - "childType": "GroupOutPeer" - }, - "id": 2, - "name": "peer" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "DoCallAgain", - "header": 2678, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Call again to user", - { - "type": "reference", - "argument": "callId", - "category": "full", - "description": "Call Id" - }, - { - "type": "reference", - "argument": "user", - "category": "full", - "description": "User to call again" - } - ], - "attributes": [ - { - "type": "int64", - "id": 1, - "name": "callId" - }, - { - "type": { - "type": "struct", - "childType": "UserOutPeer" - }, - "id": 2, - "name": "user" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "JoinCall", - "header": 2683, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Joining Call", - { - "type": "reference", - "argument": "callId", - "category": "full", - "description": "Call Id" - } - ], - "attributes": [ - { - "type": "int64", - "id": 1, - "name": "callId" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "RejectCall", - "header": 2684, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Rejecting Call", - { - "type": "reference", - "argument": "callId", - "category": "full", - "description": "Call Id" - } - ], - "attributes": [ - { - "type": "int64", - "id": 1, - "name": "callId" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "OptimizeSDP", - "header": 2685, - "response": { - "type": "anonymous", - "header": 2686, - "doc": [ - { - "type": "reference", - "argument": "optimizedSDP", - "category": "hidden", - "description": " Optimized version of SDP" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "optimizedSDP" - } - ] - }, - "doc": [ - "Optimizing SDP", - { - "type": "reference", - "argument": "type", - "category": "full", - "description": "Type of SDP (offer or answer)" - }, - { - "type": "reference", - "argument": "sdp", - "category": "full", - "description": "SDP value" - }, - { - "type": "reference", - "argument": "ownSettings", - "category": "full", - "description": "Own Settings" - }, - { - "type": "reference", - "argument": "theirSettings", - "category": "full", - "description": "Their Settings" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "type" - }, - { - "type": "string", - "id": 2, - "name": "sdp" - }, - { - "type": { - "type": "struct", - "childType": "PeerSettings" - }, - "id": 3, - "name": "ownSettings" - }, - { - "type": { - "type": "struct", - "childType": "PeerSettings" - }, - "id": 4, - "name": "theirSettings" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "ICEServer", - "doc": [ - "ICE Server description", - { - "type": "reference", - "argument": "url", - "category": "full", - "description": " Url to server" - }, - { - "type": "reference", - "argument": "username", - "category": "full", - "description": " Optional username" - }, - { - "type": "reference", - "argument": "credential", - "category": "danger", - "description": " Optional credential" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "url" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 2, - "name": "username" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 3, - "name": "credential" - } - ] - } - }, - { - "type": "trait", - "content": { - "isContainer": "true", - "name": "WebRTCSignaling", - "attributes": [] - } - }, - { - "type": "comment", - "content": "Advertising" - }, - { - "type": "struct", - "content": { - "name": "AdvertiseSelf", - "doc": [ - "Advertizing self to a master mode", - { - "type": "reference", - "argument": "peerSettings", - "category": "full", - "description": " Optional peer Settings" - } - ], - "trait": { - "name": "WebRTCSignaling", - "key": 21 - }, - "attributes": [ - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "PeerSettings" - } - }, - "id": 1, - "name": "peerSettings" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "AdvertiseMaster", - "doc": [ - "Sent by master" - ], - "trait": { - "name": "WebRTCSignaling", - "key": 26 - }, - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "ICEServer" - } - }, - "id": 1, - "name": "server" - } - ] - } - }, - { - "type": "comment", - "content": "Web RTC signaling" - }, - { - "type": "struct", - "content": { - "name": "Candidate", - "doc": [ - "Candidate signal", - { - "type": "reference", - "argument": "sessionId", - "category": "full", - "description": " Session Id of candidate" - }, - { - "type": "reference", - "argument": "index", - "category": "full", - "description": " Index of candidate" - }, - { - "type": "reference", - "argument": "id", - "category": "full", - "description": " Id of candidate" - }, - { - "type": "reference", - "argument": "sdp", - "category": "full", - "description": " SDP of candidate" - } - ], - "trait": { - "name": "WebRTCSignaling", - "key": 3 - }, - "attributes": [ - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 1, - "name": "sessionId" - }, - { - "type": "int32", - "id": 2, - "name": "index" - }, - { - "type": "string", - "id": 3, - "name": "id" - }, - { - "type": "string", - "id": 4, - "name": "sdp" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "Offer", - "doc": [ - "Offer signal", - { - "type": "reference", - "argument": "sessionId", - "category": "full", - "description": " Session Id of offer" - }, - { - "type": "reference", - "argument": "sdp", - "category": "full", - "description": " Offer SDP" - }, - { - "type": "reference", - "argument": "ownPeerSettings", - "category": "full", - "description": " Optional Own Peer settings" - } - ], - "trait": { - "name": "WebRTCSignaling", - "key": 4 - }, - "attributes": [ - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 1, - "name": "sessionId" - }, - { - "type": "string", - "id": 2, - "name": "sdp" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "PeerSettings" - } - }, - "id": 3, - "name": "ownPeerSettings" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "Answer", - "doc": [ - "Answer signal", - { - "type": "reference", - "argument": "sessionId", - "category": "full", - "description": " Session Id of answer" - }, - { - "type": "reference", - "argument": "sdp", - "category": "full", - "description": " Answer SDP" - } - ], - "trait": { - "name": "WebRTCSignaling", - "key": 5 - }, - "attributes": [ - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 1, - "name": "sessionId" - }, - { - "type": "string", - "id": 2, - "name": "sdp" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "MediaStreamsUpdated", - "doc": [ - "Update about media stream settings updated. Can be sent before offer/answer.", - { - "type": "reference", - "argument": "isAudioEnabled", - "category": "full", - "description": " Is Audio Enabled in current connection. True by default." - }, - { - "type": "reference", - "argument": "isVideoEnabled", - "category": "full", - "description": " Is Video Enabled in current connection. False by default." - } - ], - "trait": { - "name": "WebRTCSignaling", - "key": 28 - }, - "attributes": [ - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 1, - "name": "isAudioEnabled" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 2, - "name": "isVideoEnabled" - } - ] - } - }, - { - "type": "comment", - "content": "Call Controlling events" - }, - { - "type": "struct", - "content": { - "name": "NeedOffer", - "doc": [ - "Notification from master that offer is required", - { - "type": "reference", - "argument": "device", - "category": "full", - "description": " Destination Device Id" - }, - { - "type": "reference", - "argument": "sessionId", - "category": "full", - "description": " Session Id" - }, - { - "type": "reference", - "argument": "peerSettings", - "category": "full", - "description": " Optional peer settings" - } - ], - "trait": { - "name": "WebRTCSignaling", - "key": 8 - }, - "attributes": [ - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 1, - "name": "device" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 2, - "name": "sessionId" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "struct", - "childType": "PeerSettings" - } - }, - "id": 3, - "name": "peerSettings" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "NegotinationSuccessful", - "doc": [ - "Notification about on negotiation is successful", - { - "type": "reference", - "argument": "device", - "category": "full", - "description": " Device Id" - }, - { - "type": "reference", - "argument": "sessionId", - "category": "full", - "description": " Session Id" - } - ], - "trait": { - "name": "WebRTCSignaling", - "key": 24 - }, - "attributes": [ - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 1, - "name": "device" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 2, - "name": "sessionId" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "EnableConnection", - "doc": [ - "Notification about enabling connection to peer", - { - "type": "reference", - "argument": "device", - "category": "full", - "description": " Device Id" - }, - { - "type": "reference", - "argument": "sessionId", - "category": "full", - "description": " Session Id" - } - ], - "trait": { - "name": "WebRTCSignaling", - "key": 22 - }, - "attributes": [ - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 1, - "name": "device" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 2, - "name": "sessionId" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "OnRenegotiationNeeded", - "doc": [ - "Need renegotiate session. For example when streams are changed.", - { - "type": "reference", - "argument": "device", - "category": "full", - "description": " Device Id" - }, - { - "type": "reference", - "argument": "sessionId", - "category": "full", - "description": " Session Id" - } - ], - "trait": { - "name": "WebRTCSignaling", - "key": 25 - }, - "attributes": [ - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 1, - "name": "device" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 2, - "name": "sessionId" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "CloseSession", - "doc": [ - "Close this session and be ready to", - { - "type": "reference", - "argument": "device", - "category": "hidden", - "description": " Device Id" - }, - { - "type": "reference", - "argument": "sessionId", - "category": "full", - "description": " Session Id for renegotiation" - } - ], - "trait": { - "name": "WebRTCSignaling", - "key": 6 - }, - "attributes": [ - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 1, - "name": "device" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 2, - "name": "sessionId" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "NeedDisconnect", - "doc": [ - "Notification about requirement about required disconnection from peer", - { - "type": "reference", - "argument": "device", - "category": "hidden", - "description": " Device Id" - } - ], - "trait": { - "name": "WebRTCSignaling", - "key": 20 - }, - "attributes": [ - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 1, - "name": "device" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "ActiveCall", - "doc": [ - "Active Calls. Used in broadcasting states of current calls.", - { - "type": "reference", - "argument": "callId", - "category": "full", - "description": " Call Id" - }, - { - "type": "reference", - "argument": "peer", - "category": "full", - "description": " Call's peer" - }, - { - "type": "reference", - "argument": "callMembers", - "category": "full", - "description": " Call Members" - } - ], - "attributes": [ - { - "type": "int64", - "id": 1, - "name": "callId" - }, - { - "type": { - "type": "struct", - "childType": "Peer" - }, - "id": 2, - "name": "peer" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "CallMember" - } - }, - "id": 3, - "name": "callMembers" - } - ] - } - }, - { - "type": "enum", - "content": { - "name": "CallMemberState", - "values": [ - { - "name": "RINGING", - "id": 1 - }, - { - "name": "RINGING_REACHED", - "id": 4 - }, - { - "name": "CONNECTING", - "id": 2 - }, - { - "name": "CONNECTED", - "id": 3 - }, - { - "name": "ENDED", - "id": 5 - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "CallMemberStateHolder", - "doc": [ - "Call Member state holder", - { - "type": "reference", - "argument": "state", - "category": "full", - "description": " State Value" - }, - { - "type": "reference", - "argument": "fallbackIsRinging", - "category": "full", - "description": " Fallback flag for future compatibility of state" - }, - { - "type": "reference", - "argument": "fallbackIsConnected", - "category": "full", - "description": " Fallback flag for future compatibility of state" - }, - { - "type": "reference", - "argument": "fallbackIsConnecting", - "category": "full", - "description": " Fallback flag for future compatibility of state" - }, - { - "type": "reference", - "argument": "fallbackIsRingingReached", - "category": "full", - "description": " Fallback flag for future compatibility of state" - }, - { - "type": "reference", - "argument": "fallbackIsEnded", - "category": "full", - "description": " Fallback flag for future compatibility of state" - } - ], - "attributes": [ - { - "type": { - "type": "enum", - "childType": "CallMemberState" - }, - "id": 1, - "name": "state" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 2, - "name": "fallbackIsRinging" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 3, - "name": "fallbackIsConnected" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 4, - "name": "fallbackIsConnecting" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 5, - "name": "fallbackIsRingingReached" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 6, - "name": "fallbackIsEnded" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "CallMember", - "doc": [ - "Call Member", - { - "type": "reference", - "argument": "userId", - "category": "full", - "description": " Member User Id" - }, - { - "type": "reference", - "argument": "state", - "category": "full", - "description": " State of member" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "userId" - }, - { - "type": { - "type": "struct", - "childType": "CallMemberStateHolder" - }, - "id": 3, - "name": "state" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "PeerSettings", - "doc": [ - "Peer Settings", - { - "type": "reference", - "argument": "is3DESSupported", - "category": "full", - "description": " Marking if 3DES supported. Default is false." - }, - { - "type": "reference", - "argument": "isMobile", - "category": "full", - "description": " Is Peer a mobile phone. Default is false." - }, - { - "type": "reference", - "argument": "canBeAudioRelay", - "category": "full", - "description": " If peer can audio relay. Default is false." - }, - { - "type": "reference", - "argument": "canPreConnect", - "category": "full", - "description": " If peer can preconnect before answer" - } - ], - "attributes": [ - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 1, - "name": "is3DESSupported" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 2, - "name": "isMobile" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 3, - "name": "canBeAudioRelay" - }, - { - "type": { - "type": "opt", - "childType": "bool" - }, - "id": 4, - "name": "canPreConnect" - } - ] - } - } - ] - }, - { - "title": "Config sync", - "package": "configs", - "doc": [ - "Parameter Syncronization across devices. Can be used for simple sync", - "across devices without rewriting server side code." - ], - "items": [ - { - "type": "struct", - "content": { - "name": "Parameter", - "doc": [ - "Syncing Parameter", - { - "type": "reference", - "argument": "key", - "category": "full", - "description": " Key of parameter" - }, - { - "type": "reference", - "argument": "value", - "category": "full", - "description": " Value of parameter" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "key" - }, - { - "type": "string", - "id": 2, - "name": "value" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "GetParameters", - "header": 134, - "response": { - "type": "anonymous", - "header": 135, - "doc": [ - { - "type": "reference", - "argument": "parameters", - "category": "full", - "description": " Current parameters" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Parameter" - } - }, - "id": 1, - "name": "parameters" - } - ] - }, - "doc": [ - "Getting Parameters" - ], - "attributes": [] - } - }, - { - "type": "rpc", - "content": { - "name": "EditParameter", - "header": 128, - "response": { - "type": "reference", - "name": "Seq" - }, - "doc": [ - "Change parameter value", - { - "type": "reference", - "argument": "key", - "category": "full", - "description": "Key of parameter" - }, - { - "type": "reference", - "argument": "value", - "category": "full", - "description": "Value of parameter" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "key" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 2, - "name": "value" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "ParameterChanged", - "header": 131, - "doc": [ - "Update about parameter change", - { - "type": "reference", - "argument": "key", - "category": "full", - "description": " Key of parameter" - }, - { - "type": "reference", - "argument": "value", - "category": "full", - "description": " Value of parameter" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "key" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 2, - "name": "value" - } - ] - } - } - ] - }, - { - "title": "Stats", - "package": "stats", - "doc": [ - "Saving statistics information" - ], - "items": [ - { - "type": "struct", - "content": { - "name": "EventRecord", - "doc": [ - "Record for stored event" - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 1, - "name": "date" - }, - { - "type": { - "type": "trait", - "childType": "Event" - }, - "id": 2, - "name": "event" - } - ] - } - }, - { - "type": "trait", - "content": { - "isContainer": "true", - "name": "Event", - "attributes": [] - } - }, - { - "type": "struct", - "content": { - "name": "UntypedEvent", - "doc": [ - "Untyped event", - { - "type": "reference", - "argument": "eventType", - "category": "full", - "description": " Event type" - }, - { - "type": "reference", - "argument": "params", - "category": "full", - "description": " optional params for event" - } - ], - "trait": { - "name": "Event", - "key": 1 - }, - "expandable": "true", - "attributes": [ - { - "type": "string", - "id": 1, - "name": "eventType" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "trait", - "childType": "RawValue" - } - }, - "id": 2, - "name": "params" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "ContentViewChanged", - "doc": [ - "Content view event", - { - "type": "reference", - "argument": "contentType", - "category": "full", - "description": " unique content id" - }, - { - "type": "reference", - "argument": "visible", - "category": "full", - "description": " Is content visible" - }, - { - "type": "reference", - "argument": "params", - "category": "full", - "description": " optional params for content view" - } - ], - "trait": { - "name": "Event", - "key": 2 - }, - "expandable": "true", - "attributes": [ - { - "type": "string", - "id": 1, - "name": "contentType" - }, - { - "type": "string", - "id": 2, - "name": "contentId" - }, - { - "type": "bool", - "id": 3, - "name": "visible" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "trait", - "childType": "RawValue" - } - }, - "id": 4, - "name": "params" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "AppVisibleChanged", - "doc": [ - "On App Visible event", - { - "type": "reference", - "argument": "visible", - "category": "full", - "description": " Is app visible" - } - ], - "trait": { - "name": "Event", - "key": 4 - }, - "expandable": "true", - "attributes": [ - { - "type": "bool", - "id": 1, - "name": "visible" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "StoreEvents", - "header": 243, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Storing events on server", - { - "type": "reference", - "argument": "events", - "category": "full", - "description": "Events for storing" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "trait", - "childType": "Event" - } - }, - "id": 1, - "name": "events" - } - ] - } - } - ] - }, - { - "title": "Raw API", - "package": "raw", - "doc": [ - "Schema-less API that is useful for external integrations" - ], - "items": [ - { - "type": "rpc", - "content": { - "name": "RawRequest", - "header": 2569, - "response": { - "type": "anonymous", - "header": 2570, - "doc": [ - "Response of a raw request", - { - "type": "reference", - "argument": "result", - "category": "full", - "description": " Result of request" - } - ], - "attributes": [ - { - "type": { - "type": "trait", - "childType": "RawValue" - }, - "id": 1, - "name": "result" - } - ] - }, - "doc": [ - "Making raw request to external service via shema-less RPC request", - { - "type": "reference", - "argument": "service", - "category": "full", - "description": "Service name for RPC request" - }, - { - "type": "reference", - "argument": "method", - "category": "full", - "description": "Method for execution" - }, - { - "type": "reference", - "argument": "params", - "category": "full", - "description": "Optional params for the method" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "service" - }, - { - "type": "string", - "id": 2, - "name": "method" - }, - { - "type": { - "type": "opt", - "childType": { - "type": "trait", - "childType": "RawValue" - } - }, - "id": 3, - "name": "params" - } - ] - } - } - ] - }, - { - "title": "Wallpappers", - "package": "wallpappers", - "doc": [ - "Wallpappers support" - ], - "items": [ - { - "type": "struct", - "content": { - "name": "Wallpapper", - "doc": [ - "Wallpapper structure", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": " Wallpapper id" - }, - { - "type": "reference", - "argument": "w", - "category": "full", - "description": " Image width" - }, - { - "type": "reference", - "argument": "h", - "category": "full", - "description": " Image height" - }, - { - "type": "reference", - "argument": "fileSize", - "category": "full", - "description": " Image file size" - }, - { - "type": "reference", - "argument": "file", - "category": "full", - "description": " Image file reference" - }, - { - "type": "reference", - "argument": "thumb", - "category": "full", - "description": " Image thumb" - } - ], - "attributes": [ - { - "type": "int32", - "id": 7, - "name": "id" - }, - { - "type": "int32", - "id": 1, - "name": "w" - }, - { - "type": "int32", - "id": 2, - "name": "h" - }, - { - "type": "int32", - "id": 3, - "name": "fileSize" - }, - { - "type": { - "type": "struct", - "childType": "FileLocation" - }, - "id": 5, - "name": "file" - }, - { - "type": { - "type": "struct", - "childType": "FastThumb" - }, - "id": 6, - "name": "thumb" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "LoadWallpappers", - "header": 241, - "response": { - "type": "anonymous", - "header": 242, - "doc": [ - "Loaded Wallpappers", - { - "type": "reference", - "argument": "wallpappers", - "category": "full", - "description": " Available wallpapper list" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Wallpapper" - } - }, - "id": 1, - "name": "wallpappers" - } - ] - }, - "doc": [ - "Load available wallpappers", - { - "type": "reference", - "argument": "maxWidth", - "category": "full", - "description": "Maximum width of wallpapper" - }, - { - "type": "reference", - "argument": "maxHeight", - "category": "full", - "description": "Maximum height of wallpapper" - } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "maxWidth" - }, - { - "type": "int32", - "id": 2, - "name": "maxHeight" - } - ] - } - } - ] - }, - { - "title": "Push", - "package": "push", - "doc": [ - "Vendor's pushes for receiving push notifications.", - "Push notification contains current sequence number of main sequence." - ], - "items": [ - { - "type": "rpc", - "content": { - "name": "RegisterGooglePush", - "header": 51, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Registering push token on server", - { - "type": "reference", - "argument": "projectId", - "category": "hidden", - "description": "Project Id of token" - }, - { - "type": "reference", - "argument": "token", - "category": "danger", - "description": "token value" - } - ], - "attributes": [ - { - "type": "int64", - "id": 1, - "name": "projectId" - }, - { - "type": "string", - "id": 2, - "name": "token" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "UnregisterGooglePush", - "header": 2631, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Unregistering Google Push", - { - "type": "reference", - "argument": "token", - "category": "danger", - "description": "Token value" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "token" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "RegisterApplePush", - "header": 76, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Registering apple push on server", - { - "type": "reference", - "argument": "apnsKey", - "category": "hidden", - "description": "apns key id" - }, - { - "type": "reference", - "argument": "token", - "category": "danger", - "description": "token value" - } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "apnsKey" - }, - { - "type": "string", - "id": 2, - "name": "token" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "UnregisterApplePush", - "header": 2632, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Unregistering Apple Push", - { - "type": "reference", - "argument": "token", - "category": "full", - "description": "Token" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "token" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "RegisterApplePushKit", - "header": 2576, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Registration of a new Apple's PushKit tokens", - { - "type": "reference", - "argument": "apnsKey", - "category": "hidden", - "description": "APNS key id" - }, - { - "type": "reference", - "argument": "token", - "category": "danger", - "description": "token value" - } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "apnsKey" - }, - { - "type": "string", - "id": 2, - "name": "token" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "UnregisterApplePushKit", - "header": 2633, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Unregistering Apple Push Kit token", - { - "type": "reference", - "argument": "token", - "category": "hidden", - "description": "Token Value" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "token" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "RegisterApplePushToken", - "header": 2593, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Registering Apple Push Token", - { - "type": "reference", - "argument": "bundleId", - "category": "full", - "description": "Bundle Id of app" - }, - { - "type": "reference", - "argument": "token", - "category": "full", - "description": "Push token" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "bundleId" - }, - { - "type": "string", - "id": 2, - "name": "token" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "UnregisterApplePushToken", - "header": 2634, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Unregister Apple Push token", - { - "type": "reference", - "argument": "token", - "category": "hidden", - "description": "Token value" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "token" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "RegisterActorPush", - "header": 2575, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Register Actor Push endpoint", - { - "type": "reference", - "argument": "endpoint", - "category": "full", - "description": "Endpoint for push sending" - }, - { - "type": "reference", - "argument": "encryptionKeys", - "category": "full", - "description": "Push Encryption keys" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "endpoint" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "EncryptionKey" - } - }, - "id": 2, - "name": "encryptionKeys" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "UnregisterActorPush", - "header": 2635, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Unregister Actor Push endpoint", - { - "type": "reference", - "argument": "endpoint", - "category": "full", - "description": "Endpoint for unregistering" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "endpoint" - } - ] - } - } - ] - }, - { - "title": "Encryption", - "package": "encryption", - "doc": [ - "Package that include encryption support", - "Key alg types:", - "* curve25519 - https://en.wikipedia.org/wiki/Curve25519", - "* rsa-2048", - "* rsa-4096", - "* aes-128", - "* kuznechik-128", - "", - "Signature alg types:", - "* Ed25519 - used curve25519 conveted to Ed255519 for signing and validataion" - ], - "items": [ - { - "type": "comment", - "content": "Public Keys" - }, - { - "type": "struct", - "content": { - "name": "EncryptionKeyGroup", - "doc": [ - "Encryption Key Group", - { - "type": "reference", - "argument": "keyGroupId", - "category": "full", - "description": " Key Group Id" - }, - { - "type": "reference", - "argument": "identityKey", - "category": "full", - "description": " Key that is used as identity and for validation of Key Group changes" - }, - { - "type": "reference", - "argument": "supportedEncryption", - "category": "full", - "description": " Supported encryption methods by this key group" - }, - { - "type": "reference", - "argument": "keys", - "category": "compact", - "description": " keys of Key Group" - }, - { - "type": "reference", - "argument": "signatures", - "category": "compact", - "description": " Signatures of keys" - } - ], - "expandable": "true", - "attributes": [ - { - "type": { - "type": "alias", - "childType": "keyGroupId" - }, - "id": 1, - "name": "keyGroupId" - }, - { - "type": { - "type": "list", - "childType": "string" - }, - "id": 2, - "name": "supportedEncryption" - }, - { - "type": { - "type": "struct", - "childType": "EncryptionKey" - }, - "id": 3, - "name": "identityKey" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "EncryptionKey" - } - }, - "id": 4, - "name": "keys" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "EncryptionKeySignature" - } - }, - "id": 5, - "name": "signatures" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "EncryptionKeySignature", - "doc": [ - "Signed Key. Usually used for public keys.", - { - "type": "reference", - "argument": "keyId", - "category": "full", - "description": " Key Id used for signature" - }, - { - "type": "reference", - "argument": "signatureAlg", - "category": "full", - "description": " Signature algorithm" - }, - { - "type": "reference", - "argument": "signature", - "category": "full", - "description": " Signature value" - } - ], - "attributes": [ - { - "type": "int64", - "id": 1, - "name": "keyId" - }, - { - "type": "string", - "id": 2, - "name": "signatureAlg" - }, - { - "type": "bytes", - "id": 3, - "name": "signature" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "EncryptionKey", - "doc": [ - "Encryption Key", - { - "type": "reference", - "argument": "keyId", - "category": "full", - "description": " Key Id" - }, - { - "type": "reference", - "argument": "keyAlg", - "category": "full", - "description": " Key Algorithm" - }, - { - "type": "reference", - "argument": "keyMaterial", - "category": "compact", - "description": " Public key material. Can be null, but always not null for LoadPublicKey" - }, - { - "type": "reference", - "argument": "keyHash", - "category": "hidden", - "description": " If keyMaterial is null, pass keyHash - SHA256 of key" - } - ], - "expandable": "true", - "attributes": [ - { - "type": "int64", - "id": 1, - "name": "keyId" - }, - { - "type": "string", - "id": 2, - "name": "keyAlg" - }, - { - "type": { - "type": "opt", - "childType": "bytes" - }, - "id": 3, - "name": "keyMaterial" - }, - { - "type": { - "type": "opt", - "childType": "bytes" - }, - "id": 4, - "name": "keyHash" - } - ] - } - }, - { - "type": "response", - "content": { - "name": "PublicKeys", - "header": 2602, - "doc": [ - "Public Keys response", - { - "type": "reference", - "argument": "publicKey", - "category": "full", - "description": " Public keys" - }, - { - "type": "reference", - "argument": "signatures", - "category": "full", - "description": " Signatures of public keys" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "EncryptionKey" - } - }, - "id": 1, - "name": "publicKey" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "EncryptionKeySignature" - } - }, - "id": 2, - "name": "signatures" - } - ] - } - }, - { - "type": "response", - "content": { - "name": "PublicKeyGroups", - "header": 2604, - "doc": [ - "Public key groups response" - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "EncryptionKeyGroup" - } - }, - "id": 1, - "name": "publicKeyGroups" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "LoadPublicKeyGroups", - "header": 2601, - "response": { - "type": "reference", - "name": "PublicKeyGroups" - }, - "doc": [ - "Loading Public key groups", - { - "type": "reference", - "argument": "userPeer", - "category": "full", - "description": "User's peer" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "UserOutPeer" - }, - "id": 1, - "name": "userPeer" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "LoadPublicKey", - "header": 2605, - "response": { - "type": "reference", - "name": "PublicKeys" - }, - "doc": [ - "Loading public key explictly", - { - "type": "reference", - "argument": "userPeer", - "category": "full", - "description": "User's peer" - }, - { - "type": "reference", - "argument": "keyGroupId", - "category": "full", - "description": "Key group's id" - }, - { - "type": "reference", - "argument": "keyIds", - "category": "full", - "description": "Key ids for loading" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "UserOutPeer" - }, - "id": 1, - "name": "userPeer" - }, - { - "type": "int32", - "id": 2, - "name": "keyGroupId" - }, - { - "type": { - "type": "list", - "childType": "int64" - }, - "id": 3, - "name": "keyIds" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "LoadPrePublicKeys", - "header": 2603, - "response": { - "type": "reference", - "name": "PublicKeys" - }, - "doc": [ - "Loading SOME of ephermal public keys", - { - "type": "reference", - "argument": "userPeer", - "category": "full", - "description": "User's peer" - }, - { - "type": "reference", - "argument": "keyGroupId", - "category": "full", - "description": "User's key group id" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "UserOutPeer" - }, - "id": 1, - "name": "userPeer" - }, - { - "type": "int32", - "id": 2, - "name": "keyGroupId" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "PublicKeyGroupChanged", - "header": 103, - "doc": [ - "Update about public key group changed", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " User's id" - }, - { - "type": "reference", - "argument": "keyGroup", - "category": "full", - "description": " Updated Key Group" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": { - "type": "struct", - "childType": "EncryptionKeyGroup" - }, - "id": 2, - "name": "keyGroup" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "KeysAdded", - "header": 112, - "doc": [ - "Update about keys added to Key Group", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " User's id" - }, - { - "type": "reference", - "argument": "keyGroupId", - "category": "full", - "description": " Key Group Id" - }, - { - "type": "reference", - "argument": "keys", - "category": "compact", - "description": " Added keys" - }, - { - "type": "reference", - "argument": "signatures", - "category": "compact", - "description": " Signatures of a public key" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": { - "type": "alias", - "childType": "keyGroupId" - }, - "id": 2, - "name": "keyGroupId" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "EncryptionKey" - } - }, - "id": 3, - "name": "keys" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "EncryptionKeySignature" - } - }, - "id": 4, - "name": "signatures" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "KeysRemoved", - "header": 113, - "doc": [ - "Update about keys removed from Key Group", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " User's id" - }, - { - "type": "reference", - "argument": "keyGroupId", - "category": "full", - "description": " Key Group Id" - }, - { - "type": "reference", - "argument": "keyIds", - "category": "full", - "description": " Removed keys" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": { - "type": "alias", - "childType": "keyGroupId" - }, - "id": 2, - "name": "keyGroupId" - }, - { - "type": { - "type": "list", - "childType": "int64" - }, - "id": 3, - "name": "keyIds" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "PublicKeyGroupAdded", - "header": 104, - "doc": [ - "Update about public key group added", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " User's id" - }, - { - "type": "reference", - "argument": "keyGroup", - "category": "full", - "description": " Added Key Group" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": { - "type": "struct", - "childType": "EncryptionKeyGroup" - }, - "id": 2, - "name": "keyGroup" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "PublicKeyGroupRemoved", - "header": 105, - "doc": [ - "Update about public key group removed", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " User's id" - }, - { - "type": "reference", - "argument": "keyGroupId", - "category": "full", - "description": " Removed Key Group Id" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": { - "type": "alias", - "childType": "keyGroupId" - }, - "id": 2, - "name": "keyGroupId" - } - ] - } - }, - { - "type": "comment", - "content": "Device Side" - }, - { - "type": "rpc", - "content": { - "name": "CreateNewKeyGroup", - "header": 2609, - "response": { - "type": "anonymous", - "header": 2610, - "doc": [ - { - "type": "reference", - "argument": "keyGroupId", - "category": "full", - "description": " Created Key Group id" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "keyGroupId" - }, - "id": 1, - "name": "keyGroupId" - } - ] - }, - "doc": [ - "Creation of a new Key Group", - { - "type": "reference", - "argument": "identityKey", - "category": "full", - "description": "Identity Key of a new group" - }, - { - "type": "reference", - "argument": "supportedEncryptions", - "category": "full", - "description": "Supported encryption methods" - }, - { - "type": "reference", - "argument": "keys", - "category": "full", - "description": "keys of current group" - }, - { - "type": "reference", - "argument": "signatures", - "category": "full", - "description": "signatures of keys" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "EncryptionKey" - }, - "id": 1, - "name": "identityKey" - }, - { - "type": { - "type": "list", - "childType": "string" - }, - "id": 2, - "name": "supportedEncryptions" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "EncryptionKey" - } - }, - "id": 3, - "name": "keys" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "EncryptionKeySignature" - } - }, - "id": 4, - "name": "signatures" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "DeleteKeyGroup", - "header": 2611, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Deletion of a Key Group", - { - "type": "reference", - "argument": "keyGroupId", - "category": "full", - "description": "Key Group Id for deletion" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "keyGroupId" - }, - "id": 1, - "name": "keyGroupId" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "DisconnectKeyGroup", - "header": 2613, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Disconnect Key Group from device", - { - "type": "reference", - "argument": "keyGroupId", - "category": "full", - "description": "Key Group Id for disconnection" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "keyGroupId" - }, - "id": 1, - "name": "keyGroupId" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "ConnectKeyGroup", - "header": 2614, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Connectiong Key Group to device", - { - "type": "reference", - "argument": "keyGroupId", - "category": "full", - "description": "Key Group Id for connection" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "keyGroupId" - }, - "id": 1, - "name": "keyGroupId" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "UploadPreKey", - "header": 2612, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Uploading Ephermal Keys", - { - "type": "reference", - "argument": "keyGroupId", - "category": "full", - "description": "Key Group Id" - }, - { - "type": "reference", - "argument": "keys", - "category": "compact", - "description": "Encryprion keys" - }, - { - "type": "reference", - "argument": "signatures", - "category": "compact", - "description": "Key signatures" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "keyGroupId" - }, - "id": 1, - "name": "keyGroupId" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "EncryptionKey" - } - }, - "id": 2, - "name": "keys" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "EncryptionKeySignature" - } - }, - "id": 3, - "name": "signatures" - } - ] - } - }, - { - "type": "comment", - "content": "Encrypted Packages" - }, - { - "type": "struct", - "content": { - "name": "EncryptedBox", - "doc": [ - "Encrypted package that is encrypted for multiple keys", - { - "type": "reference", - "argument": "keys", - "category": "full", - "description": " Encrypted encryption keys" - }, - { - "type": "reference", - "argument": "algType", - "category": "full", - "description": " Package encryption type" - }, - { - "type": "reference", - "argument": "encPackage", - "category": "full", - "description": " Encrypted package" - }, - { - "type": "reference", - "argument": "senderKeyGroupId", - "category": "full", - "description": " Sender key group" - } - ], - "expandable": "true", - "attributes": [ - { - "type": { - "type": "alias", - "childType": "keyGroupId" - }, - "id": 4, - "name": "senderKeyGroupId" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "EncyptedBoxKey" - } - }, - "id": 1, - "name": "keys" - }, - { - "type": "string", - "id": 2, - "name": "algType" - }, - { - "type": "bytes", - "id": 3, - "name": "encPackage" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "EncryptedBoxSignature" - } - }, - "id": 5, - "name": "signatures" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "EncryptedBoxSignature", - "doc": [ - "Signature for encrypted package", - { - "type": "reference", - "argument": "algType", - "category": "full", - "description": " Alg Type" - }, - { - "type": "reference", - "argument": "signature", - "category": "full", - "description": " Signature of encrypted package" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "algType" - }, - { - "type": "bytes", - "id": 2, - "name": "signature" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "EncyptedBoxKey", - "doc": [ - "Encrypted package encryption key", - { - "type": "reference", - "argument": "keyGroupId", - "category": "full", - "description": " Key Group Id" - }, - { - "type": "reference", - "argument": "algType", - "category": "full", - "description": " Key encryption algorithm" - }, - { - "type": "reference", - "argument": "encryptedKey", - "category": "hidden", - "description": " Encrypted encryption key" - } - ], - "expandable": "true", - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "usersId" - }, - { - "type": { - "type": "alias", - "childType": "keyGroupId" - }, - "id": 2, - "name": "keyGroupId" - }, - { - "type": "string", - "id": 3, - "name": "algType" - }, - { - "type": "bytes", - "id": 4, - "name": "encryptedKey" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "KeyGroupId", - "doc": [ - "References to key groups", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " User's id" - }, - { - "type": "reference", - "argument": "keyGroupId", - "category": "full", - "description": " Key Group Id" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": { - "type": "alias", - "childType": "keyGroupId" - }, - "id": 2, - "name": "keyGroupId" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "KeyGroupHolder", - "doc": [ - "Key Group Holder", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " User's id" - }, - { - "type": "reference", - "argument": "keyGroup", - "category": "full", - "description": " Key Group" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" - }, - { - "type": { - "type": "struct", - "childType": "EncryptionKeyGroup" - }, - "id": 2, - "name": "keyGroup" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "SendEncryptedPackage", - "header": 2657, - "response": { - "type": "anonymous", - "header": 2664, - "doc": [ - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " date" - }, - { - "type": "reference", - "argument": "obsoleteKeyGroups", - "category": "full", - "description": " obsolete key group ids" - }, - { - "type": "reference", - "argument": "missedKeyGroups", - "category": "full", - "description": " missed key groups" - } - ], - "attributes": [ - { - "type": { - "type": "opt", - "childType": { - "type": "alias", - "childType": "date" - } - }, - "id": 1, - "name": "date" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "KeyGroupId" - } - }, - "id": 2, - "name": "obsoleteKeyGroups" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "KeyGroupHolder" - } - }, - "id": 3, - "name": "missedKeyGroups" - } - ] - }, - "doc": [ - "Sending encrypted package", - { - "type": "reference", - "argument": "randomId", - "category": "hidden", - "description": "Random id" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 1, - "name": "randomId" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "UserOutPeer" - } - }, - "id": 2, - "name": "destPeers" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "KeyGroupId" - } - }, - "id": 3, - "name": "ignoredKeyGroups" - }, - { - "type": { - "type": "struct", - "childType": "EncryptedBox" - }, - "id": 4, - "name": "encryptedBox" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "EncryptedPackage", - "header": 177, - "doc": [ - "Update about encrypted package", - { - "type": "reference", - "argument": "randomId", - "category": "full", - "description": " Random Id of package" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " Sending date of package" - }, - { - "type": "reference", - "argument": "senderId", - "category": "full", - "description": " Sender id of package" - }, - { - "type": "reference", - "argument": "encryptedBox", - "category": "full", - "description": " Encrypted box" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 1, - "name": "randomId" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 2, - "name": "date" - }, - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 3, - "name": "senderId" - }, - { - "type": { - "type": "struct", - "childType": "EncryptedBox" - }, - "id": 4, - "name": "encryptedBox" - } - ] - } - } - ] - }, - { - "title": "Storage", - "package": "storage", - "items": [ - { - "type": "rpc", - "content": { - "name": "UploadSharedBlob", - "header": 2660, - "response": { - "type": "anonymous", - "header": 2661, - "doc": [ - { - "type": "reference", - "argument": "sharedObjectId", - "category": "full", - "description": " Id of shared object" - } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "sharedObjectId" - } - ] - }, - "doc": [ - "Upload shared blob with user", - { - "type": "reference", - "argument": "destPeer", - "category": "full", - "description": "Destination peer" - }, - { - "type": "reference", - "argument": "bucket", - "category": "full", - "description": "Bucked name" - }, - { - "type": "reference", - "argument": "blob", - "category": "full", - "description": "Blob data" - }, - { - "type": "reference", - "argument": "randomId", - "category": "full", - "description": "Random id for protecting from double upload" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "UserOutPeer" - }, - "id": 1, - "name": "destPeer" - }, - { - "type": "string", - "id": 2, - "name": "bucket" - }, - { - "type": "bytes", - "id": 3, - "name": "blob" - }, - { - "type": { - "type": "alias", - "childType": "randomId" - }, - "id": 4, - "name": "randomId" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "DownloadSharedBlob", - "header": 2662, - "response": { - "type": "anonymous", - "header": 2663, - "doc": [ - { - "type": "reference", - "argument": "blob", - "category": "full", - "description": " Blob contents" - } - ], - "attributes": [ - { - "type": "bytes", - "id": 1, - "name": "blob" - } - ] - }, - "doc": [ - "Download shared blob", - { - "type": "reference", - "argument": "destPeer", - "category": "full", - "description": "Destination peer" - }, - { - "type": "reference", - "argument": "bucket", - "category": "full", - "description": "Bucket name" - }, - { - "type": "reference", - "argument": "objectId", - "category": "full", - "description": "Object Id" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "UserOutPeer" - }, - "id": 1, - "name": "destPeer" - }, - { - "type": "string", - "id": 2, - "name": "bucket" - }, - { - "type": "int32", - "id": 3, - "name": "objectId" - } - ] - } - } - ] - }, - { - "title": "Peers", - "package": "peers", - "doc": [ - "Peer is an identificator of specific conversation." - ], - "items": [ - { - "type": "enum", - "content": { - "name": "PeerType", - "values": [ - { - "name": "Private", - "id": 1 - }, - { - "name": "Group", - "id": 2 - }, - { - "name": "EncryptedPrivate", - "id": 3 - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "Peer", - "doc": [ - "Peer", - { - "type": "reference", - "argument": "type", - "category": "full", - "description": " Peer Type" - }, - { - "type": "reference", - "argument": "id", - "category": "full", - "description": " Peer Id" - } - ], - "attributes": [ - { - "type": { - "type": "enum", - "childType": "PeerType" - }, - "id": 1, - "name": "type" - }, - { - "type": "int32", - "id": 2, - "name": "id" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "OutPeer", - "doc": [ - "Out peer with access hash", - { - "type": "reference", - "argument": "type", - "category": "full", - "description": " Peer Type" - }, - { - "type": "reference", - "argument": "id", - "category": "full", - "description": " Peer Id" - }, - { - "type": "reference", - "argument": "accessHash", - "category": "danger", - "description": " Peer access hash" - } - ], - "attributes": [ - { - "type": { - "type": "enum", - "childType": "PeerType" - }, - "id": 1, - "name": "type" - }, - { - "type": "int32", - "id": 2, - "name": "id" - }, - { - "type": "int64", - "id": 3, - "name": "accessHash" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "UserOutPeer", - "doc": [ - "User's out peer", - { - "type": "reference", - "argument": "uid", - "category": "full", - "description": " User's id" - }, - { - "type": "reference", - "argument": "accessHash", - "category": "danger", - "description": " User's access hash" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "userId" - }, - "id": 1, - "name": "uid" + "name": "Text", + "id": 2 }, { - "type": "int64", - "id": 2, - "name": "accessHash" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "GroupOutPeer", - "doc": [ - "Group's out peer", - { - "type": "reference", - "argument": "groupId", - "category": "full", - "description": " Group's Id" + "name": "Links", + "id": 3 }, { - "type": "reference", - "argument": "accessHash", - "category": "danger", - "description": " Group's access hash" - } - ], - "attributes": [ - { - "type": { - "type": "alias", - "childType": "groupId" - }, - "id": 1, - "name": "groupId" + "name": "Documents", + "id": 4 }, { - "type": "int64", - "id": 2, - "name": "accessHash" + "name": "Photos", + "id": 5 } - ] - } + ] } - ] - }, - { - "title": "Sequence and Updates", - "package": "sequence", + },{"type":"trait","content":{ +"isContainer":"true","name":"SearchCondition","attributes":[ +]}}, { + "type":"struct", + "content": { + "name":"SearchPeerTypeCondition", +"doc":[ +"Search peer type condition",{"type":"reference","argument":"peerType","category":"full","description":" Peer type for searching"}],"trait":{"name":"SearchCondition","key":1},"attributes":[ +{"type":{"type":"enum","childType":"SearchPeerType"},"id":1,"name":"peerType"} +]}}, { + "type":"struct", + "content": { + "name":"SearchPieceText", +"doc":[ +"Search peer name condition",{"type":"reference","argument":"query","category":"full","description":" Search query"}],"trait":{"name":"SearchCondition","key":2},"attributes":[ +{"type":"string","id":1,"name":"query"} +]}}, { + "type":"struct", + "content": { + "name":"SearchAndCondition", +"doc":[ +"Search AND condion",{"type":"reference","argument":"andQuery","category":"full","description":" And Query"}],"trait":{"name":"SearchCondition","key":3},"attributes":[ +{"type":{"type":"list","childType":{"type":"trait","childType":"SearchCondition"}},"id":1,"name":"andQuery"} +]}}, { + "type":"struct", + "content": { + "name":"SearchOrCondition", +"doc":[ +"Search OR condition",{"type":"reference","argument":"orQuery","category":"full","description":" Or Query"}],"trait":{"name":"SearchCondition","key":4},"attributes":[ +{"type":{"type":"list","childType":{"type":"trait","childType":"SearchCondition"}},"id":2,"name":"orQuery"} +]}}, { + "type":"struct", + "content": { + "name":"SearchPeerCondition", +"doc":[ +"Serch Peer condition",{"type":"reference","argument":"peer","category":"full","description":" Peer condition"}],"trait":{"name":"SearchCondition","key":5},"attributes":[ +{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"} +]}}, { + "type":"struct", + "content": { + "name":"SearchPeerContentType", +"doc":[ +"Search content type condition",{"type":"reference","argument":"contentType","category":"full","description":" Content Type"}],"trait":{"name":"SearchCondition","key":6},"attributes":[ +{"type":{"type":"enum","childType":"SearchContentType"},"id":1,"name":"contentType"} +]}}, { + "type":"struct", + "content": { + "name":"SearchSenderIdConfition", +"doc":[ +"Searching sender uid condition",{"type":"reference","argument":"senderId","category":"full","description":" sender UID"}],"trait":{"name":"SearchCondition","key":7},"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"senderId"} +]}}, { + "type":"struct", + "content": { + "name":"PeerSearchResult", +"doc":[ +"Peer search result",{"type":"reference","argument":"peer","category":"full","description":" Peer information"},{"type":"reference","argument":"optMatchString","category":"full","description":" Description"}],"attributes":[ +{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"} +,{"type":{"type":"opt","childType":"string"},"id":3,"name":"optMatchString"} +]}},{"type":"rpc","content":{ +"name":"PeerSearch", +"header":233, +"response":{"type":"anonymous","header":234, "doc":[ +"Found peers",{"type":"reference","argument":"searchResults","category":"full","description":" Search Results"},{"type":"reference","argument":"users","category":"full","description":" Related users"},{"type":"reference","argument":"groups","category":"full","description":" Related groups"},{"type":"reference","argument":"userPeers","category":"full","description":" Related user peers"},{"type":"reference","argument":"groupPeers","category":"full","description":" Related group peers"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"PeerSearchResult"}},"id":1,"name":"searchResults"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":2,"name":"users"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"Group"}},"id":3,"name":"groups"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":4,"name":"userPeers"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"GroupOutPeer"}},"id":5,"name":"groupPeers"} +]}, +"doc":[ +"Performing peer search",{"type":"reference","argument":"query","category":"full","description":"Search query. Warring not all combinations can be processed by server. (acts as OR)"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled Optimizations"}],"attributes":[ +{"type":{"type":"list","childType":{"type":"trait","childType":"SearchCondition"}},"id":1,"name":"query"} +,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":2,"name":"optimizations"} +]}}, { + "type":"struct", + "content": { + "name":"MessageSearchResult", +"doc":[ +"Message container",{"type":"reference","argument":"peer","category":"full","description":" Message Peer"},{"type":"reference","argument":"rid","category":"full","description":" Message Random Id"},{"type":"reference","argument":"date","category":"full","description":" Message Date"},{"type":"reference","argument":"senderId","category":"full","description":" Message sender UID"},{"type":"reference","argument":"content","category":"full","description":" Message content"}],"attributes":[ +{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"} +,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"rid"} +,{"type":{"type":"alias","childType":"date"},"id":3,"name":"date"} +,{"type":{"type":"alias","childType":"userId"},"id":4,"name":"senderId"} +,{"type":{"type":"trait","childType":"Message"},"id":5,"name":"content"} +]}}, { + "type":"struct", + "content": { + "name":"MessageSearchItem", +"doc":[ +"Message Search result container"],"attributes":[ +{"type":{"type":"struct","childType":"MessageSearchResult"},"id":1,"name":"result"} +]}},{"type":"response","content":{ +"name":"MessageSearchResponse", +"header":218, +"doc":[ +"Search Result",{"type":"reference","argument":"searchResults","category":"full","description":" Search results"},{"type":"reference","argument":"users","category":"full","description":" Search users"},{"type":"reference","argument":"groups","category":"full","description":" Search groups"},{"type":"reference","argument":"loadMoreState","category":"hidden","description":" State for loading more results"},{"type":"reference","argument":"userOutPeers","category":"full","description":" Search user peers"},{"type":"reference","argument":"groupOutPeers","category":"full","description":" Search group peers"}],"attributes":[ +{"type":{"type":"list","childType":{"type":"struct","childType":"MessageSearchItem"}},"id":1,"name":"searchResults"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":2,"name":"users"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"Group"}},"id":3,"name":"groups"} +,{"type":{"type":"opt","childType":"bytes"},"id":4,"name":"loadMoreState"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":5,"name":"userOutPeers"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"GroupOutPeer"}},"id":6,"name":"groupOutPeers"} +]}},{"type":"rpc","content":{ +"name":"MessageSearch", +"header":217, +"response":{"type":"reference","name":"MessageSearchResponse"}, +"doc":[ +"Performing message search",{"type":"reference","argument":"query","category":"full","description":"Search query"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled Optimizations"}],"attributes":[ +{"type":{"type":"trait","childType":"SearchCondition"},"id":1,"name":"query"} +,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":2,"name":"optimizations"} +]}},{"type":"rpc","content":{ +"name":"MessageSearchMore", +"header":222, +"response":{"type":"reference","name":"MessageSearchResponse"}, +"doc":[ +"Performing message search paging",{"type":"reference","argument":"loadMoreState","category":"hidden","description":"State for loading more results"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled Optimizations"}],"attributes":[ +{"type":"bytes","id":1,"name":"loadMoreState"} +,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":2,"name":"optimizations"} +]}}]}, { + "title": "Public Groups", + "package": "pubgroups", "doc": [ - "Each device has it's own update sequence. At the begining application request initial sequence state by", - "calling GetState. On each application restart or NewSessionCreated application calls GetDifference for receiving", - "updates in update sequence.", - "GetState and GetDifference automatically subscribes session to receiving updates in session.", - "Each update has seq and state. Seq is sequental index of updated and used for detecting of holes in update sequence", - "(because of server failure or session die) on client side.", - "All updates needed to be processed in partucular order according to seq values.", - "In some updates there can be references to users that are not available at client yer. In this case application need", - "to ignore such update and init getting difference." + "Public group is easy way to find communities" ], + "items": [ + { + "type":"struct", + "content": { + "name":"PublicGroup", +"doc":[ +"Public Group description",{"type":"reference","argument":"id","category":"full","description":" Group id"},{"type":"reference","argument":"accessHash","category":"danger","description":" Group Access hash"},{"type":"reference","argument":"title","category":"full","description":" Group title"},{"type":"reference","argument":"avatar","category":"full","description":" Group avatar"},{"type":"reference","argument":"membersCount","category":"full","description":" Members count in group"},{"type":"reference","argument":"friendsCount","category":"full","description":" Friends count int group"},{"type":"reference","argument":"description","category":"full","description":" Description of group"}],"attributes":[ +{"type":"int32","id":1,"name":"id"} +,{"type":"int64","id":2,"name":"accessHash"} +,{"type":"string","id":3,"name":"title"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"Avatar"}},"id":7,"name":"avatar"} +,{"type":"int32","id":4,"name":"membersCount"} +,{"type":"int32","id":5,"name":"friendsCount"} +,{"type":"string","id":6,"name":"description"} +]}},{"type":"rpc","content":{ +"name":"GetPublicGroups", +"header":201, +"response":{"type":"anonymous","header":202, "doc":[ +"Loaded public groups",{"type":"reference","argument":"groups","category":"full","description":" All available groups"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"PublicGroup"}},"id":1,"name":"groups"} +]}, +"doc":[ +"Getting public groups"],"attributes":[ +]}}]}, { + "title": "Invites", + "package": "invites", + "doc": [ + "Invite mechanizm" + ], + "items": [ + { + "type":"struct", + "content": { + "name":"InviteState", +"doc":[ +"Invite state",{"type":"reference","argument":"email","category":"full","description":" Email of invite"},{"type":"reference","argument":"name","category":"full","description":" Name of invited user"},{"type":"reference","argument":"uid","category":"full","description":" Uid of registered user"},{"type":"reference","argument":"tid","category":"full","description":" Team id of invite"}],"attributes":[ +{"type":"string","id":1,"name":"email"} +,{"type":{"type":"opt","childType":"string"},"id":2,"name":"name"} +,{"type":{"type":"opt","childType":"int32"},"id":3,"name":"uid"} +,{"type":{"type":"opt","childType":"int32"},"id":4,"name":"tid"} +]}},{"type":"response","content":{ +"name":"InviteList", +"header":2564, +"doc":[ +"Intites list",{"type":"reference","argument":"invites","category":"full","description":" Intvites"},{"type":"reference","argument":"relatedUsers","category":"full","description":" Related users in invites"},{"type":"reference","argument":"relatedGroups","category":"full","description":" Related groups in invites"},{"type":"reference","argument":"relatedTeams","category":"full","description":" Related teams in invites"}],"attributes":[ +{"type":{"type":"list","childType":{"type":"struct","childType":"InviteState"}},"id":1,"name":"invites"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":2,"name":"relatedUsers"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"Group"}},"id":3,"name":"relatedGroups"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"Team"}},"id":4,"name":"relatedTeams"} +]}},{"type":"rpc","content":{ +"name":"LoadOwnSentInvites", +"header":2563, +"response":{"type":"reference","name":"InviteList"}, +"doc":[ +"Loading current invite states"],"attributes":[ +]}},{"type":"rpc","content":{ +"name":"SendInvite", +"header":2565, +"response":{"type":"reference","name":"InviteList"}, +"doc":[ +"Sending an email invite",{"type":"reference","argument":"email","category":"full","description":"Email for invite"},{"type":"reference","argument":"name","category":"full","description":"Optional name for invite"},{"type":"reference","argument":"destTeam","category":"full","description":"Optional team for invite"}],"attributes":[ +{"type":"string","id":1,"name":"email"} +,{"type":{"type":"opt","childType":"string"},"id":2,"name":"name"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"OutTeam"}},"id":3,"name":"destTeam"} +]}}]}, { + "title": "Teams", + "package": "teams", + "doc": [ + "Teams support for Actor" + ], + "items": [ + { + "type":"struct", + "content": { + "name":"Team", +"doc":[ +"Team entity",{"type":"reference","argument":"id","category":"full","description":" Team Id"},{"type":"reference","argument":"accessHash","category":"danger","description":" Team Access Hash"},{"type":"reference","argument":"name","category":"full","description":" Team name"}],"attributes":[ +{"type":"int32","id":1,"name":"id"} +,{"type":"int64","id":2,"name":"accessHash"} +,{"type":"string","id":3,"name":"name"} +]}}, { + "type":"struct", + "content": { + "name":"OutTeam", +"doc":[ +"Reference to a team",{"type":"reference","argument":"id","category":"full","description":" Team Id"},{"type":"reference","argument":"accessHash","category":"full","description":" Team access hash"}],"attributes":[ +{"type":"int32","id":1,"name":"id"} +,{"type":"int64","id":2,"name":"accessHash"} +]}},{"type":"response","content":{ +"name":"TeamsList", +"header":2562, +"doc":[ +"Teams response",{"type":"reference","argument":"teams","category":"hidden","description":" Teams list"}],"attributes":[ +{"type":{"type":"list","childType":{"type":"struct","childType":"Team"}},"id":1,"name":"teams"} +]}},{"type":"rpc","content":{ +"name":"LoadOwnTeams", +"header":2561, +"response":{"type":"reference","name":"TeamsList"}, +"doc":[ +"Loading own teams"],"attributes":[ +]}},{"type":"update","content":{ +"name":"OwnTeamsChanged", +"header":165, +"doc":[ +"Update about own teams changed",{"type":"reference","argument":"ownTeams","category":"full","description":" Updated own teams list"}],"attributes":[ +{"type":{"type":"list","childType":{"type":"struct","childType":"Team"}},"id":1,"name":"ownTeams"} +]}},{"type":"rpc","content":{ +"name":"CreateTeam", +"header":2566, +"response":{"type":"anonymous","header":2567, "doc":[ +"Created team response",{"type":"reference","argument":"createdTeam","category":"full","description":" Created Team"}] ,"attributes":[{"type":{"type":"struct","childType":"Team"},"id":1,"name":"createdTeam"} +]}, +"doc":[ +"Creation of a Team",{"type":"reference","argument":"title","category":"full","description":"Title of a team"}],"attributes":[ +{"type":"string","id":1,"name":"title"} +]}},{"type":"rpc","content":{ +"name":"InviteToTeam", +"header":2568, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Inviting people to team",{"type":"reference","argument":"user","category":"full","description":"Dest user"},{"type":"reference","argument":"destTeam","category":"full","description":"Dest team"}],"attributes":[ +{"type":{"type":"struct","childType":"UserOutPeer"},"id":1,"name":"user"} +,{"type":{"type":"struct","childType":"OutTeam"},"id":3,"name":"destTeam"} +]}}]}, { + "title": "Integrations", + "package": "integrations", + "doc": [ + "Package contains methods for providing integration" + ], + "items": [ +{"type":"response","content":{ +"name":"IntegrationToken", +"header":183, +"doc":[ +"Group token response",{"type":"reference","argument":"token","category":"danger","description":" current group token"},{"type":"reference","argument":"url","category":"danger","description":" current group url"}],"attributes":[ +{"type":"string","id":1,"name":"token"} +,{"type":"string","id":2,"name":"url"} +]}},{"type":"rpc","content":{ +"name":"GetIntegrationToken", +"header":182, +"response":{"type":"reference","name":"IntegrationToken"}, +"doc":[ +"Getting current group token",{"type":"reference","argument":"groupPeer","category":"full","description":"Peer"}],"attributes":[ +{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"groupPeer"} +]}},{"type":"rpc","content":{ +"name":"RevokeIntegrationToken", +"header":184, +"response":{"type":"reference","name":"IntegrationToken"}, +"doc":[ +"Revoke group token",{"type":"reference","argument":"groupPeer","category":"full","description":"Peer"}],"attributes":[ +{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"groupPeer"} +]}}]}, { + "title": "Typing and Online", + "package": "weak", "items": [ { - "type": "update_box", - "content": { - "name": "SeqUpdate", - "header": 13, - "doc": [ - "Sequence update", - { - "type": "reference", - "argument": "seq", - "category": "full", - "description": " Sequence number of update" - }, - { - "type": "reference", - "argument": "state", - "category": "compact", - "description": " Sequece state of update" - }, - { - "type": "reference", - "argument": "updateHeader", - "category": "full", - "description": " header of update" - }, - { - "type": "reference", - "argument": "update", - "category": "compact", - "description": " The update" - } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "seq" - }, - { - "type": { - "type": "alias", - "childType": "seq_state" - }, - "id": 2, - "name": "state" - }, - { - "type": "int32", - "id": 3, - "name": "updateHeader" - }, - { - "type": "bytes", - "id": 4, - "name": "update" - } - ] - } - }, - { - "type": "update_box", - "content": { - "name": "FatSeqUpdate", - "header": 73, - "doc": [ - "Fat sequence update with additional data", - { - "type": "reference", - "argument": "seq", - "category": "full", - "description": " Sequence number of update" - }, - { - "type": "reference", - "argument": "state", - "category": "compact", - "description": " Sequence state of update" - }, - { - "type": "reference", - "argument": "updateHeader", - "category": "full", - "description": " header of update" - }, - { - "type": "reference", - "argument": "update", - "category": "compact", - "description": " The update" - }, - { - "type": "reference", - "argument": "users", - "category": "compact", - "description": " Users that are referenced in update" - }, - { - "type": "reference", - "argument": "groups", - "category": "compact", - "description": " Groups that are referenced in update" - } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "seq" - }, - { - "type": { - "type": "alias", - "childType": "seq_state" - }, - "id": 2, - "name": "state" - }, - { - "type": "int32", - "id": 3, - "name": "updateHeader" - }, - { - "type": "bytes", - "id": 4, - "name": "update" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "User" - } - }, - "id": 5, - "name": "users" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Group" - } - }, - "id": 6, - "name": "groups" - } - ] - } - }, - { - "type": "update_box", + "type": "enum", "content": { - "name": "WeakUpdate", - "header": 26, - "doc": [ - "Out of sequence update (for typing and online statuses)", - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " Date of update" - }, - { - "type": "reference", - "argument": "updateHeader", - "category": "full", - "description": " Header of update" - }, - { - "type": "reference", - "argument": "update", - "category": "compact", - "description": " The update" - } - ], - "attributes": [ - { - "type": "int64", - "id": 1, - "name": "date" - }, - { - "type": "int32", - "id": 2, - "name": "updateHeader" - }, + "name": "TypingType", + "values": [ { - "type": "bytes", - "id": 3, - "name": "update" + "name": "Text", + "id": 0 } - ] - } - }, - { - "type": "update_box", + ] + } + },{"type":"rpc","content":{ +"name":"Typing", +"header":27, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Sending typing notification",{"type":"reference","argument":"peer","category":"full","description":"Destination peer"},{"type":"reference","argument":"typingType","category":"full","description":"typing type."}],"attributes":[ +{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"} +,{"type":{"type":"enum","childType":"TypingType"},"id":3,"name":"typingType"} +]}},{"type":"rpc","content":{ +"name":"StopTyping", +"header":30, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Stop typing",{"type":"reference","argument":"peer","category":"full","description":"Destination peer"},{"type":"reference","argument":"typingType","category":"full","description":"typing type"}],"attributes":[ +{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"} +,{"type":{"type":"enum","childType":"TypingType"},"id":2,"name":"typingType"} +]}}, { + "type": "enum", "content": { - "name": "WeakFatUpdate", - "header": 2673, - "doc": [ - "Fat Weak Update", - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " Date of update" - }, + "name": "DeviceType", + "values": [ { - "type": "reference", - "argument": "updateHeader", - "category": "full", - "description": " Header of update" + "name": "GENERIC", + "id": 1 }, { - "type": "reference", - "argument": "update", - "category": "full", - "description": " The update" + "name": "PC", + "id": 2 }, { - "type": "reference", - "argument": "users", - "category": "full", - "description": " Users that are referenced in update" + "name": "MOBILE", + "id": 3 }, { - "type": "reference", - "argument": "groups", - "category": "full", - "description": " Groups that are referenced in update" - } - ], - "attributes": [ - { - "type": "int64", - "id": 1, - "name": "date" + "name": "TABLET", + "id": 4 }, { - "type": "int32", - "id": 2, - "name": "updateHeader" + "name": "WATCH", + "id": 5 }, { - "type": "bytes", - "id": 3, - "name": "update" + "name": "MIRROR", + "id": 6 }, { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "User" - } - }, - "id": 4, - "name": "users" + "name": "CAR", + "id": 7 }, { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Group" - } - }, - "id": 5, - "name": "groups" + "name": "TABLE", + "id": 8 } - ] - } - }, - { - "type": "update_box", - "content": { - "name": "SeqUpdateTooLong", - "header": 25, - "doc": [ - "Notification about requiring performing manual GetDifference" - ], - "attributes": [] - } - }, - { - "type": "struct", + ] + } + },{"type":"rpc","content":{ +"name":"SetOnline", +"header":29, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Sending online state",{"type":"reference","argument":"isOnline","category":"full","description":"is user online"},{"type":"reference","argument":"timeout","category":"full","description":"timeout of online state in milliseconds"},{"type":"reference","argument":"deviceType","category":"full","description":"Optional device type"},{"type":"reference","argument":"deviceCategory","category":"full","description":"Optional device category, for example android or ios"}],"attributes":[ +{"type":"bool","id":1,"name":"isOnline"} +,{"type":{"type":"alias","childType":"msec"},"id":2,"name":"timeout"} +,{"type":{"type":"opt","childType":{"type":"enum","childType":"DeviceType"}},"id":3,"name":"deviceType"} +,{"type":{"type":"opt","childType":"string"},"id":4,"name":"deviceCategory"} +]}},{"type":"update","content":{ +"name":"PauseNotifications", +"header":166, +"doc":[ +"Update about pausing notifications",{"type":"reference","argument":"timeout","category":"full","description":" Timeout for notifications resume"}],"attributes":[ +{"type":{"type":"alias","childType":"sec"},"id":1,"name":"timeout"} +]}},{"type":"update","content":{ +"name":"RestoreNotifications", +"header":167, +"doc":[ +"Update about restoring notifications"],"attributes":[ +]}},{"type":"rpc","content":{ +"name":"PauseNotifications", +"header":2641, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Pause notifications",{"type":"reference","argument":"timeout","category":"hidden","description":"Timeout of pause"}],"attributes":[ +{"type":{"type":"alias","childType":"sec"},"id":1,"name":"timeout"} +]}},{"type":"rpc","content":{ +"name":"RestoreNotifications", +"header":2642, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Restoring notifications"],"attributes":[ +]}},{"type":"empty"},{"type":"update","content":{ +"name":"Typing", +"header":6, +"doc":[ +"Update about user's typing",{"type":"reference","argument":"peer","category":"full","description":" Conversation peer"},{"type":"reference","argument":"uid","category":"full","description":" User's id"},{"type":"reference","argument":"typingType","category":"full","description":" Type of typing"}],"attributes":[ +{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"} +,{"type":{"type":"alias","childType":"userId"},"id":2,"name":"uid"} +,{"type":{"type":"enum","childType":"TypingType"},"id":3,"name":"typingType"} +]}},{"type":"update","content":{ +"name":"TypingStop", +"header":81, +"doc":[ +"Update about user's typing stop",{"type":"reference","argument":"peer","category":"full","description":" Conversation peer"},{"type":"reference","argument":"uid","category":"full","description":" User's id"},{"type":"reference","argument":"typingType","category":"hidden","description":" Type of typing"}],"attributes":[ +{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"} +,{"type":{"type":"alias","childType":"userId"},"id":2,"name":"uid"} +,{"type":{"type":"enum","childType":"TypingType"},"id":3,"name":"typingType"} +]}},{"type":"update","content":{ +"name":"UserOnline", +"header":7, +"doc":[ +"Update about user became online",{"type":"reference","argument":"uid","category":"full","description":" User's Id"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":{"type":"opt","childType":{"type":"enum","childType":"DeviceType"}},"id":2,"name":"deviceType"} +,{"type":{"type":"opt","childType":"string"},"id":3,"name":"deviceCategory"} +]}},{"type":"update","content":{ +"name":"UserOffline", +"header":8, +"doc":[ +"Update about user became offline",{"type":"reference","argument":"uid","category":"full","description":" User's id"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":{"type":"opt","childType":{"type":"enum","childType":"DeviceType"}},"id":2,"name":"deviceType"} +,{"type":{"type":"opt","childType":"string"},"id":3,"name":"deviceCategory"} +]}},{"type":"update","content":{ +"name":"UserLastSeen", +"header":9, +"doc":[ +"Update about user's last seen state",{"type":"reference","argument":"uid","category":"full","description":" User's id"},{"type":"reference","argument":"date","category":"full","description":" Last seen time"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":{"type":"alias","childType":"date"},"id":2,"name":"date"} +,{"type":{"type":"opt","childType":{"type":"enum","childType":"DeviceType"}},"id":3,"name":"deviceType"} +,{"type":{"type":"opt","childType":"string"},"id":4,"name":"deviceCategory"} +]}},{"type":"update","content":{ +"name":"GroupOnline", +"header":33, +"doc":[ +"Update about group online change",{"type":"reference","argument":"groupId","category":"full","description":" Group id"},{"type":"reference","argument":"count","category":"full","description":" current online user's count"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":"int32","id":2,"name":"count"} +]}}]}, { + "title": "Media and Files", + "package": "files", + "items": [ + { + "type":"struct", + "content": { + "name":"FileLocation", +"doc":[ +"Location of file on server",{"type":"reference","argument":"fileId","category":"full","description":" Unique Id of file"},{"type":"reference","argument":"accessHash","category":"danger","description":" Access hash of file"}],"expandable":"true","attributes":[ +{"type":"int64","id":1,"name":"fileId"} +,{"type":"int64","id":2,"name":"accessHash"} +]}}, { + "type":"struct", + "content": { + "name":"ImageLocation", +"doc":[ +"Image location",{"type":"reference","argument":"fileLocation","category":"full","description":" Location of file"},{"type":"reference","argument":"width","category":"full","description":" Width of avatar image"},{"type":"reference","argument":"height","category":"full","description":" Height of avatar image"},{"type":"reference","argument":"fileSize","category":"full","description":" Size of file"}],"expandable":"true","attributes":[ +{"type":{"type":"struct","childType":"FileLocation"},"id":1,"name":"fileLocation"} +,{"type":"int32","id":2,"name":"width"} +,{"type":"int32","id":3,"name":"height"} +,{"type":"int32","id":4,"name":"fileSize"} +]}}, { + "type":"struct", + "content": { + "name":"AvatarImage", +"doc":[ +"Avatar Image",{"type":"reference","argument":"fileLocation","category":"full","description":" Location of file"},{"type":"reference","argument":"width","category":"full","description":" Width of avatar image"},{"type":"reference","argument":"height","category":"full","description":" Height of avatar image"},{"type":"reference","argument":"fileSize","category":"full","description":" Size of file"}],"expandable":"true","attributes":[ +{"type":{"type":"struct","childType":"FileLocation"},"id":1,"name":"fileLocation"} +,{"type":"int32","id":2,"name":"width"} +,{"type":"int32","id":3,"name":"height"} +,{"type":"int32","id":4,"name":"fileSize"} +]}}, { + "type":"struct", + "content": { + "name":"Avatar", +"doc":[ +"Avatar of User or Group",{"type":"reference","argument":"smallImage","category":"compact","description":" Optional small image of avatar box in 100x100"},{"type":"reference","argument":"largeImage","category":"compact","description":" Optional large image of avatar box in 200x200"},{"type":"reference","argument":"fullImage","category":"compact","description":" Optional full screen image of avatar"}],"expandable":"true","attributes":[ +{"type":{"type":"opt","childType":{"type":"struct","childType":"AvatarImage"}},"id":1,"name":"smallImage"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"AvatarImage"}},"id":2,"name":"largeImage"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"AvatarImage"}},"id":3,"name":"fullImage"} +]}}, { + "type":"struct", + "content": { + "name":"FastThumb", +"doc":[ +"Fast thumb of media messages. Less than 90x90 and compressed by JPEG with low quality",{"type":"reference","argument":"w","category":"full","description":" Width of thumb"},{"type":"reference","argument":"h","category":"full","description":" Height of thump"},{"type":"reference","argument":"thumb","category":"compact","description":" compressed image data"}],"expandable":"true","attributes":[ +{"type":"int32","id":1,"name":"w"} +,{"type":"int32","id":2,"name":"h"} +,{"type":"bytes","id":3,"name":"thumb"} +]}}, { + "type": "enum", "content": { - "name": "UpdateContainer", - "doc": [ - "Update container", + "name": "Colors", + "values": [ { - "type": "reference", - "argument": "updateHeader", - "category": "full", - "description": " Header of update" + "name": "red", + "id": 1 }, { - "type": "reference", - "argument": "update", - "category": "compact", - "description": " The updatre" - } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "updateHeader" + "name": "yellow", + "id": 2 }, { - "type": "bytes", - "id": 2, - "name": "update" + "name": "green", + "id": 3 } - ] - } - }, - { - "type": "update_box", + ] + } + },{"type":"trait","content":{ +"isContainer":"true","name":"Color","attributes":[ +]}}, { + "type":"struct", + "content": { + "name":"RgbColor", +"doc":[ +"RGB Color",{"type":"reference","argument":"rgb","category":"full","description":" RGB color value"}],"trait":{"name":"Color","key":1},"expandable":"true","attributes":[ +{"type":"int32","id":1,"name":"rgb"} +]}}, { + "type":"struct", + "content": { + "name":"PredefinedColor", +"doc":[ +"Predefined color",{"type":"reference","argument":"color","category":"hidden","description":" Predefined color value"}],"trait":{"name":"Color","key":2},"expandable":"true","attributes":[ +{"type":{"type":"enum","childType":"Colors"},"id":1,"name":"color"} +]}},{"type":"empty"}, { + "type":"struct", + "content": { + "name":"HTTPHeader", +"doc":[ +"HTTP Header record",{"type":"reference","argument":"key","category":"full","description":" HTTP Header name"},{"type":"reference","argument":"value","category":"full","description":" HTTP Header value"}],"attributes":[ +{"type":"string","id":1,"name":"key"} +,{"type":"string","id":2,"name":"value"} +]}}, { + "type":"struct", + "content": { + "name":"FileUrlDescription", +"doc":[ +"File url description",{"type":"reference","argument":"fileId","category":"full","description":" File id of url"},{"type":"reference","argument":"url","category":"full","description":" Url for downloading"},{"type":"reference","argument":"timeout","category":"full","description":" Timeout of url"},{"type":"reference","argument":"unsignedUrl","category":"hidden","description":" Unsigned URL (used to honor web caches)"},{"type":"reference","argument":"unsignedUrlHeaders","category":"hidden","description":" Headers that is required to download files with unsigned url"}],"attributes":[ +{"type":"int64","id":1,"name":"fileId"} +,{"type":"string","id":2,"name":"url"} +,{"type":{"type":"alias","childType":"sec"},"id":3,"name":"timeout"} +,{"type":{"type":"opt","childType":"string"},"id":4,"name":"unsignedUrl"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"HTTPHeader"}},"id":5,"name":"unsignedUrlHeaders"} +]}},{"type":"rpc","content":{ +"name":"GetFileUrl", +"header":77, +"response":{"type":"anonymous","header":78, "doc":[ +{"type":"reference","argument":"url","category":"full","description":" Url for downloading"},{"type":"reference","argument":"timeout","category":"full","description":" Timeout of url"},{"type":"reference","argument":"unsignedUrl","category":"full","description":" Unsigned URL (used to honor web caches)"},{"type":"reference","argument":"unsignedUrlHeaders","category":"full","description":" Headers that is required to download files with unsigned url"}] ,"attributes":[{"type":"string","id":1,"name":"url"} +,{"type":{"type":"alias","childType":"sec"},"id":2,"name":"timeout"} +,{"type":{"type":"opt","childType":"string"},"id":3,"name":"unsignedUrl"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"HTTPHeader"}},"id":4,"name":"unsignedUrlHeaders"} +]}, +"doc":[ +"Requesting file URL for downloading",{"type":"reference","argument":"file","category":"full","description":"file's location"}],"attributes":[ +{"type":{"type":"struct","childType":"FileLocation"},"id":1,"name":"file"} +]}},{"type":"rpc","content":{ +"name":"GetFileUrls", +"header":2573, +"response":{"type":"anonymous","header":2574, "doc":[ +{"type":"reference","argument":"fileUrls","category":"full","description":" File urls"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"FileUrlDescription"}},"id":1,"name":"fileUrls"} +]}, +"doc":[ +"Requesting multiple fle URL for downloading",{"type":"reference","argument":"files","category":"hidden","description":"File locations to load urls"}],"attributes":[ +{"type":{"type":"list","childType":{"type":"struct","childType":"FileLocation"}},"id":1,"name":"files"} +]}},{"type":"rpc","content":{ +"name":"GetFileUrlBuilder", +"header":2579, +"response":{"type":"anonymous","header":2580, "doc":[ +{"type":"reference","argument":"baseUrl","category":"full","description":" Base Url for files"},{"type":"reference","argument":"algo","category":"full","description":" Signature algorithm"},{"type":"reference","argument":"seed","category":"full","description":" Public-visible seed of signature"},{"type":"reference","argument":"signatureSecret","category":"full","description":" Signature Secret"},{"type":"reference","argument":"timeout","category":"full","description":" Timeout of url builder"}] ,"attributes":[{"type":"string","id":1,"name":"baseUrl"} +,{"type":"string","id":2,"name":"algo"} +,{"type":"string","id":5,"name":"seed"} +,{"type":"bytes","id":3,"name":"signatureSecret"} +,{"type":{"type":"alias","childType":"sec"},"id":4,"name":"timeout"} +]}, +"doc":[ +"Get File URL Builder that allows to build file urls from client side",{"type":"reference","argument":"supportedSignatureAlgorithms","category":"hidden","description":"Supported signature algorithms by client"}],"attributes":[ +{"type":{"type":"list","childType":"string"},"id":1,"name":"supportedSignatureAlgorithms"} +]}},{"type":"rpc","content":{ +"name":"GetFileUploadUrl", +"header":97, +"response":{"type":"anonymous","header":121, "doc":[ +{"type":"reference","argument":"url","category":"full","description":" Url for uploading"},{"type":"reference","argument":"uploadKey","category":"compact","description":" Upload key for upload"}] ,"attributes":[{"type":"string","id":1,"name":"url"} +,{"type":"bytes","id":2,"name":"uploadKey"} +]}, +"doc":[ +"Requesting pload url",{"type":"reference","argument":"expectedSize","category":"full","description":"Expected size of uploading file. May be inaccurate. Used for size allocation optimizations."}],"attributes":[ +{"type":"int32","id":1,"name":"expectedSize"} +]}},{"type":"rpc","content":{ +"name":"CommitFileUpload", +"header":122, +"response":{"type":"anonymous","header":138, "doc":[ +{"type":"reference","argument":"uploadedFileLocation","category":"hidden","description":" Result file location"}] ,"attributes":[{"type":{"type":"struct","childType":"FileLocation"},"id":1,"name":"uploadedFileLocation"} +]}, +"doc":[ +"Comminting uploaded file to storage"],"attributes":[ +{"type":"bytes","id":1,"name":"uploadKey"} +,{"type":"string","id":2,"name":"fileName"} +]}},{"type":"rpc","content":{ +"name":"GetFileUploadPartUrl", +"header":142, +"response":{"type":"anonymous","header":141, "doc":[ +{"type":"reference","argument":"url","category":"full","description":" Upload file part url"}] ,"attributes":[{"type":"string","id":1,"name":"url"} +]}, +"doc":[ +"Upload file part",{"type":"reference","argument":"uploadKey","category":"compact","description":"Upload Key from requestFileUploadUrl"}],"attributes":[ +{"type":"int32","id":1,"name":"partNumber"} +,{"type":"int32","id":2,"name":"partSize"} +,{"type":"bytes","id":3,"name":"uploadKey"} +]}}]}, { + "title": "Features", + "package": "features", + "doc": [ + "Enable feature discovery. Currently available features:", + "* \"call\" - private audio calls" + ], + "items": [ +{"type":"rpc","content":{ +"name":"EnableFeature", +"header":2588, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Enabling feature on the device",{"type":"reference","argument":"featureName","category":"full","description":"Feature name"},{"type":"reference","argument":"args","category":"danger","description":"Optional arguments to a feature"}],"attributes":[ +{"type":"string","id":1,"name":"featureName"} +,{"type":{"type":"opt","childType":"bytes"},"id":2,"name":"args"} +]}},{"type":"rpc","content":{ +"name":"DisableFeature", +"header":2589, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Disabling feature on the device",{"type":"reference","argument":"featureName","category":"full","description":"Feature name"}],"attributes":[ +{"type":"string","id":1,"name":"featureName"} +]}},{"type":"rpc","content":{ +"name":"CheckFeatureEnabled", +"header":2590, +"response":{"type":"reference","name":"Bool"}, +"doc":[ +"Method for checking if feature is available to user"],"attributes":[ +{"type":{"type":"struct","childType":"UserOutPeer"},"id":1,"name":"userOutPeer"} +,{"type":"string","id":2,"name":"featureName"} +]}}]}, { + "title": "EventBus", + "package": "eventbus", + "items": [ +{"type":"rpc","content":{ +"name":"CreateNewEventBus", +"header":2665, +"response":{"type":"anonymous","header":2666, "doc":[ +"Created new Event Bus",{"type":"reference","argument":"id","category":"full","description":" Event Bus Id"},{"type":"reference","argument":"deviceId","category":"full","description":" Your Device Id"}] ,"attributes":[{"type":{"type":"alias","childType":"busId"},"id":1,"name":"id"} +,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"deviceId"} +]}, +"doc":[ +"Create new Event Bus",{"type":"reference","argument":"timeout","category":"full","description":"Optional timeout of Event Bus"},{"type":"reference","argument":"isOwned","category":"full","description":"Is Event Bus owned by creator"}],"attributes":[ +{"type":{"type":"opt","childType":{"type":"alias","childType":"msec"}},"id":1,"name":"timeout"} +,{"type":{"type":"opt","childType":"bool"},"id":2,"name":"isOwned"} +]}},{"type":"rpc","content":{ +"name":"JoinEventBus", +"header":2668, +"response":{"type":"anonymous","header":2669, "doc":[ +{"type":"reference","argument":"deviceId","category":"full","description":" Your Device Id"},{"type":"reference","argument":"rejoinToken","category":"full","description":" Token that can be used for rejoining event bus with same device id"}] ,"attributes":[{"type":{"type":"alias","childType":"randomId"},"id":1,"name":"deviceId"} +,{"type":{"type":"opt","childType":"bytes"},"id":2,"name":"rejoinToken"} +]}, +"doc":[ +"Joining Event Bus",{"type":"reference","argument":"id","category":"full","description":"Event Bus Id"},{"type":"reference","argument":"timeout","category":"full","description":"Join timeout"}],"attributes":[ +{"type":{"type":"alias","childType":"busId"},"id":1,"name":"id"} +,{"type":{"type":"opt","childType":{"type":"alias","childType":"msec"}},"id":2,"name":"timeout"} +]}},{"type":"rpc","content":{ +"name":"ReJoinEventBus", +"header":2675, +"response":{"type":"anonymous","header":2676, "doc":[ +{"type":"reference","argument":"deviceId","category":"hidden","description":" Your Device Id"}] ,"attributes":[{"type":{"type":"alias","childType":"randomId"},"id":1,"name":"deviceId"} +]}, +"doc":[ +"Rejoining to event bus after session was disposed",{"type":"reference","argument":"id","category":"full","description":"Event Bus Id"},{"type":"reference","argument":"rejoinToken","category":"full","description":"Rejoin Token"}],"attributes":[ +{"type":{"type":"alias","childType":"busId"},"id":1,"name":"id"} +,{"type":"bytes","id":2,"name":"rejoinToken"} +]}},{"type":"rpc","content":{ +"name":"KeepAliveEventBus", +"header":2670, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Keep Alive Event Bus",{"type":"reference","argument":"id","category":"full","description":"Event Bus Id"},{"type":"reference","argument":"timeout","category":"full","description":"Optional timeout for keep alive"}],"attributes":[ +{"type":{"type":"alias","childType":"busId"},"id":1,"name":"id"} +,{"type":{"type":"opt","childType":{"type":"alias","childType":"msec"}},"id":2,"name":"timeout"} +]}},{"type":"rpc","content":{ +"name":"DisposeEventBus", +"header":2667, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Dispose Event Bus",{"type":"reference","argument":"id","category":"full","description":"Event Bus Id"}],"attributes":[ +{"type":{"type":"alias","childType":"busId"},"id":1,"name":"id"} +]}},{"type":"rpc","content":{ +"name":"PostToEventBus", +"header":2671, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Event Bus Destination",{"type":"reference","argument":"id","category":"full","description":"Bus Id"},{"type":"reference","argument":"destinations","category":"full","description":"If Empty need to broadcase message to everyone"},{"type":"reference","argument":"message","category":"hidden","description":"Message"}],"attributes":[ +{"type":{"type":"alias","childType":"busId"},"id":1,"name":"id"} +,{"type":{"type":"list","childType":{"type":"alias","childType":"randomId"}},"id":2,"name":"destinations"} +,{"type":"bytes","id":3,"name":"message"} +]}},{"type":"update","content":{ +"name":"EventBusDeviceConnected", +"header":2561, +"doc":[ +"Update about pubsub device connected",{"type":"reference","argument":"id","category":"full","description":" ID of Event Bus"},{"type":"reference","argument":"userId","category":"full","description":" Joined User Id"},{"type":"reference","argument":"deviceId","category":"full","description":" Joined Device Unique Id"}],"attributes":[ +{"type":{"type":"alias","childType":"busId"},"id":1,"name":"id"} +,{"type":{"type":"opt","childType":{"type":"alias","childType":"userId"}},"id":2,"name":"userId"} +,{"type":{"type":"alias","childType":"randomId"},"id":3,"name":"deviceId"} +]}},{"type":"update","content":{ +"name":"EventBusDeviceDisconnected", +"header":2563, +"doc":[ +"Update about device disconnected",{"type":"reference","argument":"id","category":"full","description":" ID of Event Bus"},{"type":"reference","argument":"userId","category":"full","description":" Joined User Id"},{"type":"reference","argument":"deviceId","category":"full","description":" Disconnected Device unique Id"}],"attributes":[ +{"type":{"type":"alias","childType":"busId"},"id":1,"name":"id"} +,{"type":{"type":"opt","childType":{"type":"alias","childType":"userId"}},"id":2,"name":"userId"} +,{"type":{"type":"alias","childType":"randomId"},"id":3,"name":"deviceId"} +]}},{"type":"update","content":{ +"name":"EventBusMessage", +"header":2562, +"doc":[ +"Event Bus Message",{"type":"reference","argument":"id","category":"full","description":" Event Bus Id"},{"type":"reference","argument":"senderId","category":"full","description":" Sender of message"},{"type":"reference","argument":"senderDeviceId","category":"full","description":" Device Id of sender"},{"type":"reference","argument":"message","category":"hidden","description":" Message"}],"attributes":[ +{"type":{"type":"alias","childType":"busId"},"id":1,"name":"id"} +,{"type":{"type":"opt","childType":{"type":"alias","childType":"userId"}},"id":2,"name":"senderId"} +,{"type":{"type":"opt","childType":{"type":"alias","childType":"randomId"}},"id":3,"name":"senderDeviceId"} +,{"type":"bytes","id":4,"name":"message"} +]}},{"type":"update","content":{ +"name":"EventBusDisposed", +"header":2564, +"doc":[ +"Event Bus dispose",{"type":"reference","argument":"id","category":"full","description":" Event Bus Id"}],"attributes":[ +{"type":{"type":"alias","childType":"busId"},"id":1,"name":"id"} +]}}]}, { + "title": "Values", + "package": "values", + "doc": [ + "Synced Values" + ], + "items": [ + { + "type":"struct", + "content": { + "name":"SyncedValue", +"doc":[ +"Synced Value container",{"type":"reference","argument":"id","category":"full","description":" Unique Id of a value. Unique in the scope of one named value."},{"type":"reference","argument":"value","category":"full","description":" Optional value"}],"attributes":[ +{"type":{"type":"alias","childType":"randomId"},"id":1,"name":"id"} +,{"type":{"type":"opt","childType":"bytes"},"id":2,"name":"value"} +]}},{"type":"rpc","content":{ +"name":"LoadSyncedSet", +"header":2679, +"response":{"type":"anonymous","header":2680, "doc":[ +{"type":"reference","argument":"values","category":"full","description":" Current set values"},{"type":"reference","argument":"isStrong","category":"full","description":" Is this value strong and stored in sequence. By default is true."}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"SyncedValue"}},"id":1,"name":"values"} +,{"type":{"type":"opt","childType":"bool"},"id":2,"name":"isStrong"} +]}, +"doc":[ +"Loading synced set",{"type":"reference","argument":"setName","category":"hidden","description":"readable name of the set"}],"attributes":[ +{"type":"string","id":1,"name":"setName"} +]}},{"type":"update","content":{ +"name":"SynedSetUpdated", +"header":72, +"doc":[ +"Update about synced set update",{"type":"reference","argument":"setName","category":"full","description":" Set Name"},{"type":"reference","argument":"syncedValues","category":"full","description":" Current set values"},{"type":"reference","argument":"isStrong","category":"full","description":" Is this value strong and need to be stored on disk"}],"attributes":[ +{"type":"string","id":1,"name":"setName"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"SyncedValue"}},"id":2,"name":"syncedValues"} +,{"type":{"type":"opt","childType":"bool"},"id":3,"name":"isStrong"} +]}},{"type":"update","content":{ +"name":"SyncedSetAddedOrUpdated", +"header":73, +"doc":[ +"Update about added or updated values in the synced set",{"type":"reference","argument":"setName","category":"full","description":" Set Name"},{"type":"reference","argument":"addedOrUpdatedValues","category":"hidden","description":" Added or updated values"}],"attributes":[ +{"type":"string","id":1,"name":"setName"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"SyncedValue"}},"id":2,"name":"addedOrUpdatedValues"} +]}},{"type":"update","content":{ +"name":"SyncedSetRemoved", +"header":74, +"doc":[ +"Update about removed items from synced set",{"type":"reference","argument":"setName","category":"full","description":" Set Name"},{"type":"reference","argument":"removedItems","category":"full","description":" Removed Items from the set"}],"attributes":[ +{"type":"string","id":1,"name":"setName"} +,{"type":{"type":"list","childType":{"type":"alias","childType":"randomId"}},"id":2,"name":"removedItems"} +]}}]}, { + "title": "WebRTC", + "package": "webrtc", + "doc": [ + "WebRTC package that enables support to audio and video calls" + ], + "items": [ +{"type":"update","content":{ +"name":"IncomingCall", +"header":52, +"doc":[ +"Update about incoming call (Sent every 10 seconds)",{"type":"reference","argument":"callId","category":"full","description":" Call Id"},{"type":"reference","argument":"attemptIndex","category":"full","description":" Optional attempt Index"}],"attributes":[ +{"type":"int64","id":1,"name":"callId"} +,{"type":{"type":"opt","childType":"int32"},"id":2,"name":"attemptIndex"} +]}},{"type":"update","content":{ +"name":"CallHandled", +"header":53, +"doc":[ +"Update about incoming call handled",{"type":"reference","argument":"callId","category":"full","description":" Call Id"},{"type":"reference","argument":"attemptIndex","category":"full","description":" Optional attempt Index"}],"attributes":[ +{"type":"int64","id":1,"name":"callId"} +,{"type":{"type":"opt","childType":"int32"},"id":2,"name":"attemptIndex"} +]}},{"type":"update","content":{ +"name":"CallUpgraded", +"header":56, +"doc":[ +"Update about call moved to other peer",{"type":"reference","argument":"callId","category":"full","description":" Call Id"},{"type":"reference","argument":"groupId","category":"full","description":" Upgraded group id"}],"attributes":[ +{"type":"int64","id":1,"name":"callId"} +,{"type":{"type":"alias","childType":"groupId"},"id":2,"name":"groupId"} +]}},{"type":"rpc","content":{ +"name":"GetCallInfo", +"header":2600, +"response":{"type":"anonymous","header":2606, "doc":[ +{"type":"reference","argument":"peer","category":"full","description":" Destination peer"},{"type":"reference","argument":"groups","category":"compact","description":" Groups"},{"type":"reference","argument":"users","category":"compact","description":" Users"},{"type":"reference","argument":"eventBusId","category":"full","description":" Event Bus Id"},{"type":"reference","argument":"isAudioOnlyCall","category":"full","description":" Is Audio Only Call. Default is true"},{"type":"reference","argument":"isVideoOnlyCall","category":"full","description":" Is Video Only Call. Default is false."},{"type":"reference","argument":"isVideoPreferred","category":"full","description":" Is Video preferred"}] ,"attributes":[{"type":{"type":"struct","childType":"Peer"},"id":1,"name":"peer"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"GroupOutPeer"}},"id":2,"name":"groups"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":3,"name":"users"} +,{"type":{"type":"alias","childType":"busId"},"id":4,"name":"eventBusId"} +,{"type":{"type":"opt","childType":"bool"},"id":5,"name":"isAudioOnlyCall"} +,{"type":{"type":"opt","childType":"bool"},"id":6,"name":"isVideoOnlyCall"} +,{"type":{"type":"opt","childType":"bool"},"id":7,"name":"isVideoPreferred"} +]}, +"doc":[ +"Getting Call Information",{"type":"reference","argument":"callId","category":"full","description":"Call Id"}],"attributes":[ +{"type":"int64","id":1,"name":"callId"} +]}},{"type":"rpc","content":{ +"name":"DoCall", +"header":2597, +"response":{"type":"anonymous","header":2598, "doc":[ +{"type":"reference","argument":"callId","category":"full","description":" Call Id"},{"type":"reference","argument":"eventBusId","category":"full","description":" Call Event Bus Id"}] ,"attributes":[{"type":"int64","id":1,"name":"callId"} +,{"type":{"type":"alias","childType":"busId"},"id":2,"name":"eventBusId"} +,{"type":{"type":"alias","childType":"randomId"},"id":3,"name":"deviceId"} +]}, +"doc":[ +"Do Call. Right after a call client need to start sending CallInProgress",{"type":"reference","argument":"peer","category":"full","description":"destination peer"},{"type":"reference","argument":"timeout","category":"full","description":"Initial timeout"},{"type":"reference","argument":"isAudioOnlyCall","category":"full","description":"Is Audio only call. Default is true."},{"type":"reference","argument":"isVideoOnlyCall","category":"full","description":"Is Video Only call. Default is false."},{"type":"reference","argument":"isVideoPreferred","category":"full","description":"Is Video preferred"}],"attributes":[ +{"type":{"type":"struct","childType":"OutPeer"},"id":1,"name":"peer"} +,{"type":{"type":"opt","childType":{"type":"alias","childType":"msec"}},"id":2,"name":"timeout"} +,{"type":{"type":"opt","childType":"bool"},"id":3,"name":"isAudioOnlyCall"} +,{"type":{"type":"opt","childType":"bool"},"id":4,"name":"isVideoOnlyCall"} +,{"type":{"type":"opt","childType":"bool"},"id":6,"name":"isVideoPreferred"} +]}},{"type":"rpc","content":{ +"name":"UpgradeCall", +"header":2677, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Method for upgrading a call from private call to group call",{"type":"reference","argument":"callId","category":"full","description":"Call Id"},{"type":"reference","argument":"peer","category":"full","description":"Destination peer for upgrading"}],"attributes":[ +{"type":"int64","id":1,"name":"callId"} +,{"type":{"type":"struct","childType":"GroupOutPeer"},"id":2,"name":"peer"} +]}},{"type":"rpc","content":{ +"name":"DoCallAgain", +"header":2678, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Call again to user",{"type":"reference","argument":"callId","category":"full","description":"Call Id"},{"type":"reference","argument":"user","category":"full","description":"User to call again"}],"attributes":[ +{"type":"int64","id":1,"name":"callId"} +,{"type":{"type":"struct","childType":"UserOutPeer"},"id":2,"name":"user"} +]}},{"type":"rpc","content":{ +"name":"JoinCall", +"header":2683, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Joining Call",{"type":"reference","argument":"callId","category":"full","description":"Call Id"}],"attributes":[ +{"type":"int64","id":1,"name":"callId"} +]}},{"type":"rpc","content":{ +"name":"RejectCall", +"header":2684, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Rejecting Call",{"type":"reference","argument":"callId","category":"full","description":"Call Id"}],"attributes":[ +{"type":"int64","id":1,"name":"callId"} +]}},{"type":"rpc","content":{ +"name":"OptimizeSDP", +"header":2685, +"response":{"type":"anonymous","header":2686, "doc":[ +{"type":"reference","argument":"optimizedSDP","category":"hidden","description":" Optimized version of SDP"}] ,"attributes":[{"type":"string","id":1,"name":"optimizedSDP"} +]}, +"doc":[ +"Optimizing SDP",{"type":"reference","argument":"type","category":"full","description":"Type of SDP (offer or answer)"},{"type":"reference","argument":"sdp","category":"full","description":"SDP value"},{"type":"reference","argument":"ownSettings","category":"full","description":"Own Settings"},{"type":"reference","argument":"theirSettings","category":"full","description":"Their Settings"}],"attributes":[ +{"type":"string","id":1,"name":"type"} +,{"type":"string","id":2,"name":"sdp"} +,{"type":{"type":"struct","childType":"PeerSettings"},"id":3,"name":"ownSettings"} +,{"type":{"type":"struct","childType":"PeerSettings"},"id":4,"name":"theirSettings"} +]}}, { + "type":"struct", + "content": { + "name":"ICEServer", +"doc":[ +"ICE Server description",{"type":"reference","argument":"url","category":"full","description":" Url to server"},{"type":"reference","argument":"username","category":"full","description":" Optional username"},{"type":"reference","argument":"credential","category":"danger","description":" Optional credential"}],"attributes":[ +{"type":"string","id":1,"name":"url"} +,{"type":{"type":"opt","childType":"string"},"id":2,"name":"username"} +,{"type":{"type":"opt","childType":"string"},"id":3,"name":"credential"} +]}},{"type":"trait","content":{ +"isContainer":"true","name":"WebRTCSignaling","attributes":[ +]}},{"type":"comment","content":"Advertising"}, { + "type":"struct", + "content": { + "name":"AdvertiseSelf", +"doc":[ +"Advertizing self to a master mode",{"type":"reference","argument":"peerSettings","category":"full","description":" Optional peer Settings"}],"trait":{"name":"WebRTCSignaling","key":21},"attributes":[ +{"type":{"type":"opt","childType":{"type":"struct","childType":"PeerSettings"}},"id":1,"name":"peerSettings"} +]}}, { + "type":"struct", + "content": { + "name":"AdvertiseMaster", +"doc":[ +"Sent by master"],"trait":{"name":"WebRTCSignaling","key":26},"attributes":[ +{"type":{"type":"list","childType":{"type":"struct","childType":"ICEServer"}},"id":1,"name":"server"} +]}},{"type":"comment","content":"Web RTC signaling"}, { + "type":"struct", + "content": { + "name":"Candidate", +"doc":[ +"Candidate signal",{"type":"reference","argument":"sessionId","category":"full","description":" Session Id of candidate"},{"type":"reference","argument":"index","category":"full","description":" Index of candidate"},{"type":"reference","argument":"id","category":"full","description":" Id of candidate"},{"type":"reference","argument":"sdp","category":"full","description":" SDP of candidate"}],"trait":{"name":"WebRTCSignaling","key":3},"attributes":[ +{"type":{"type":"alias","childType":"randomId"},"id":1,"name":"sessionId"} +,{"type":"int32","id":2,"name":"index"} +,{"type":"string","id":3,"name":"id"} +,{"type":"string","id":4,"name":"sdp"} +]}}, { + "type":"struct", + "content": { + "name":"Offer", +"doc":[ +"Offer signal",{"type":"reference","argument":"sessionId","category":"full","description":" Session Id of offer"},{"type":"reference","argument":"sdp","category":"full","description":" Offer SDP"},{"type":"reference","argument":"ownPeerSettings","category":"full","description":" Optional Own Peer settings"}],"trait":{"name":"WebRTCSignaling","key":4},"attributes":[ +{"type":{"type":"alias","childType":"randomId"},"id":1,"name":"sessionId"} +,{"type":"string","id":2,"name":"sdp"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"PeerSettings"}},"id":3,"name":"ownPeerSettings"} +]}}, { + "type":"struct", + "content": { + "name":"Answer", +"doc":[ +"Answer signal",{"type":"reference","argument":"sessionId","category":"full","description":" Session Id of answer"},{"type":"reference","argument":"sdp","category":"full","description":" Answer SDP"}],"trait":{"name":"WebRTCSignaling","key":5},"attributes":[ +{"type":{"type":"alias","childType":"randomId"},"id":1,"name":"sessionId"} +,{"type":"string","id":2,"name":"sdp"} +]}}, { + "type":"struct", + "content": { + "name":"MediaStreamsUpdated", +"doc":[ +"Update about media stream settings updated. Can be sent before offer/answer.",{"type":"reference","argument":"isAudioEnabled","category":"full","description":" Is Audio Enabled in current connection. True by default."},{"type":"reference","argument":"isVideoEnabled","category":"full","description":" Is Video Enabled in current connection. False by default."}],"trait":{"name":"WebRTCSignaling","key":28},"attributes":[ +{"type":{"type":"opt","childType":"bool"},"id":1,"name":"isAudioEnabled"} +,{"type":{"type":"opt","childType":"bool"},"id":2,"name":"isVideoEnabled"} +]}},{"type":"comment","content":"Call Controlling events"}, { + "type":"struct", + "content": { + "name":"NeedOffer", +"doc":[ +"Notification from master that offer is required",{"type":"reference","argument":"device","category":"full","description":" Destination Device Id"},{"type":"reference","argument":"sessionId","category":"full","description":" Session Id"},{"type":"reference","argument":"peerSettings","category":"full","description":" Optional peer settings"}],"trait":{"name":"WebRTCSignaling","key":8},"attributes":[ +{"type":{"type":"alias","childType":"randomId"},"id":1,"name":"device"} +,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"sessionId"} +,{"type":{"type":"opt","childType":{"type":"struct","childType":"PeerSettings"}},"id":3,"name":"peerSettings"} +]}}, { + "type":"struct", + "content": { + "name":"NegotinationSuccessful", +"doc":[ +"Notification about on negotiation is successful",{"type":"reference","argument":"device","category":"full","description":" Device Id"},{"type":"reference","argument":"sessionId","category":"full","description":" Session Id"}],"trait":{"name":"WebRTCSignaling","key":24},"attributes":[ +{"type":{"type":"alias","childType":"randomId"},"id":1,"name":"device"} +,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"sessionId"} +]}}, { + "type":"struct", + "content": { + "name":"EnableConnection", +"doc":[ +"Notification about enabling connection to peer",{"type":"reference","argument":"device","category":"full","description":" Device Id"},{"type":"reference","argument":"sessionId","category":"full","description":" Session Id"}],"trait":{"name":"WebRTCSignaling","key":22},"attributes":[ +{"type":{"type":"alias","childType":"randomId"},"id":1,"name":"device"} +,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"sessionId"} +]}}, { + "type":"struct", + "content": { + "name":"OnRenegotiationNeeded", +"doc":[ +"Need renegotiate session. For example when streams are changed.",{"type":"reference","argument":"device","category":"full","description":" Device Id"},{"type":"reference","argument":"sessionId","category":"full","description":" Session Id"}],"trait":{"name":"WebRTCSignaling","key":25},"attributes":[ +{"type":{"type":"alias","childType":"randomId"},"id":1,"name":"device"} +,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"sessionId"} +]}}, { + "type":"struct", + "content": { + "name":"CloseSession", +"doc":[ +"Close this session and be ready to",{"type":"reference","argument":"device","category":"hidden","description":" Device Id"},{"type":"reference","argument":"sessionId","category":"full","description":" Session Id for renegotiation"}],"trait":{"name":"WebRTCSignaling","key":6},"attributes":[ +{"type":{"type":"alias","childType":"randomId"},"id":1,"name":"device"} +,{"type":{"type":"alias","childType":"randomId"},"id":2,"name":"sessionId"} +]}}, { + "type":"struct", + "content": { + "name":"NeedDisconnect", +"doc":[ +"Notification about requirement about required disconnection from peer",{"type":"reference","argument":"device","category":"hidden","description":" Device Id"}],"trait":{"name":"WebRTCSignaling","key":20},"attributes":[ +{"type":{"type":"alias","childType":"randomId"},"id":1,"name":"device"} +]}}, { + "type":"struct", + "content": { + "name":"ActiveCall", +"doc":[ +"Active Calls. Used in broadcasting states of current calls.",{"type":"reference","argument":"callId","category":"full","description":" Call Id"},{"type":"reference","argument":"peer","category":"full","description":" Call's peer"},{"type":"reference","argument":"callMembers","category":"full","description":" Call Members"}],"attributes":[ +{"type":"int64","id":1,"name":"callId"} +,{"type":{"type":"struct","childType":"Peer"},"id":2,"name":"peer"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"CallMember"}},"id":3,"name":"callMembers"} +]}}, { + "type": "enum", "content": { - "name": "CombinedUpdate", - "header": 2625, - "doc": [ - "Combined update", - { - "type": "reference", - "argument": "seqStart", - "category": "full", - "description": " Sequence number start" - }, - { - "type": "reference", - "argument": "seqEnd", - "category": "full", - "description": " Sequence number end" - }, + "name": "CallMemberState", + "values": [ { - "type": "reference", - "argument": "state", - "category": "full", - "description": " Sequence state" + "name": "RINGING", + "id": 1 }, { - "type": "reference", - "argument": "users", - "category": "compact", - "description": " Update's users" + "name": "RINGING_REACHED", + "id": 4 }, { - "type": "reference", - "argument": "groups", - "category": "compact", - "description": " Update's groups" + "name": "CONNECTING", + "id": 2 }, { - "type": "reference", - "argument": "updates", - "category": "full", - "description": " Updates (can be empty)" + "name": "CONNECTED", + "id": 3 }, { - "type": "reference", - "argument": "messages", - "category": "full", - "description": " New messages" + "name": "ENDED", + "id": 5 } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "seqStart" - }, - { - "type": "int32", - "id": 2, - "name": "seqEnd" - }, - { - "type": { - "type": "alias", - "childType": "seq_state" - }, - "id": 3, - "name": "state" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "User" - } - }, - "id": 4, - "name": "users" - }, + ] + } + }, { + "type":"struct", + "content": { + "name":"CallMemberStateHolder", +"doc":[ +"Call Member state holder",{"type":"reference","argument":"state","category":"full","description":" State Value"},{"type":"reference","argument":"fallbackIsRinging","category":"full","description":" Fallback flag for future compatibility of state"},{"type":"reference","argument":"fallbackIsConnected","category":"full","description":" Fallback flag for future compatibility of state"},{"type":"reference","argument":"fallbackIsConnecting","category":"full","description":" Fallback flag for future compatibility of state"},{"type":"reference","argument":"fallbackIsRingingReached","category":"full","description":" Fallback flag for future compatibility of state"},{"type":"reference","argument":"fallbackIsEnded","category":"full","description":" Fallback flag for future compatibility of state"}],"attributes":[ +{"type":{"type":"enum","childType":"CallMemberState"},"id":1,"name":"state"} +,{"type":{"type":"opt","childType":"bool"},"id":2,"name":"fallbackIsRinging"} +,{"type":{"type":"opt","childType":"bool"},"id":3,"name":"fallbackIsConnected"} +,{"type":{"type":"opt","childType":"bool"},"id":4,"name":"fallbackIsConnecting"} +,{"type":{"type":"opt","childType":"bool"},"id":5,"name":"fallbackIsRingingReached"} +,{"type":{"type":"opt","childType":"bool"},"id":6,"name":"fallbackIsEnded"} +]}}, { + "type":"struct", + "content": { + "name":"CallMember", +"doc":[ +"Call Member",{"type":"reference","argument":"userId","category":"full","description":" Member User Id"},{"type":"reference","argument":"state","category":"full","description":" State of member"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"userId"} +,{"type":{"type":"struct","childType":"CallMemberStateHolder"},"id":3,"name":"state"} +]}}, { + "type":"struct", + "content": { + "name":"PeerSettings", +"doc":[ +"Peer Settings",{"type":"reference","argument":"is3DESSupported","category":"full","description":" Marking if 3DES supported. Default is false."},{"type":"reference","argument":"isMobile","category":"full","description":" Is Peer a mobile phone. Default is false."},{"type":"reference","argument":"canBeAudioRelay","category":"full","description":" If peer can audio relay. Default is false."},{"type":"reference","argument":"canPreConnect","category":"full","description":" If peer can preconnect before answer"}],"attributes":[ +{"type":{"type":"opt","childType":"bool"},"id":1,"name":"is3DESSupported"} +,{"type":{"type":"opt","childType":"bool"},"id":2,"name":"isMobile"} +,{"type":{"type":"opt","childType":"bool"},"id":3,"name":"canBeAudioRelay"} +,{"type":{"type":"opt","childType":"bool"},"id":4,"name":"canPreConnect"} +]}}]}, { + "title": "Config sync", + "package": "configs", + "doc": [ + "Parameter Syncronization across devices. Can be used for simple sync", + "across devices without rewriting server side code." + ], + "items": [ + { + "type":"struct", + "content": { + "name":"Parameter", +"doc":[ +"Syncing Parameter",{"type":"reference","argument":"key","category":"full","description":" Key of parameter"},{"type":"reference","argument":"value","category":"full","description":" Value of parameter"}],"attributes":[ +{"type":"string","id":1,"name":"key"} +,{"type":"string","id":2,"name":"value"} +]}},{"type":"rpc","content":{ +"name":"GetParameters", +"header":134, +"response":{"type":"anonymous","header":135, "doc":[ +{"type":"reference","argument":"parameters","category":"full","description":" Current parameters"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"Parameter"}},"id":1,"name":"parameters"} +]}, +"doc":[ +"Getting Parameters"],"attributes":[ +]}},{"type":"rpc","content":{ +"name":"EditParameter", +"header":128, +"response":{"type":"reference","name":"Seq"}, +"doc":[ +"Change parameter value",{"type":"reference","argument":"key","category":"full","description":"Key of parameter"},{"type":"reference","argument":"value","category":"full","description":"Value of parameter"}],"attributes":[ +{"type":"string","id":1,"name":"key"} +,{"type":{"type":"opt","childType":"string"},"id":2,"name":"value"} +]}},{"type":"update","content":{ +"name":"ParameterChanged", +"header":131, +"doc":[ +"Update about parameter change",{"type":"reference","argument":"key","category":"full","description":" Key of parameter"},{"type":"reference","argument":"value","category":"full","description":" Value of parameter"}],"attributes":[ +{"type":"string","id":1,"name":"key"} +,{"type":{"type":"opt","childType":"string"},"id":2,"name":"value"} +]}}]}, { + "title": "Stats", + "package": "stats", + "doc": [ + "Saving statistics information" + ], + "items": [ + { + "type":"struct", + "content": { + "name":"EventRecord", +"doc":[ +"Record for stored event"],"attributes":[ +{"type":{"type":"alias","childType":"date"},"id":1,"name":"date"} +,{"type":{"type":"trait","childType":"Event"},"id":2,"name":"event"} +]}},{"type":"trait","content":{ +"isContainer":"true","name":"Event","attributes":[ +]}}, { + "type":"struct", + "content": { + "name":"UntypedEvent", +"doc":[ +"Untyped event",{"type":"reference","argument":"eventType","category":"full","description":" Event type"},{"type":"reference","argument":"params","category":"full","description":" optional params for event"}],"trait":{"name":"Event","key":1},"expandable":"true","attributes":[ +{"type":"string","id":1,"name":"eventType"} +,{"type":{"type":"opt","childType":{"type":"trait","childType":"RawValue"}},"id":2,"name":"params"} +]}}, { + "type":"struct", + "content": { + "name":"ContentViewChanged", +"doc":[ +"Content view event",{"type":"reference","argument":"contentType","category":"full","description":" unique content id"},{"type":"reference","argument":"visible","category":"full","description":" Is content visible"},{"type":"reference","argument":"params","category":"full","description":" optional params for content view"}],"trait":{"name":"Event","key":2},"expandable":"true","attributes":[ +{"type":"string","id":1,"name":"contentType"} +,{"type":"string","id":2,"name":"contentId"} +,{"type":"bool","id":3,"name":"visible"} +,{"type":{"type":"opt","childType":{"type":"trait","childType":"RawValue"}},"id":4,"name":"params"} +]}}, { + "type":"struct", + "content": { + "name":"AppVisibleChanged", +"doc":[ +"On App Visible event",{"type":"reference","argument":"visible","category":"full","description":" Is app visible"}],"trait":{"name":"Event","key":4},"expandable":"true","attributes":[ +{"type":"bool","id":1,"name":"visible"} +]}},{"type":"rpc","content":{ +"name":"StoreEvents", +"header":243, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Storing events on server",{"type":"reference","argument":"events","category":"full","description":"Events for storing"}],"attributes":[ +{"type":{"type":"list","childType":{"type":"trait","childType":"Event"}},"id":1,"name":"events"} +]}}]}, { + "title": "Raw API", + "package": "raw", + "doc": [ + "Schema-less API that is useful for external integrations" + ], + "items": [ +{"type":"rpc","content":{ +"name":"RawRequest", +"header":2569, +"response":{"type":"anonymous","header":2570, "doc":[ +"Response of a raw request",{"type":"reference","argument":"result","category":"full","description":" Result of request"}] ,"attributes":[{"type":{"type":"trait","childType":"RawValue"},"id":1,"name":"result"} +]}, +"doc":[ +"Making raw request to external service via shema-less RPC request",{"type":"reference","argument":"service","category":"full","description":"Service name for RPC request"},{"type":"reference","argument":"method","category":"full","description":"Method for execution"},{"type":"reference","argument":"params","category":"full","description":"Optional params for the method"}],"attributes":[ +{"type":"string","id":1,"name":"service"} +,{"type":"string","id":2,"name":"method"} +,{"type":{"type":"opt","childType":{"type":"trait","childType":"RawValue"}},"id":3,"name":"params"} +]}}]}, { + "title": "Wallpappers", + "package": "wallpappers", + "doc": [ + "Wallpappers support" + ], + "items": [ + { + "type":"struct", + "content": { + "name":"Wallpapper", +"doc":[ +"Wallpapper structure",{"type":"reference","argument":"id","category":"full","description":" Wallpapper id"},{"type":"reference","argument":"w","category":"full","description":" Image width"},{"type":"reference","argument":"h","category":"full","description":" Image height"},{"type":"reference","argument":"fileSize","category":"full","description":" Image file size"},{"type":"reference","argument":"file","category":"full","description":" Image file reference"},{"type":"reference","argument":"thumb","category":"full","description":" Image thumb"}],"attributes":[ +{"type":"int32","id":7,"name":"id"} +,{"type":"int32","id":1,"name":"w"} +,{"type":"int32","id":2,"name":"h"} +,{"type":"int32","id":3,"name":"fileSize"} +,{"type":{"type":"struct","childType":"FileLocation"},"id":5,"name":"file"} +,{"type":{"type":"struct","childType":"FastThumb"},"id":6,"name":"thumb"} +]}},{"type":"rpc","content":{ +"name":"LoadWallpappers", +"header":241, +"response":{"type":"anonymous","header":242, "doc":[ +"Loaded Wallpappers",{"type":"reference","argument":"wallpappers","category":"full","description":" Available wallpapper list"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"Wallpapper"}},"id":1,"name":"wallpappers"} +]}, +"doc":[ +"Load available wallpappers",{"type":"reference","argument":"maxWidth","category":"full","description":"Maximum width of wallpapper"},{"type":"reference","argument":"maxHeight","category":"full","description":"Maximum height of wallpapper"}],"attributes":[ +{"type":"int32","id":1,"name":"maxWidth"} +,{"type":"int32","id":2,"name":"maxHeight"} +]}}]}, { + "title": "Push", + "package": "push", + "doc": [ + "Vendor's pushes for receiving push notifications.", + "Push notification contains current sequence number of main sequence." + ], + "items": [ +{"type":"rpc","content":{ +"name":"RegisterGooglePush", +"header":51, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Registering push token on server",{"type":"reference","argument":"projectId","category":"hidden","description":"Project Id of token"},{"type":"reference","argument":"token","category":"danger","description":"token value"}],"attributes":[ +{"type":"int64","id":1,"name":"projectId"} +,{"type":"string","id":2,"name":"token"} +]}},{"type":"rpc","content":{ +"name":"UnregisterGooglePush", +"header":2631, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Unregistering Google Push",{"type":"reference","argument":"token","category":"danger","description":"Token value"}],"attributes":[ +{"type":"string","id":1,"name":"token"} +]}},{"type":"rpc","content":{ +"name":"RegisterApplePush", +"header":76, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Registering apple push on server",{"type":"reference","argument":"apnsKey","category":"hidden","description":"apns key id"},{"type":"reference","argument":"token","category":"danger","description":"token value"}],"attributes":[ +{"type":"int32","id":1,"name":"apnsKey"} +,{"type":"string","id":2,"name":"token"} +]}},{"type":"rpc","content":{ +"name":"UnregisterApplePush", +"header":2632, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Unregistering Apple Push",{"type":"reference","argument":"token","category":"full","description":"Token"}],"attributes":[ +{"type":"string","id":1,"name":"token"} +]}},{"type":"rpc","content":{ +"name":"RegisterApplePushKit", +"header":2576, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Registration of a new Apple's PushKit tokens",{"type":"reference","argument":"apnsKey","category":"hidden","description":"APNS key id"},{"type":"reference","argument":"token","category":"danger","description":"token value"}],"attributes":[ +{"type":"int32","id":1,"name":"apnsKey"} +,{"type":"string","id":2,"name":"token"} +]}},{"type":"rpc","content":{ +"name":"UnregisterApplePushKit", +"header":2633, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Unregistering Apple Push Kit token",{"type":"reference","argument":"token","category":"hidden","description":"Token Value"}],"attributes":[ +{"type":"string","id":1,"name":"token"} +]}},{"type":"rpc","content":{ +"name":"RegisterApplePushToken", +"header":2593, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Registering Apple Push Token",{"type":"reference","argument":"bundleId","category":"full","description":"Bundle Id of app"},{"type":"reference","argument":"token","category":"full","description":"Push token"}],"attributes":[ +{"type":"string","id":1,"name":"bundleId"} +,{"type":"string","id":2,"name":"token"} +]}},{"type":"rpc","content":{ +"name":"UnregisterApplePushToken", +"header":2634, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Unregister Apple Push token",{"type":"reference","argument":"token","category":"hidden","description":"Token value"}],"attributes":[ +{"type":"string","id":1,"name":"token"} +]}},{"type":"rpc","content":{ +"name":"RegisterActorPush", +"header":2575, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Register Actor Push endpoint",{"type":"reference","argument":"endpoint","category":"full","description":"Endpoint for push sending"},{"type":"reference","argument":"encryptionKeys","category":"full","description":"Push Encryption keys"}],"attributes":[ +{"type":"string","id":1,"name":"endpoint"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"EncryptionKey"}},"id":2,"name":"encryptionKeys"} +]}},{"type":"rpc","content":{ +"name":"UnregisterActorPush", +"header":2635, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Unregister Actor Push endpoint",{"type":"reference","argument":"endpoint","category":"full","description":"Endpoint for unregistering"}],"attributes":[ +{"type":"string","id":1,"name":"endpoint"} +]}}]}, { + "title": "Encryption", + "package": "encryption", + "doc": [ + "Package that include encryption support", + "Key alg types:", + "* curve25519 - https://en.wikipedia.org/wiki/Curve25519", + "* rsa-2048", + "* rsa-4096", + "* aes-128", + "* kuznechik-128", + "", + "Signature alg types:", + "* Ed25519 - used curve25519 conveted to Ed255519 for signing and validataion" + ], + "items": [ +{"type":"comment","content":"Public Keys"}, { + "type":"struct", + "content": { + "name":"EncryptionKeyGroup", +"doc":[ +"Encryption Key Group",{"type":"reference","argument":"keyGroupId","category":"full","description":" Key Group Id"},{"type":"reference","argument":"identityKey","category":"full","description":" Key that is used as identity and for validation of Key Group changes"},{"type":"reference","argument":"supportedEncryption","category":"full","description":" Supported encryption methods by this key group"},{"type":"reference","argument":"keys","category":"compact","description":" keys of Key Group"},{"type":"reference","argument":"signatures","category":"compact","description":" Signatures of keys"}],"expandable":"true","attributes":[ +{"type":{"type":"alias","childType":"keyGroupId"},"id":1,"name":"keyGroupId"} +,{"type":{"type":"list","childType":"string"},"id":2,"name":"supportedEncryption"} +,{"type":{"type":"struct","childType":"EncryptionKey"},"id":3,"name":"identityKey"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"EncryptionKey"}},"id":4,"name":"keys"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"EncryptionKeySignature"}},"id":5,"name":"signatures"} +]}}, { + "type":"struct", + "content": { + "name":"EncryptionKeySignature", +"doc":[ +"Signed Key. Usually used for public keys.",{"type":"reference","argument":"keyId","category":"full","description":" Key Id used for signature"},{"type":"reference","argument":"signatureAlg","category":"full","description":" Signature algorithm"},{"type":"reference","argument":"signature","category":"full","description":" Signature value"}],"attributes":[ +{"type":"int64","id":1,"name":"keyId"} +,{"type":"string","id":2,"name":"signatureAlg"} +,{"type":"bytes","id":3,"name":"signature"} +]}}, { + "type":"struct", + "content": { + "name":"EncryptionKey", +"doc":[ +"Encryption Key",{"type":"reference","argument":"keyId","category":"full","description":" Key Id"},{"type":"reference","argument":"keyAlg","category":"full","description":" Key Algorithm"},{"type":"reference","argument":"keyMaterial","category":"compact","description":" Public key material. Can be null, but always not null for LoadPublicKey"},{"type":"reference","argument":"keyHash","category":"hidden","description":" If keyMaterial is null, pass keyHash - SHA256 of key"}],"expandable":"true","attributes":[ +{"type":"int64","id":1,"name":"keyId"} +,{"type":"string","id":2,"name":"keyAlg"} +,{"type":{"type":"opt","childType":"bytes"},"id":3,"name":"keyMaterial"} +,{"type":{"type":"opt","childType":"bytes"},"id":4,"name":"keyHash"} +]}},{"type":"response","content":{ +"name":"PublicKeys", +"header":2602, +"doc":[ +"Public Keys response",{"type":"reference","argument":"publicKey","category":"full","description":" Public keys"},{"type":"reference","argument":"signatures","category":"full","description":" Signatures of public keys"}],"attributes":[ +{"type":{"type":"list","childType":{"type":"struct","childType":"EncryptionKey"}},"id":1,"name":"publicKey"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"EncryptionKeySignature"}},"id":2,"name":"signatures"} +]}},{"type":"response","content":{ +"name":"PublicKeyGroups", +"header":2604, +"doc":[ +"Public key groups response"],"attributes":[ +{"type":{"type":"list","childType":{"type":"struct","childType":"EncryptionKeyGroup"}},"id":1,"name":"publicKeyGroups"} +]}},{"type":"rpc","content":{ +"name":"LoadPublicKeyGroups", +"header":2601, +"response":{"type":"reference","name":"PublicKeyGroups"}, +"doc":[ +"Loading Public key groups",{"type":"reference","argument":"userPeer","category":"full","description":"User's peer"}],"attributes":[ +{"type":{"type":"struct","childType":"UserOutPeer"},"id":1,"name":"userPeer"} +]}},{"type":"rpc","content":{ +"name":"LoadPublicKey", +"header":2605, +"response":{"type":"reference","name":"PublicKeys"}, +"doc":[ +"Loading public key explictly",{"type":"reference","argument":"userPeer","category":"full","description":"User's peer"},{"type":"reference","argument":"keyGroupId","category":"full","description":"Key group's id"},{"type":"reference","argument":"keyIds","category":"full","description":"Key ids for loading"}],"attributes":[ +{"type":{"type":"struct","childType":"UserOutPeer"},"id":1,"name":"userPeer"} +,{"type":"int32","id":2,"name":"keyGroupId"} +,{"type":{"type":"list","childType":"int64"},"id":3,"name":"keyIds"} +]}},{"type":"rpc","content":{ +"name":"LoadPrePublicKeys", +"header":2603, +"response":{"type":"reference","name":"PublicKeys"}, +"doc":[ +"Loading SOME of ephermal public keys",{"type":"reference","argument":"userPeer","category":"full","description":"User's peer"},{"type":"reference","argument":"keyGroupId","category":"full","description":"User's key group id"}],"attributes":[ +{"type":{"type":"struct","childType":"UserOutPeer"},"id":1,"name":"userPeer"} +,{"type":"int32","id":2,"name":"keyGroupId"} +]}},{"type":"update","content":{ +"name":"PublicKeyGroupChanged", +"header":103, +"doc":[ +"Update about public key group changed",{"type":"reference","argument":"uid","category":"full","description":" User's id"},{"type":"reference","argument":"keyGroup","category":"full","description":" Updated Key Group"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":{"type":"struct","childType":"EncryptionKeyGroup"},"id":2,"name":"keyGroup"} +]}},{"type":"update","content":{ +"name":"KeysAdded", +"header":112, +"doc":[ +"Update about keys added to Key Group",{"type":"reference","argument":"uid","category":"full","description":" User's id"},{"type":"reference","argument":"keyGroupId","category":"full","description":" Key Group Id"},{"type":"reference","argument":"keys","category":"compact","description":" Added keys"},{"type":"reference","argument":"signatures","category":"compact","description":" Signatures of a public key"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":{"type":"alias","childType":"keyGroupId"},"id":2,"name":"keyGroupId"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"EncryptionKey"}},"id":3,"name":"keys"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"EncryptionKeySignature"}},"id":4,"name":"signatures"} +]}},{"type":"update","content":{ +"name":"KeysRemoved", +"header":113, +"doc":[ +"Update about keys removed from Key Group",{"type":"reference","argument":"uid","category":"full","description":" User's id"},{"type":"reference","argument":"keyGroupId","category":"full","description":" Key Group Id"},{"type":"reference","argument":"keyIds","category":"full","description":" Removed keys"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":{"type":"alias","childType":"keyGroupId"},"id":2,"name":"keyGroupId"} +,{"type":{"type":"list","childType":"int64"},"id":3,"name":"keyIds"} +]}},{"type":"update","content":{ +"name":"PublicKeyGroupAdded", +"header":104, +"doc":[ +"Update about public key group added",{"type":"reference","argument":"uid","category":"full","description":" User's id"},{"type":"reference","argument":"keyGroup","category":"full","description":" Added Key Group"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":{"type":"struct","childType":"EncryptionKeyGroup"},"id":2,"name":"keyGroup"} +]}},{"type":"update","content":{ +"name":"PublicKeyGroupRemoved", +"header":105, +"doc":[ +"Update about public key group removed",{"type":"reference","argument":"uid","category":"full","description":" User's id"},{"type":"reference","argument":"keyGroupId","category":"full","description":" Removed Key Group Id"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":{"type":"alias","childType":"keyGroupId"},"id":2,"name":"keyGroupId"} +]}},{"type":"comment","content":"Device Side"},{"type":"rpc","content":{ +"name":"CreateNewKeyGroup", +"header":2609, +"response":{"type":"anonymous","header":2610, "doc":[ +{"type":"reference","argument":"keyGroupId","category":"full","description":" Created Key Group id"}] ,"attributes":[{"type":{"type":"alias","childType":"keyGroupId"},"id":1,"name":"keyGroupId"} +]}, +"doc":[ +"Creation of a new Key Group",{"type":"reference","argument":"identityKey","category":"full","description":"Identity Key of a new group"},{"type":"reference","argument":"supportedEncryptions","category":"full","description":"Supported encryption methods"},{"type":"reference","argument":"keys","category":"full","description":"keys of current group"},{"type":"reference","argument":"signatures","category":"full","description":"signatures of keys"}],"attributes":[ +{"type":{"type":"struct","childType":"EncryptionKey"},"id":1,"name":"identityKey"} +,{"type":{"type":"list","childType":"string"},"id":2,"name":"supportedEncryptions"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"EncryptionKey"}},"id":3,"name":"keys"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"EncryptionKeySignature"}},"id":4,"name":"signatures"} +]}},{"type":"rpc","content":{ +"name":"DeleteKeyGroup", +"header":2611, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Deletion of a Key Group",{"type":"reference","argument":"keyGroupId","category":"full","description":"Key Group Id for deletion"}],"attributes":[ +{"type":{"type":"alias","childType":"keyGroupId"},"id":1,"name":"keyGroupId"} +]}},{"type":"rpc","content":{ +"name":"DisconnectKeyGroup", +"header":2613, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Disconnect Key Group from device",{"type":"reference","argument":"keyGroupId","category":"full","description":"Key Group Id for disconnection"}],"attributes":[ +{"type":{"type":"alias","childType":"keyGroupId"},"id":1,"name":"keyGroupId"} +]}},{"type":"rpc","content":{ +"name":"ConnectKeyGroup", +"header":2614, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Connectiong Key Group to device",{"type":"reference","argument":"keyGroupId","category":"full","description":"Key Group Id for connection"}],"attributes":[ +{"type":{"type":"alias","childType":"keyGroupId"},"id":1,"name":"keyGroupId"} +]}},{"type":"rpc","content":{ +"name":"UploadPreKey", +"header":2612, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Uploading Ephermal Keys",{"type":"reference","argument":"keyGroupId","category":"full","description":"Key Group Id"},{"type":"reference","argument":"keys","category":"compact","description":"Encryprion keys"},{"type":"reference","argument":"signatures","category":"compact","description":"Key signatures"}],"attributes":[ +{"type":{"type":"alias","childType":"keyGroupId"},"id":1,"name":"keyGroupId"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"EncryptionKey"}},"id":2,"name":"keys"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"EncryptionKeySignature"}},"id":3,"name":"signatures"} +]}},{"type":"comment","content":"Encrypted Packages"}, { + "type":"struct", + "content": { + "name":"EncryptedBox", +"doc":[ +"Encrypted package that is encrypted for multiple keys",{"type":"reference","argument":"keys","category":"full","description":" Encrypted encryption keys"},{"type":"reference","argument":"algType","category":"full","description":" Package encryption type"},{"type":"reference","argument":"encPackage","category":"full","description":" Encrypted package"},{"type":"reference","argument":"senderKeyGroupId","category":"full","description":" Sender key group"}],"expandable":"true","attributes":[ +{"type":{"type":"alias","childType":"keyGroupId"},"id":4,"name":"senderKeyGroupId"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"EncyptedBoxKey"}},"id":1,"name":"keys"} +,{"type":"string","id":2,"name":"algType"} +,{"type":"bytes","id":3,"name":"encPackage"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"EncryptedBoxSignature"}},"id":5,"name":"signatures"} +]}}, { + "type":"struct", + "content": { + "name":"EncryptedBoxSignature", +"doc":[ +"Signature for encrypted package",{"type":"reference","argument":"algType","category":"full","description":" Alg Type"},{"type":"reference","argument":"signature","category":"full","description":" Signature of encrypted package"}],"attributes":[ +{"type":"string","id":1,"name":"algType"} +,{"type":"bytes","id":2,"name":"signature"} +]}}, { + "type":"struct", + "content": { + "name":"EncyptedBoxKey", +"doc":[ +"Encrypted package encryption key",{"type":"reference","argument":"keyGroupId","category":"full","description":" Key Group Id"},{"type":"reference","argument":"algType","category":"full","description":" Key encryption algorithm"},{"type":"reference","argument":"encryptedKey","category":"hidden","description":" Encrypted encryption key"}],"expandable":"true","attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"usersId"} +,{"type":{"type":"alias","childType":"keyGroupId"},"id":2,"name":"keyGroupId"} +,{"type":"string","id":3,"name":"algType"} +,{"type":"bytes","id":4,"name":"encryptedKey"} +]}}, { + "type":"struct", + "content": { + "name":"KeyGroupId", +"doc":[ +"References to key groups",{"type":"reference","argument":"uid","category":"full","description":" User's id"},{"type":"reference","argument":"keyGroupId","category":"full","description":" Key Group Id"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":{"type":"alias","childType":"keyGroupId"},"id":2,"name":"keyGroupId"} +]}}, { + "type":"struct", + "content": { + "name":"KeyGroupHolder", +"doc":[ +"Key Group Holder",{"type":"reference","argument":"uid","category":"full","description":" User's id"},{"type":"reference","argument":"keyGroup","category":"full","description":" Key Group"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":{"type":"struct","childType":"EncryptionKeyGroup"},"id":2,"name":"keyGroup"} +]}},{"type":"rpc","content":{ +"name":"SendEncryptedPackage", +"header":2657, +"response":{"type":"anonymous","header":2664, "doc":[ +{"type":"reference","argument":"date","category":"full","description":" date"},{"type":"reference","argument":"obsoleteKeyGroups","category":"full","description":" obsolete key group ids"},{"type":"reference","argument":"missedKeyGroups","category":"full","description":" missed key groups"}] ,"attributes":[{"type":{"type":"opt","childType":{"type":"alias","childType":"date"}},"id":1,"name":"date"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"KeyGroupId"}},"id":2,"name":"obsoleteKeyGroups"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"KeyGroupHolder"}},"id":3,"name":"missedKeyGroups"} +]}, +"doc":[ +"Sending encrypted package",{"type":"reference","argument":"randomId","category":"hidden","description":"Random id"}],"attributes":[ +{"type":{"type":"alias","childType":"randomId"},"id":1,"name":"randomId"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":2,"name":"destPeers"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"KeyGroupId"}},"id":3,"name":"ignoredKeyGroups"} +,{"type":{"type":"struct","childType":"EncryptedBox"},"id":4,"name":"encryptedBox"} +]}},{"type":"update","content":{ +"name":"EncryptedPackage", +"header":177, +"doc":[ +"Update about encrypted package",{"type":"reference","argument":"randomId","category":"full","description":" Random Id of package"},{"type":"reference","argument":"date","category":"full","description":" Sending date of package"},{"type":"reference","argument":"senderId","category":"full","description":" Sender id of package"},{"type":"reference","argument":"encryptedBox","category":"full","description":" Encrypted box"}],"attributes":[ +{"type":{"type":"alias","childType":"randomId"},"id":1,"name":"randomId"} +,{"type":{"type":"alias","childType":"date"},"id":2,"name":"date"} +,{"type":{"type":"alias","childType":"userId"},"id":3,"name":"senderId"} +,{"type":{"type":"struct","childType":"EncryptedBox"},"id":4,"name":"encryptedBox"} +]}}]}, { + "title": "Storage", + "package": "storage", + "items": [ +{"type":"rpc","content":{ +"name":"UploadSharedBlob", +"header":2660, +"response":{"type":"anonymous","header":2661, "doc":[ +{"type":"reference","argument":"sharedObjectId","category":"full","description":" Id of shared object"}] ,"attributes":[{"type":"int32","id":1,"name":"sharedObjectId"} +]}, +"doc":[ +"Upload shared blob with user",{"type":"reference","argument":"destPeer","category":"full","description":"Destination peer"},{"type":"reference","argument":"bucket","category":"full","description":"Bucked name"},{"type":"reference","argument":"blob","category":"full","description":"Blob data"},{"type":"reference","argument":"randomId","category":"full","description":"Random id for protecting from double upload"}],"attributes":[ +{"type":{"type":"struct","childType":"UserOutPeer"},"id":1,"name":"destPeer"} +,{"type":"string","id":2,"name":"bucket"} +,{"type":"bytes","id":3,"name":"blob"} +,{"type":{"type":"alias","childType":"randomId"},"id":4,"name":"randomId"} +]}},{"type":"rpc","content":{ +"name":"DownloadSharedBlob", +"header":2662, +"response":{"type":"anonymous","header":2663, "doc":[ +{"type":"reference","argument":"blob","category":"full","description":" Blob contents"}] ,"attributes":[{"type":"bytes","id":1,"name":"blob"} +]}, +"doc":[ +"Download shared blob",{"type":"reference","argument":"destPeer","category":"full","description":"Destination peer"},{"type":"reference","argument":"bucket","category":"full","description":"Bucket name"},{"type":"reference","argument":"objectId","category":"full","description":"Object Id"}],"attributes":[ +{"type":{"type":"struct","childType":"UserOutPeer"},"id":1,"name":"destPeer"} +,{"type":"string","id":2,"name":"bucket"} +,{"type":"int32","id":3,"name":"objectId"} +]}}]}, { + "title": "Peers", + "package": "peers", + "doc": [ + "Peer is an identificator of specific conversation." + ], + "items": [ + { + "type": "enum", + "content": { + "name": "PeerType", + "values": [ { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Group" - } - }, - "id": 5, - "name": "groups" + "name": "Private", + "id": 1 }, { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "UpdateContainer" - } - }, - "id": 6, - "name": "updates" + "name": "Group", + "id": 2 }, { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "MessageContainer" - } - }, - "id": 7, - "name": "messages" + "name": "EncryptedPrivate", + "id": 3 } - ] - } - }, - { + ] + } + }, { + "type":"struct", + "content": { + "name":"Peer", +"doc":[ +"Peer",{"type":"reference","argument":"type","category":"full","description":" Peer Type"},{"type":"reference","argument":"id","category":"full","description":" Peer Id"}],"attributes":[ +{"type":{"type":"enum","childType":"PeerType"},"id":1,"name":"type"} +,{"type":"int32","id":2,"name":"id"} +]}}, { + "type":"struct", + "content": { + "name":"OutPeer", +"doc":[ +"Out peer with access hash",{"type":"reference","argument":"type","category":"full","description":" Peer Type"},{"type":"reference","argument":"id","category":"full","description":" Peer Id"},{"type":"reference","argument":"accessHash","category":"danger","description":" Peer access hash"}],"attributes":[ +{"type":{"type":"enum","childType":"PeerType"},"id":1,"name":"type"} +,{"type":"int32","id":2,"name":"id"} +,{"type":"int64","id":3,"name":"accessHash"} +]}}, { + "type":"struct", + "content": { + "name":"UserOutPeer", +"doc":[ +"User's out peer",{"type":"reference","argument":"uid","category":"full","description":" User's id"},{"type":"reference","argument":"accessHash","category":"danger","description":" User's access hash"}],"attributes":[ +{"type":{"type":"alias","childType":"userId"},"id":1,"name":"uid"} +,{"type":"int64","id":2,"name":"accessHash"} +]}}, { + "type":"struct", + "content": { + "name":"GroupOutPeer", +"doc":[ +"Group's out peer",{"type":"reference","argument":"groupId","category":"full","description":" Group's Id"},{"type":"reference","argument":"accessHash","category":"danger","description":" Group's access hash"}],"attributes":[ +{"type":{"type":"alias","childType":"groupId"},"id":1,"name":"groupId"} +,{"type":"int64","id":2,"name":"accessHash"} +]}}]}, { + "title": "Sequence and Updates", + "package": "sequence", + "doc": [ + "Each device has it's own update sequence. At the begining application request initial sequence state by", + "calling GetState. On each application restart or NewSessionCreated application calls GetDifference for receiving", + "updates in update sequence.", + "GetState and GetDifference automatically subscribes session to receiving updates in session.", + "Each update has seq and state. Seq is sequental index of updated and used for detecting of holes in update sequence", + "(because of server failure or session die) on client side.", + "All updates needed to be processed in partucular order according to seq values.", + "In some updates there can be references to users that are not available at client yer. In this case application need", + "to ignore such update and init getting difference." + ], + "items": [ +{"type":"update_box","content":{ +"name":"SeqUpdate", +"header":13, +"doc":[ +"Sequence update",{"type":"reference","argument":"seq","category":"full","description":" Sequence number of update"},{"type":"reference","argument":"state","category":"compact","description":" Sequece state of update"},{"type":"reference","argument":"updateHeader","category":"full","description":" header of update"},{"type":"reference","argument":"update","category":"compact","description":" The update"}],"attributes":[ +{"type":"int32","id":1,"name":"seq"} +,{"type":{"type":"alias","childType":"seq_state"},"id":2,"name":"state"} +,{"type":"int32","id":3,"name":"updateHeader"} +,{"type":"bytes","id":4,"name":"update"} +]}},{"type":"update_box","content":{ +"name":"FatSeqUpdate", +"header":73, +"doc":[ +"Fat sequence update with additional data",{"type":"reference","argument":"seq","category":"full","description":" Sequence number of update"},{"type":"reference","argument":"state","category":"compact","description":" Sequence state of update"},{"type":"reference","argument":"updateHeader","category":"full","description":" header of update"},{"type":"reference","argument":"update","category":"compact","description":" The update"},{"type":"reference","argument":"users","category":"compact","description":" Users that are referenced in update"},{"type":"reference","argument":"groups","category":"compact","description":" Groups that are referenced in update"}],"attributes":[ +{"type":"int32","id":1,"name":"seq"} +,{"type":{"type":"alias","childType":"seq_state"},"id":2,"name":"state"} +,{"type":"int32","id":3,"name":"updateHeader"} +,{"type":"bytes","id":4,"name":"update"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":5,"name":"users"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"Group"}},"id":6,"name":"groups"} +]}},{"type":"update_box","content":{ +"name":"WeakUpdate", +"header":26, +"doc":[ +"Out of sequence update (for typing and online statuses)",{"type":"reference","argument":"date","category":"full","description":" Date of update"},{"type":"reference","argument":"updateHeader","category":"full","description":" Header of update"},{"type":"reference","argument":"update","category":"compact","description":" The update"}],"attributes":[ +{"type":"int64","id":1,"name":"date"} +,{"type":"int32","id":2,"name":"updateHeader"} +,{"type":"bytes","id":3,"name":"update"} +]}},{"type":"update_box","content":{ +"name":"WeakFatUpdate", +"header":2673, +"doc":[ +"Fat Weak Update",{"type":"reference","argument":"date","category":"full","description":" Date of update"},{"type":"reference","argument":"updateHeader","category":"full","description":" Header of update"},{"type":"reference","argument":"update","category":"full","description":" The update"},{"type":"reference","argument":"users","category":"full","description":" Users that are referenced in update"},{"type":"reference","argument":"groups","category":"full","description":" Groups that are referenced in update"}],"attributes":[ +{"type":"int64","id":1,"name":"date"} +,{"type":"int32","id":2,"name":"updateHeader"} +,{"type":"bytes","id":3,"name":"update"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":4,"name":"users"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"Group"}},"id":5,"name":"groups"} +]}},{"type":"update_box","content":{ +"name":"SeqUpdateTooLong", +"header":25, +"doc":[ +"Notification about requiring performing manual GetDifference"],"attributes":[ +]}}, { + "type":"struct", + "content": { + "name":"UpdateContainer", +"doc":[ +"Update container",{"type":"reference","argument":"updateHeader","category":"full","description":" Header of update"},{"type":"reference","argument":"update","category":"compact","description":" The updatre"}],"attributes":[ +{"type":"int32","id":1,"name":"updateHeader"} +,{"type":"bytes","id":2,"name":"update"} +]}},{"type":"update_box","content":{ +"name":"CombinedUpdate", +"header":2625, +"doc":[ +"Combined update",{"type":"reference","argument":"seqStart","category":"full","description":" Sequence number start"},{"type":"reference","argument":"seqEnd","category":"full","description":" Sequence number end"},{"type":"reference","argument":"state","category":"full","description":" Sequence state"},{"type":"reference","argument":"users","category":"compact","description":" Update's users"},{"type":"reference","argument":"groups","category":"compact","description":" Update's groups"},{"type":"reference","argument":"updates","category":"full","description":" Updates (can be empty)"},{"type":"reference","argument":"messages","category":"full","description":" New messages"}],"attributes":[ +{"type":"int32","id":1,"name":"seqStart"} +,{"type":"int32","id":2,"name":"seqEnd"} +,{"type":{"type":"alias","childType":"seq_state"},"id":3,"name":"state"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":4,"name":"users"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"Group"}},"id":5,"name":"groups"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"UpdateContainer"}},"id":6,"name":"updates"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"MessageContainer"}},"id":7,"name":"messages"} +]}}, { "type": "enum", "content": { "name": "UpdateOptimization", @@ -20644,780 +3984,157 @@ "name": "GROUPS_V2", "id": 7 } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "GetState", - "header": 9, - "response": { - "type": "reference", - "name": "Seq" - }, - "doc": [ - "Get main sequence state", - { - "type": "reference", - "argument": "optimizations", - "category": "full", - "description": "Enabled optimizations" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "enum", - "childType": "UpdateOptimization" - } - }, - "id": 1, - "name": "optimizations" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "GetDifference", - "header": 11, - "response": { - "type": "anonymous", - "header": 12, - "doc": [ - { - "type": "reference", - "argument": "seq", - "category": "full", - "description": " Seq of LAST update in updates" - }, - { - "type": "reference", - "argument": "state", - "category": "full", - "description": " State of LAST update in updates" - }, - { - "type": "reference", - "argument": "users", - "category": "compact", - "description": " Users referenced in updates" - }, - { - "type": "reference", - "argument": "groups", - "category": "compact", - "description": " Groups referenced in updates" - }, - { - "type": "reference", - "argument": "updates", - "category": "compact", - "description": " Updates" - }, - { - "type": "reference", - "argument": "needMore", - "category": "full", - "description": " Need to perform other difference" - }, - { - "type": "reference", - "argument": "usersRefs", - "category": "full", - "description": " Direct references of users" - }, - { - "type": "reference", - "argument": "groupsRefs", - "category": "full", - "description": " Direct References of groups" - } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "seq" - }, - { - "type": { - "type": "alias", - "childType": "seq_state" - }, - "id": 2, - "name": "state" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "User" - } - }, - "id": 3, - "name": "users" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Group" - } - }, - "id": 6, - "name": "groups" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "UpdateContainer" - } - }, - "id": 4, - "name": "updates" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "MessageContainer" - } - }, - "id": 7, - "name": "messages" - }, - { - "type": "bool", - "id": 5, - "name": "needMore" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "UserOutPeer" - } - }, - "id": 8, - "name": "usersRefs" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "GroupOutPeer" - } - }, - "id": 9, - "name": "groupsRefs" - } - ] - }, - "doc": [ - "Getting difference of sequence", - { - "type": "reference", - "argument": "seq", - "category": "full", - "description": "Sequence number" - }, - { - "type": "reference", - "argument": "state", - "category": "compact", - "description": "Sequence state" - }, - { - "type": "reference", - "argument": "optimizations", - "category": "full", - "description": "Enabled optimizations" - } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "seq" - }, - { - "type": { - "type": "alias", - "childType": "seq_state" - }, - "id": 2, - "name": "state" - }, - { - "type": { - "type": "list", - "childType": { - "type": "enum", - "childType": "UpdateOptimization" - } - }, - "id": 3, - "name": "optimizations" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "GetReferencedEntitites", - "header": 2628, - "response": { - "type": "anonymous", - "header": 2629, - "doc": [ - { - "type": "reference", - "argument": "users", - "category": "compact", - "description": " Loaded users" - }, - { - "type": "reference", - "argument": "groups", - "category": "compact", - "description": " Loaded groups" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "User" - } - }, - "id": 1, - "name": "users" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "Group" - } - }, - "id": 2, - "name": "groups" - } - ] - }, - "doc": [ - "Loading referenced entities", - { - "type": "reference", - "argument": "users", - "category": "compact", - "description": "Users to load" - }, - { - "type": "reference", - "argument": "groups", - "category": "compact", - "description": "Groups to load. Also returns all members of a group." - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "UserOutPeer" - } - }, - "id": 1, - "name": "users" - }, - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "GroupOutPeer" - } - }, - "id": 2, - "name": "groups" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "RawUpdate", - "header": 80, - "doc": [ - "Custom Raw Update", - { - "type": "reference", - "argument": "type", - "category": "full", - "description": " Type of content" - }, - { - "type": "reference", - "argument": "bytes", - "category": "full", - "description": " Raw data" - } - ], - "attributes": [ - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 1, - "name": "type" - }, - { - "type": "bytes", - "id": 2, - "name": "bytes" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "EmptyUpdate", - "header": 85, - "doc": [ - "Empty update" - ], - "attributes": [] - } - }, - { - "type": "empty" - }, - { - "type": "rpc", - "content": { - "name": "SubscribeToOnline", - "header": 32, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Subscribing for users online", - { - "type": "reference", - "argument": "users", - "category": "compact", - "description": "Users for subscription" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "UserOutPeer" - } - }, - "id": 1, - "name": "users" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "SubscribeFromOnline", - "header": 33, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Removing subscription for users online", - { - "type": "reference", - "argument": "users", - "category": "compact", - "description": "Users of subscriptions" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "UserOutPeer" - } - }, - "id": 1, - "name": "users" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "SubscribeToGroupOnline", - "header": 74, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Subscribing for groups online", - { - "type": "reference", - "argument": "groups", - "category": "compact", - "description": "Groups for subscription" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "GroupOutPeer" - } - }, - "id": 1, - "name": "groups" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "SubscribeFromGroupOnline", - "header": 75, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Removing subscription for groups online", - { - "type": "reference", - "argument": "groups", - "category": "compact", - "description": "Groups of subscriptions" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "GroupOutPeer" - } - }, - "id": 1, - "name": "groups" - } - ] - } + ] } - ] - }, - { + },{"type":"rpc","content":{ +"name":"GetState", +"header":9, +"response":{"type":"reference","name":"Seq"}, +"doc":[ +"Get main sequence state",{"type":"reference","argument":"optimizations","category":"full","description":"Enabled optimizations"}],"attributes":[ +{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":1,"name":"optimizations"} +]}},{"type":"rpc","content":{ +"name":"GetDifference", +"header":11, +"response":{"type":"anonymous","header":12, "doc":[ +{"type":"reference","argument":"seq","category":"full","description":" Seq of LAST update in updates"},{"type":"reference","argument":"state","category":"full","description":" State of LAST update in updates"},{"type":"reference","argument":"users","category":"compact","description":" Users referenced in updates"},{"type":"reference","argument":"groups","category":"compact","description":" Groups referenced in updates"},{"type":"reference","argument":"updates","category":"compact","description":" Updates"},{"type":"reference","argument":"needMore","category":"full","description":" Need to perform other difference"},{"type":"reference","argument":"usersRefs","category":"full","description":" Direct references of users"},{"type":"reference","argument":"groupsRefs","category":"full","description":" Direct References of groups"}] ,"attributes":[{"type":"int32","id":1,"name":"seq"} +,{"type":{"type":"alias","childType":"seq_state"},"id":2,"name":"state"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":3,"name":"users"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"Group"}},"id":6,"name":"groups"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"UpdateContainer"}},"id":4,"name":"updates"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"MessageContainer"}},"id":7,"name":"messages"} +,{"type":"bool","id":5,"name":"needMore"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":8,"name":"usersRefs"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"GroupOutPeer"}},"id":9,"name":"groupsRefs"} +]}, +"doc":[ +"Getting difference of sequence",{"type":"reference","argument":"seq","category":"full","description":"Sequence number"},{"type":"reference","argument":"state","category":"compact","description":"Sequence state"},{"type":"reference","argument":"optimizations","category":"full","description":"Enabled optimizations"}],"attributes":[ +{"type":"int32","id":1,"name":"seq"} +,{"type":{"type":"alias","childType":"seq_state"},"id":2,"name":"state"} +,{"type":{"type":"list","childType":{"type":"enum","childType":"UpdateOptimization"}},"id":3,"name":"optimizations"} +]}},{"type":"rpc","content":{ +"name":"GetReferencedEntitites", +"header":2628, +"response":{"type":"anonymous","header":2629, "doc":[ +{"type":"reference","argument":"users","category":"compact","description":" Loaded users"},{"type":"reference","argument":"groups","category":"compact","description":" Loaded groups"}] ,"attributes":[{"type":{"type":"list","childType":{"type":"struct","childType":"User"}},"id":1,"name":"users"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"Group"}},"id":2,"name":"groups"} +]}, +"doc":[ +"Loading referenced entities",{"type":"reference","argument":"users","category":"compact","description":"Users to load"},{"type":"reference","argument":"groups","category":"compact","description":"Groups to load. Also returns all members of a group."}],"attributes":[ +{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":1,"name":"users"} +,{"type":{"type":"list","childType":{"type":"struct","childType":"GroupOutPeer"}},"id":2,"name":"groups"} +]}},{"type":"update","content":{ +"name":"RawUpdate", +"header":80, +"doc":[ +"Custom Raw Update",{"type":"reference","argument":"type","category":"full","description":" Type of content"},{"type":"reference","argument":"bytes","category":"full","description":" Raw data"}],"attributes":[ +{"type":{"type":"opt","childType":"string"},"id":1,"name":"type"} +,{"type":"bytes","id":2,"name":"bytes"} +]}},{"type":"update","content":{ +"name":"EmptyUpdate", +"header":85, +"doc":[ +"Empty update"],"attributes":[ +]}},{"type":"empty"},{"type":"rpc","content":{ +"name":"SubscribeToOnline", +"header":32, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Subscribing for users online",{"type":"reference","argument":"users","category":"compact","description":"Users for subscription"}],"attributes":[ +{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":1,"name":"users"} +]}},{"type":"rpc","content":{ +"name":"SubscribeFromOnline", +"header":33, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Removing subscription for users online",{"type":"reference","argument":"users","category":"compact","description":"Users of subscriptions"}],"attributes":[ +{"type":{"type":"list","childType":{"type":"struct","childType":"UserOutPeer"}},"id":1,"name":"users"} +]}},{"type":"rpc","content":{ +"name":"SubscribeToGroupOnline", +"header":74, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Subscribing for groups online",{"type":"reference","argument":"groups","category":"compact","description":"Groups for subscription"}],"attributes":[ +{"type":{"type":"list","childType":{"type":"struct","childType":"GroupOutPeer"}},"id":1,"name":"groups"} +]}},{"type":"rpc","content":{ +"name":"SubscribeFromGroupOnline", +"header":75, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Removing subscription for groups online",{"type":"reference","argument":"groups","category":"compact","description":"Groups of subscriptions"}],"attributes":[ +{"type":{"type":"list","childType":{"type":"struct","childType":"GroupOutPeer"}},"id":1,"name":"groups"} +]}}]}, { "title": "Counters", "package": "counters", "doc": [ "Application Counters, used to display various counters in application" ], "items": [ - { - "type": "struct", - "content": { - "name": "AppCounters", - "doc": [ - "Application counters", - { - "type": "reference", - "argument": "globalCounter", - "category": "full", - "description": " Global unread counter" - } - ], - "expandable": "true", - "attributes": [ - { - "type": { - "type": "opt", - "childType": "int32" - }, - "id": 1, - "name": "globalCounter" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "CountersChanged", - "header": 215, - "doc": [ - "Update about counters changed", - { - "type": "reference", - "argument": "counters", - "category": "full", - "description": " Current Application counters" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "AppCounters" - }, - "id": 1, - "name": "counters" - } - ] - } - } - ] - }, - { + { + "type":"struct", + "content": { + "name":"AppCounters", +"doc":[ +"Application counters",{"type":"reference","argument":"globalCounter","category":"full","description":" Global unread counter"}],"expandable":"true","attributes":[ +{"type":{"type":"opt","childType":"int32"},"id":1,"name":"globalCounter"} +]}},{"type":"update","content":{ +"name":"CountersChanged", +"header":215, +"doc":[ +"Update about counters changed",{"type":"reference","argument":"counters","category":"full","description":" Current Application counters"}],"attributes":[ +{"type":{"type":"struct","childType":"AppCounters"},"id":1,"name":"counters"} +]}}]}, { "title": "Miscellaneous", "package": "misc", "items": [ - { - "type": "response", - "content": { - "name": "Void", - "header": 50, - "doc": [ - "Empty response" - ], - "attributes": [] - } - }, - { - "type": "response", - "content": { - "name": "Seq", - "header": 72, - "doc": [ - "Sequence response. Methods that return this value must process response in particular order", - { - "type": "reference", - "argument": "seq", - "category": "full", - "description": " Sequence number of response" - }, - { - "type": "reference", - "argument": "state", - "category": "full", - "description": " Sequence state of response" - } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "seq" - }, - { - "type": { - "type": "alias", - "childType": "seq_state" - }, - "id": 2, - "name": "state" - } - ] - } - }, - { - "type": "response", - "content": { - "name": "SeqDate", - "header": 102, - "doc": [ - "Sequence response with date. Methods that return this value must process response in particular order", - { - "type": "reference", - "argument": "seq", - "category": "full", - "description": " Sequence number of response" - }, - { - "type": "reference", - "argument": "state", - "category": "full", - "description": " Sequence state of response" - }, - { - "type": "reference", - "argument": "date", - "category": "full", - "description": " Date of response" - } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "seq" - }, - { - "type": { - "type": "alias", - "childType": "seq_state" - }, - "id": 2, - "name": "state" - }, - { - "type": { - "type": "alias", - "childType": "date" - }, - "id": 3, - "name": "date" - } - ] - } - }, - { - "type": "response", - "content": { - "name": "Bool", - "header": 209, - "doc": [ - "Boolean response", - { - "type": "reference", - "argument": "value", - "category": "full", - "description": " Response value" - } - ], - "attributes": [ - { - "type": "bool", - "id": 1, - "name": "value" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "Config", - "doc": [ - "Configuration of system", - { - "type": "reference", - "argument": "maxGroupSize", - "category": "full", - "description": " Current maximum group size" - } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "maxGroupSize" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "Extension", - "doc": [ - "Extention", - { - "type": "reference", - "argument": "id", - "category": "full", - "description": " Extension id" - }, - { - "type": "reference", - "argument": "data", - "category": "full", - "description": " Extension data" - } - ], - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "id" - }, - { - "type": "bytes", - "id": 2, - "name": "data" - } - ] - } - }, - { - "type": "update", - "content": { - "name": "Config", - "header": 42, - "doc": [ - "Update about config change", - { - "type": "reference", - "argument": "config", - "category": "full", - "description": " new config" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "Config" - }, - "id": 1, - "name": "config" - } - ] - } - } - ] - }, - { +{"type":"response","content":{ +"name":"Void", +"header":50, +"doc":[ +"Empty response"],"attributes":[ +]}},{"type":"response","content":{ +"name":"Seq", +"header":72, +"doc":[ +"Sequence response. Methods that return this value must process response in particular order",{"type":"reference","argument":"seq","category":"full","description":" Sequence number of response"},{"type":"reference","argument":"state","category":"full","description":" Sequence state of response"}],"attributes":[ +{"type":"int32","id":1,"name":"seq"} +,{"type":{"type":"alias","childType":"seq_state"},"id":2,"name":"state"} +]}},{"type":"response","content":{ +"name":"SeqDate", +"header":102, +"doc":[ +"Sequence response with date. Methods that return this value must process response in particular order",{"type":"reference","argument":"seq","category":"full","description":" Sequence number of response"},{"type":"reference","argument":"state","category":"full","description":" Sequence state of response"},{"type":"reference","argument":"date","category":"full","description":" Date of response"}],"attributes":[ +{"type":"int32","id":1,"name":"seq"} +,{"type":{"type":"alias","childType":"seq_state"},"id":2,"name":"state"} +,{"type":{"type":"alias","childType":"date"},"id":3,"name":"date"} +]}},{"type":"response","content":{ +"name":"Bool", +"header":209, +"doc":[ +"Boolean response",{"type":"reference","argument":"value","category":"full","description":" Response value"}],"attributes":[ +{"type":"bool","id":1,"name":"value"} +]}}, { + "type":"struct", + "content": { + "name":"Config", +"doc":[ +"Configuration of system",{"type":"reference","argument":"maxGroupSize","category":"full","description":" Current maximum group size"}],"attributes":[ +{"type":"int32","id":1,"name":"maxGroupSize"} +]}}, { + "type":"struct", + "content": { + "name":"Extension", +"doc":[ +"Extention",{"type":"reference","argument":"id","category":"full","description":" Extension id"},{"type":"reference","argument":"data","category":"full","description":" Extension data"}],"attributes":[ +{"type":"int32","id":1,"name":"id"} +,{"type":"bytes","id":2,"name":"data"} +]}},{"type":"update","content":{ +"name":"Config", +"header":42, +"doc":[ +"Update about config change",{"type":"reference","argument":"config","category":"full","description":" new config"}],"attributes":[ +{"type":{"type":"struct","childType":"Config"},"id":1,"name":"config"} +]}}]}, { "title": "Device Info", "package": "device", "doc": [ @@ -21425,53 +4142,15 @@ "For example, getting timezone or preffered languages" ], "items": [ - { - "type": "rpc", - "content": { - "name": "NotifyAboutDeviceInfo", - "header": 229, - "response": { - "type": "reference", - "name": "Void" - }, - "doc": [ - "Notifying about device information", - { - "type": "reference", - "argument": "preferredLanguages", - "category": "full", - "description": "Preferred languages" - }, - { - "type": "reference", - "argument": "timeZone", - "category": "full", - "description": "Device Time Zone" - } - ], - "attributes": [ - { - "type": { - "type": "list", - "childType": "string" - }, - "id": 1, - "name": "preferredLanguages" - }, - { - "type": { - "type": "opt", - "childType": "string" - }, - "id": 2, - "name": "timeZone" - } - ] - } - } - ] - }, - { +{"type":"rpc","content":{ +"name":"NotifyAboutDeviceInfo", +"header":229, +"response":{"type":"reference","name":"Void"}, +"doc":[ +"Notifying about device information",{"type":"reference","argument":"preferredLanguages","category":"full","description":"Preferred languages"},{"type":"reference","argument":"timeZone","category":"full","description":"Device Time Zone"}],"attributes":[ +{"type":{"type":"list","childType":"string"},"id":1,"name":"preferredLanguages"} +,{"type":{"type":"opt","childType":"string"},"id":2,"name":"timeZone"} +]}}]}, { "title": "Webactions", "package": "webactions", "doc": [ @@ -21479,314 +4158,85 @@ "perform actions, and pass result on action completion" ], "items": [ - { - "type": "rpc", - "content": { - "name": "InitWebaction", - "header": 116, - "response": { - "type": "anonymous", - "header": 117, - "doc": [ - { - "type": "reference", - "argument": "uri", - "category": "full", - "description": " Web action uri" - }, - { - "type": "reference", - "argument": "regexp", - "category": "full", - "description": " Regular expression. Required to match completion of web action" - }, - { - "type": "reference", - "argument": "actionHash", - "category": "danger", - "description": " Identifier of current web action. Required to complete it" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "uri" - }, - { - "type": "string", - "id": 2, - "name": "regexp" - }, - { - "type": "string", - "id": 3, - "name": "actionHash" - } - ] - }, - "doc": [ - "Initialize start of web action", - { - "type": "reference", - "argument": "actionName", - "category": "full", - "description": "Name of web action" - }, - { - "type": "reference", - "argument": "params", - "category": "full", - "description": "Additional params required to make action's uri" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "actionName" - }, - { - "type": { - "type": "struct", - "childType": "MapValue" - }, - "id": 2, - "name": "params" - } - ] - } - }, - { - "type": "rpc", - "content": { - "name": "CompleteWebaction", - "header": 123, - "response": { - "type": "anonymous", - "header": 124, - "doc": [ - { - "type": "reference", - "argument": "result", - "category": "full", - "description": " Reslut of web action completion" - } - ], - "attributes": [ - { - "type": { - "type": "struct", - "childType": "MapValue" - }, - "id": 1, - "name": "result" - } - ] - }, - "doc": [ - "Complete started web action", - { - "type": "reference", - "argument": "actionHash", - "category": "danger", - "description": "Identifier of given web action" - }, - { - "type": "reference", - "argument": "completeUri", - "category": "full", - "description": "Final uri of web action" - } - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "actionHash" - }, - { - "type": "string", - "id": 2, - "name": "completeUri" - } - ] - } - } - ] - }, - { +{"type":"rpc","content":{ +"name":"InitWebaction", +"header":116, +"response":{"type":"anonymous","header":117, "doc":[ +{"type":"reference","argument":"uri","category":"full","description":" Web action uri"},{"type":"reference","argument":"regexp","category":"full","description":" Regular expression. Required to match completion of web action"},{"type":"reference","argument":"actionHash","category":"danger","description":" Identifier of current web action. Required to complete it"}] ,"attributes":[{"type":"string","id":1,"name":"uri"} +,{"type":"string","id":2,"name":"regexp"} +,{"type":"string","id":3,"name":"actionHash"} +]}, +"doc":[ +"Initialize start of web action",{"type":"reference","argument":"actionName","category":"full","description":"Name of web action"},{"type":"reference","argument":"params","category":"full","description":"Additional params required to make action's uri"}],"attributes":[ +{"type":"string","id":1,"name":"actionName"} +,{"type":{"type":"struct","childType":"MapValue"},"id":2,"name":"params"} +]}},{"type":"rpc","content":{ +"name":"CompleteWebaction", +"header":123, +"response":{"type":"anonymous","header":124, "doc":[ +{"type":"reference","argument":"result","category":"full","description":" Reslut of web action completion"}] ,"attributes":[{"type":{"type":"struct","childType":"MapValue"},"id":1,"name":"result"} +]}, +"doc":[ +"Complete started web action",{"type":"reference","argument":"actionHash","category":"danger","description":"Identifier of given web action"},{"type":"reference","argument":"completeUri","category":"full","description":"Final uri of web action"}],"attributes":[ +{"type":"string","id":1,"name":"actionHash"} +,{"type":"string","id":2,"name":"completeUri"} +]}}]}, { "title": "Collections", "package": "collections", "doc": [ "Flexible raw collections without structure" ], "items": [ - { - "type": "trait", - "content": { - "isContainer": "true", - "name": "RawValue", - "attributes": [] - } - }, - { - "type": "struct", - "content": { - "name": "StringValue", - "doc": [ - "Text value" - ], - "trait": { - "name": "RawValue", - "key": 1 - }, - "attributes": [ - { - "type": "string", - "id": 1, - "name": "text" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "Int32Value", - "doc": [ - "Int32 value" - ], - "trait": { - "name": "RawValue", - "key": 2 - }, - "attributes": [ - { - "type": "int32", - "id": 1, - "name": "value" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "Int64Value", - "doc": [ - "Int64 value" - ], - "trait": { - "name": "RawValue", - "key": 3 - }, - "attributes": [ - { - "type": "int64", - "id": 1, - "name": "value" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "DoubleValue", - "doc": [ - "Double value" - ], - "trait": { - "name": "RawValue", - "key": 4 - }, - "attributes": [ - { - "type": "double", - "id": 1, - "name": "value" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "ArrayValue", - "doc": [ - "Array value" - ], - "trait": { - "name": "RawValue", - "key": 5 - }, - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "trait", - "childType": "RawValue" - } - }, - "id": 1, - "name": "array" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "MapValueItem", - "doc": [ - "Item of Map" - ], - "attributes": [ - { - "type": "string", - "id": 1, - "name": "key" - }, - { - "type": { - "type": "trait", - "childType": "RawValue" - }, - "id": 2, - "name": "value" - } - ] - } - }, - { - "type": "struct", - "content": { - "name": "MapValue", - "doc": [ - "Map Value" - ], - "trait": { - "name": "RawValue", - "key": 6 - }, - "attributes": [ - { - "type": { - "type": "list", - "childType": { - "type": "struct", - "childType": "MapValueItem" - } - }, - "id": 1, - "name": "items" - } - ] - } - } - ] - } - ] -} +{"type":"trait","content":{ +"isContainer":"true","name":"RawValue","attributes":[ +]}}, { + "type":"struct", + "content": { + "name":"StringValue", +"doc":[ +"Text value"],"trait":{"name":"RawValue","key":1},"attributes":[ +{"type":"string","id":1,"name":"text"} +]}}, { + "type":"struct", + "content": { + "name":"Int32Value", +"doc":[ +"Int32 value"],"trait":{"name":"RawValue","key":2},"attributes":[ +{"type":"int32","id":1,"name":"value"} +]}}, { + "type":"struct", + "content": { + "name":"Int64Value", +"doc":[ +"Int64 value"],"trait":{"name":"RawValue","key":3},"attributes":[ +{"type":"int64","id":1,"name":"value"} +]}}, { + "type":"struct", + "content": { + "name":"DoubleValue", +"doc":[ +"Double value"],"trait":{"name":"RawValue","key":4},"attributes":[ +{"type":"double","id":1,"name":"value"} +]}}, { + "type":"struct", + "content": { + "name":"ArrayValue", +"doc":[ +"Array value"],"trait":{"name":"RawValue","key":5},"attributes":[ +{"type":{"type":"list","childType":{"type":"trait","childType":"RawValue"}},"id":1,"name":"array"} +]}}, { + "type":"struct", + "content": { + "name":"MapValueItem", +"doc":[ +"Item of Map"],"attributes":[ +{"type":"string","id":1,"name":"key"} +,{"type":{"type":"trait","childType":"RawValue"},"id":2,"name":"value"} +]}}, { + "type":"struct", + "content": { + "name":"MapValue", +"doc":[ +"Map Value"],"trait":{"name":"RawValue","key":6},"attributes":[ +{"type":{"type":"list","childType":{"type":"struct","childType":"MapValueItem"}},"id":1,"name":"items"} +]}}]}]} \ No newline at end of file diff --git a/actor-server/actor-core/src/main/scala/im/actor/server/push/apple/APNSSend.scala b/actor-server/actor-core/src/main/scala/im/actor/server/push/apple/APNSSend.scala index 825b83fbe3..99c164a17a 100644 --- a/actor-server/actor-core/src/main/scala/im/actor/server/push/apple/APNSSend.scala +++ b/actor-server/actor-core/src/main/scala/im/actor/server/push/apple/APNSSend.scala @@ -1,6 +1,7 @@ package im.actor.server.push.apple import akka.actor.ActorSystem +import akka.event.Logging import com.google.protobuf.wrappers.{ Int32Value, StringValue } import com.relayrides.pushy.apns.PushNotificationResponse import com.relayrides.pushy.apns.util.{ SimpleApnsPushNotification, TokenUtil } @@ -15,18 +16,28 @@ trait APNSSend { private val listeners = TrieMap.empty[String, PushFutureListener] protected def sendNotification(payload: String, creds: ApplePushCredentials, userId: Int)(implicit client: ApplePushExtension#Client, system: ActorSystem): NFuture[PushNotificationResponse[SimpleApnsPushNotification]] = { - // when topic is null, it will be taken from APNs certificate - // http://relayrides.github.io/pushy/apidocs/0.6/com/relayrides/pushy/apns/ApnsPushNotification.html#getTopic-- + + val log = Logging(system, getClass) val token = BitVector(creds.token.toByteArray).toHex + + log.debug( + s"Searching topic for ApnsKey: {}, BundleId: {}, AuthId: {}, IsVoip: {}, token: $token", + creds.apnsKey, creds.bundleId, creds.authId, creds.isVoip + ) + val topic: String = (creds.apnsKey, creds.bundleId) match { case (_, Some(bundleId)) ⇒ bundleId.value - case (Some(key), _) ⇒ ApplePushExtension(system).apnsBundleId.get(key.value).orNull + case (Some(key), _) ⇒ ApplePushExtension(system).apnsBundleId(creds.isVoip).get(key.value).orNull case _ ⇒ - system.log.warning("Wrong creds format on sending notification. Creds: {}", creds) + log.warning("Wrong creds format on sending notification. Creds: {}", creds) null } - system.log.debug(s"Sending APNS, token: {}, key: {}, isVoip: {}, topic: {}, payload: $payload", token, creds.apnsKey, creds.isVoip, topic) - val notification = new SimpleApnsPushNotification(TokenUtil.sanitizeTokenString(token), topic, payload) + + val sanitizedToken = TokenUtil.sanitizeTokenString(token) + log.debug(s"Sending APNS, token: {}, key: {}, isVoip: {}, topic: {}, payload: $payload", sanitizedToken, creds.apnsKey, creds.isVoip, topic) + + val notification = new SimpleApnsPushNotification(sanitizedToken, topic, payload) + val listener = listeners.getOrElseUpdate(token, new PushFutureListener(userId, creds, extractCredsId(creds))(system)) client.sendNotification(notification).addListener(listener) } diff --git a/actor-server/actor-core/src/main/scala/im/actor/server/push/apple/ApplePushExtension.scala b/actor-server/actor-core/src/main/scala/im/actor/server/push/apple/ApplePushExtension.scala index 04f12cab82..2eda1c457c 100644 --- a/actor-server/actor-core/src/main/scala/im/actor/server/push/apple/ApplePushExtension.scala +++ b/actor-server/actor-core/src/main/scala/im/actor/server/push/apple/ApplePushExtension.scala @@ -5,8 +5,7 @@ import java.util.concurrent.{ ExecutionException, TimeUnit, TimeoutException } import akka.actor.{ ActorSystem, ExtendedActorSystem, Extension, ExtensionId, ExtensionIdProvider } import akka.event.Logging -import com.relayrides.pushy.apns.ApnsClient -import com.relayrides.pushy.apns.util.SimpleApnsPushNotification +import com.relayrides.pushy.apns.{ ApnsClient, ApnsClientBuilder } import im.actor.server.db.DbExtension import im.actor.server.model.push.ApplePushCredentials import im.actor.server.persist.push.ApplePushCredentialsRepo @@ -29,7 +28,7 @@ final class ApplePushExtension(system: ActorSystem) extends Extension with AnyRe private val MaxCreateAttempts = 50 - type Client = ApnsClient[SimpleApnsPushNotification] + type Client = ApnsClient import system.dispatcher @@ -43,8 +42,12 @@ final class ApplePushExtension(system: ActorSystem) extends Extension with AnyRe // there are some apple push keys, that require topic(bundleId) // to be included in apple push notification. We provide apns key -> bundle id // mapping for them. - val apnsBundleId: Map[Int, String] = (config.certs collect { - case ApnsCert(Some(key), Some(bundleId), _, _, _, _) ⇒ key → bundleId + // val apnsBundleId: Map[Int, String] = (config.certs collect { + // case ApnsCert(Some(key), Some(bundleId), _, _, _, _) ⇒ key → bundleId + // }).toMap + + def apnsBundleId(isVoip: Boolean): Map[Int, String] = (config.certs filter (_.isVoip == isVoip) collect { + case ApnsCert(Some(key), bundleId, _, _, _, _) ⇒ key → bundleId.getOrElse(null) }).toMap private val (clients, voipClients): (TrieMap[String, Future[Client]], TrieMap[String, Future[Client]]) = { @@ -69,7 +72,7 @@ final class ApplePushExtension(system: ActorSystem) extends Extension with AnyRe val connectFuture: Future[Client] = Future { blocking { - val client = new ApnsClient[SimpleApnsPushNotification](new File(cert.path), cert.password) + val client = new ApnsClientBuilder().setClientCredentials(new File(cert.path), cert.password).build() client.connect(host).get(20, TimeUnit.SECONDS) log.debug("Established client connection for cert: {}, is voip: {}", certKey, cert.isVoip) client diff --git a/actor-server/actor-core/src/main/scala/im/actor/server/push/apple/ApplePushProvider.scala b/actor-server/actor-core/src/main/scala/im/actor/server/push/apple/ApplePushProvider.scala index 135eebb2f2..ab4ed88ab9 100644 --- a/actor-server/actor-core/src/main/scala/im/actor/server/push/apple/ApplePushProvider.scala +++ b/actor-server/actor-core/src/main/scala/im/actor/server/push/apple/ApplePushProvider.scala @@ -9,6 +9,8 @@ import im.actor.server.model.push.ApplePushCredentials import im.actor.server.push.PushProvider import im.actor.server.sequence.PushData +import scala.concurrent.Future + final class ApplePushProvider(userId: Int)(implicit system: ActorSystem) extends PushProvider with APNSSend { import system.dispatcher @@ -31,6 +33,7 @@ final class ApplePushProvider(userId: Int)(implicit system: ActorSystem) extends log.debug("Delivering invisible(seq:{}) to bundleId: {}", seq, creds.bundleId) sendNotification(payload = seqOnly(seq), creds, userId) } + deliverVoip(seq, creds.authId) } } @@ -66,9 +69,28 @@ final class ApplePushProvider(userId: Int)(implicit system: ActorSystem) extends } else { sendNotification(payload = seqOnly(seq), creds, userId) } + deliverVoip(seq, creds.authId) } } + def deliverVoip( + seq: Int, + authId: Long + ): Unit = { + applePushExt.fetchVoipCreds(Seq(authId).toSet).map(userId → _).map { + case (userId, credsList) ⇒ { + for { + creds ← credsList + credsId = extractCredsId(creds) + clientFu ← applePushExt.voipClient(credsId) + payload = new ApnsPayloadBuilder().buildWithDefaultMaximumLength() + _ = clientFu foreach { implicit c ⇒ sendNotification(payload, creds, userId) } + } yield () + } + } + + } + private def seqOnly(seq: Int): String = new ApnsPayloadBuilder() .addCustomProperty("seq", seq) @@ -76,7 +98,7 @@ final class ApplePushProvider(userId: Int)(implicit system: ActorSystem) extends private def isLegacyCreds(creds: ApplePushCredentials) = creds.bundleId.isEmpty - private def withClient[A](creds: ApplePushCredentials)(f: ApnsClient[SimpleApnsPushNotification] ⇒ A): Unit = { + private def withClient[A](creds: ApplePushCredentials)(f: ApnsClient ⇒ A): Unit = { val credsKey = extractCredsId(creds) applePushExt.client(credsKey) match { case Some(futureClient) ⇒ futureClient foreach { f(_) } diff --git a/actor-server/actor-core/src/main/scala/im/actor/server/push/apple/PushFutureListener.scala b/actor-server/actor-core/src/main/scala/im/actor/server/push/apple/PushFutureListener.scala index 58e89e02cc..4bf9be5212 100644 --- a/actor-server/actor-core/src/main/scala/im/actor/server/push/apple/PushFutureListener.scala +++ b/actor-server/actor-core/src/main/scala/im/actor/server/push/apple/PushFutureListener.scala @@ -21,16 +21,22 @@ final class PushFutureListener(userId: Int, creds: ApplePushCredentials, credsId private val tokenString = BitVector(tokenBytes).toHex def operationComplete(future: Future[PushNotificationResponse[SimpleApnsPushNotification]]): Unit = { + + log.debug( + "APNS send event has completed user: {}, token: {}, cert id: {}, isVoip: {}", + userId, tokenString, credsId, creds.isVoip + ) + Try(future.get()) match { case Success(response) ⇒ log.debug( - "APNS send complete, user: {}, token: {}, cert id: {}", - userId, tokenString, credsId + "APNS send complete, user: {}, token: {}, cert id: {}, isVoip: {}", + userId, tokenString, credsId, creds.isVoip ) if (response.isAccepted) { log.debug( - "Successfully delivered APNS notification to user: {}, token: {}, cert id: {}", - userId, tokenString, credsId + "Successfully delivered APNS notification to user: {}, token: {}, cert id: {}, isVoip: {}", + userId, tokenString, credsId, creds.isVoip ) } else { log.warning( @@ -43,8 +49,8 @@ final class PushFutureListener(userId: Int, creds: ApplePushCredentials, credsId } } case Failure(e) ⇒ - log.error(e, "Failed to send APNS notification for user: {}, token: {}, cert id: {}", - userId, tokenString, credsId) + log.error(e, "Failed to send APNS notification for user: {}, token: {}, cert id: {}, isVoip: {}", + userId, tokenString, credsId, creds.isVoip) } } diff --git a/actor-server/actor-rpc-api/src/main/scala/im/actor/server/api/rpc/service/groups/GroupsServiceImpl.scala b/actor-server/actor-rpc-api/src/main/scala/im/actor/server/api/rpc/service/groups/GroupsServiceImpl.scala index 8a568a5356..77d2c470a7 100644 --- a/actor-server/actor-rpc-api/src/main/scala/im/actor/server/api/rpc/service/groups/GroupsServiceImpl.scala +++ b/actor-server/actor-rpc-api/src/main/scala/im/actor/server/api/rpc/service/groups/GroupsServiceImpl.scala @@ -648,4 +648,26 @@ final class GroupsServiceImpl(groupInviteConfig: GroupInviteConfig)(implicit act case GroupErrors.UserIsBanned ⇒ GroupRpcErrors.UserIsBanned } + /** + * Join group by groupid without a necessity of invite + * + * @param groupId Groups peer + */ + override protected def doHandleJoinGroupByGroupId(groupId: Int, clientData: ClientData): Future[HandlerResult[ResponseSeq]] = { + authorized(clientData) { implicit client ⇒ + val action = for { + apiGroup ← fromFuture(groupExt.getApiStruct(groupId, client.userId)) + _ ← fromBoolean(GroupRpcErrors.CantJoinGroup)(canJoin(apiGroup.permissions)) + joinResp ← fromFuture(groupExt.joinGroup( + groupId = groupId, + joiningUserId = client.userId, + joiningUserAuthId = client.authId, + invitingUserId = None + )) + SeqStateDate(seq, state, _) = joinResp._1 + } yield ResponseSeq(seq, state.toByteArray) + + action.value + } + } } diff --git a/actor-server/actor-rpc-api/src/main/scala/im/actor/server/api/rpc/service/push/PushServiceImpl.scala b/actor-server/actor-rpc-api/src/main/scala/im/actor/server/api/rpc/service/push/PushServiceImpl.scala index 6d31c2007b..47a1f78a68 100644 --- a/actor-server/actor-rpc-api/src/main/scala/im/actor/server/api/rpc/service/push/PushServiceImpl.scala +++ b/actor-server/actor-rpc-api/src/main/scala/im/actor/server/api/rpc/service/push/PushServiceImpl.scala @@ -11,6 +11,7 @@ import im.actor.api.rpc.push.PushService import im.actor.server.db.DbExtension import im.actor.server.model.push.{ ActorPushCredentials, ApplePushCredentials, FirebasePushCredentials, GCMPushCredentials } import im.actor.server.persist.push.{ ActorPushCredentialsRepo, ApplePushCredentialsRepo, FirebasePushCredentialsKV, GooglePushCredentialsRepo } +import im.actor.server.push.apple.ApplePushExtension import im.actor.server.sequence.SeqUpdatesExtension import scodec.bits.BitVector import slick.driver.PostgresDriver.api._ @@ -64,6 +65,7 @@ final class PushServiceImpl( token = ByteString.copyFrom(tokenBytes), isVoip = false ) + val action: DBIO[HandlerResult[ResponseVoid]] = for { _ ← ApplePushCredentialsRepo.deleteByToken(tokenBytes) _ ← ApplePushCredentialsRepo.createOrUpdate(creds) diff --git a/actor-server/actor-server-sdk/src/main/scala/im/actor/server/cli/BotsCliService.scala b/actor-server/actor-server-sdk/src/main/scala/im/actor/server/cli/BotsCliService.scala index 449b3484eb..0297f2d4cc 100644 --- a/actor-server/actor-server-sdk/src/main/scala/im/actor/server/cli/BotsCliService.scala +++ b/actor-server/actor-server-sdk/src/main/scala/im/actor/server/cli/BotsCliService.scala @@ -21,5 +21,10 @@ private final class BotsCliService extends Actor with ActorLogging { (for { (token, _) ← botExt.create(username, name, isAdmin) } yield CreateBotResponse(token)) pipeTo sender() + + case GetBotToken(botUserId) ⇒ + (for { + token ← botExt.findBotToken(botUserId) + } yield BotToken(token)) pipeTo sender() } } diff --git a/actor-server/conf/application.ini b/actor-server/conf/application.ini new file mode 100644 index 0000000000..629f380635 --- /dev/null +++ b/actor-server/conf/application.ini @@ -0,0 +1,4 @@ +-J-Xms256M +-J-Xmx1024M +-J-server + diff --git a/actor-server/conf/server.conf b/actor-server/conf/server.conf new file mode 100644 index 0000000000..9a25445c15 --- /dev/null +++ b/actor-server/conf/server.conf @@ -0,0 +1,310 @@ +# HTTP Server settings +# It serves static app (optionally) and provides integration API + http { + # interface: "0.0.0.0" + # port: 9090 + base-uri: "http://localhost:9090" + } + +# URIs of endpoints, accessible by client applications +# public-endpoints: [ +# "wss://front1-ws-mtproto-api-rev2.actor.im", +# "tls://front1-mtproto-api-rev2.actor.im", +# "tcp://front3-mtproto-api-rev3.actor.im:443" +# ] +# Endpoints for Mobile/Web API +# It is strictly recommended to use 443 port +# for all connections. There are a lot of problems +# on any other ports. +# +# Array of elements in format: +# { +# type: "tcp" or "websocket" +# host: Listening host +# post: Listening port +# keystore: [Optional] Keystore +# } +# endpoints: [ +# { +# type: tcp +# interface: "0.0.0.0" +# port: 9070 +# }, +# { +# type: websocket +# interface: "0.0.0.0" +# port: 9080 +# } +#] + +# Name of your application. +project-name: actor + +# Secret is used to work with various secrets like password, auth hashes, etc +# It have to be set once and never be changed in future +secret: gf6VLkJRq7P8f0TnQEko + +# Server modules +modules { + + # Configuration for messaging module + messaging { + # Configure url for group invites here + groups { + invite { + base-uri: "https://xloto.im" + } + } + } + + files { + adapter: "im.actor.server.file.local.LocalFileStorageAdapter" + } + + # Message enricher + # Comment this module if you don't want to use message + # enriching feature + # enricher { + # Uncomment to customize max image preview size + # max-preview-size = 2 M + # } + + security { + server-keys: [ + { + public: "/home/diego/data/keys/actor-key-0.pub" + private: "/home/diego/data/keys/actor-key-0.key" + } + { + public: "/home/diego/data/keys/actor-key-1.pub" + private: "/home/diego/data/keys/actor-key-1.key" + } + { + public: "/home/diego/data/keys/actor-key-2.pub" + private: "/home/diego/data/keys/actor-key-2.key" + } + { + public: "/home/diego/data/keys/actor-key-3.pub" + private: "/home/diego/data/keys/actor-key-3.key" + } + ] + } + api { + endpoint = "http://192.168.1.3:9090" + } + + raw { + rpc: "im.actor.server.api.rpc.service.raw.RawServiceImpl" + } +} + +# Services that are used by the server. +# Default distribution support services: +# * [REQUIRED] postgresql: PostgreSQL database +# * email: Email integration +# * aws: Amazon Web Services integration +# * google: Accessing Google services +# * apple: Accessing Apple services +# * telesign: Telesign Activation gateway +# * actor-activation: Actor Activation gateway + +services { + + # PostgreSQL storage for data + # The only required service to start server + # For more information see https://github.com/actorapp/actor-bootstrap/blob/master/docs/server/configure-database.md + + postgresql { + host: localhost + port: 5432 + db: actor + user: actor + password: actor + } + + #For local file storage + file-storage { + # provide your own path to directory with read and write permissions for user `actor` + location: "/home/diego/data/files" + thread-pool-size: 20 + } + + # AWS configuration + # It is strictly recommended to configure s3 storage for + # enabling file sharing in apps + #aws { + # S3 Storage, used for file sharing + # For more information see https://github.com/actorapp/actor-bootstrap/blob/master/docs/server/configure-s3.md + # s3 { + # S3 Api Key + # access-key: "AKIAJZJLA5CVEQNWI2BA" + # S3 Api Secret + # secret-key: "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" + # File bucket + #default-bucket: olmf-backup + # S3 Endpoint + # endpoint: + # S3 bucket region + # region: + # Enable S3 URLs with path-style access + # path-style-access: true / false + #} + #} + + # Service used for sending activation codes + activation { + # Define code providers. look im.actor.server.activation for full provider list + # providers { + # internal: im.actor.server.activation.internal.InternalCodeProvider + # sms: im.actor.server.activation.gate.ActorGateSmsProvider + # smtp: im.actor.server.activation.smtp.SMTPProvider + # call: im.actor.server.activation.telesign.TelesignProvider + # } + # Allow client to repeat code sending after this interval + # repeat-limit: 1m + # Time and attempt to expire sms/email activation code + # code-expiration: 1 day + # code-attempts: 3 + + # Email template for email code activation + email { + template: templates/activation-email-template.html + } + # Setting for internal activation(aka via actor bot) + # internal { + # sender-user-id: 10 + # online-time-window: 10m + # message-template: "Your Actor activation code: $$CODE$$" + # } + + providers { + #sms: im.actor.server.activation.gate.ActorGateSmsProvider + sms: im.actor.server.activation.fake.FakeSmsProvider + smtp: im.actor.server.activation.smtp.SMTPProvider + } + } + + # Actor SMS gate + # Write to @gatekeeper in Actor Cloud to get your token + actor-activation { + # uri: "https://gate.actor.im" + auth-token: 8b831164dd59acf5e2014a92ddba0298ee33d69 + } + + # Telesign SMS gate + # To get tokens ask at telesign web site: https://www.telesign.com + # telesign { + # customer-id: + # api-key: + # } + + # Email configuration + email { + + # Sender information for outgoing emails + # sender { + # Sender Email address + # address: + # Sender Name + # name: + # Mail theme prefix + # prefix: + # } + + # SMTP server configuration + # smtp { + + # SMTP server host + # host: + # SMTP server port + # port: + # SMTP server username + # username: + # SMTP server password + # password: + + # Is TLS required + # tls: true + # } + + sender { + address: "diego@diegosilva.com.br" + name: "Acesso" + prefix: "Acesso" + } + + smtp { + host: "email-smtp.us-east-1.amazonaws.com" + port: 465 + username: "AKIAJGYTVIXYJU7FTHZQ" + password: "AooHgOV/z62Bml0dVYtQ7CFvASj+BP0nMy1ToiHQ9vgi" + tls: true + } + } + + + # Accessing Google Services + # Used for OAuth2 in gmail mailboxes + # and sending push notifications in Android & Chrome + # + # How to get OAuth2: + # * Open https://console.developers.google.com/ + # * Go To Api&Auth, then to Credentials + # * Press "Client Id" and create id for Web Application + # * In created Client Id there are values "Client Id" and "Client Secret" + # for web OAuth configuration¬ + # * Same steps for Android & iOS applications + # + # How to get Push keys + # * Open https://console.developers.google.com/ + # * Go To Api&Auth, then to Credentials + # * Press "Create new key" for Android Application + # * Allow any IP + # * Get API key from created "Key for Android Application" + # * Project Id can be found on Overview page + google { + gcm { + keys = [{ + project-id: 43880936595 + key: "AIzaSyAliS4bfKy8GucSRX1pnCLJHM5HroHPpLk" + }] + } + } + + # Accessing Apple servers for push notifications + apple { + push { + certs = [{ + key: 868547 + bundleId: "br.com.diegosilva.xlotomessenger" + path: "/home/diego/Dropbox/actor/apple/development/aps_development.p12" + #path: "/home/diego/Dropbox/actor/apple/production/apns_producao.p12" + password: "xlotoapns123" + sandbox: true + voip: false + },{ + key: 868547 + path: "/home/diego/Dropbox/actor/apple/production/voip_services.p12" + password: "xlotoapns123" + sandbox: true + voip: true + }] + } + } + + actor { + push { + max-queue: 10000 + token: "jsksksk" + } + } +} + + +akka { + loggers = ["akka.event.slf4j.Slf4jLogger"] + event-handlers = ["akka.event.slf4j.Slf4jLogger"] + #loglevel = "WARNING" +} + +#debug-mode = true \ No newline at end of file diff --git a/actor-server/docker.sh b/actor-server/docker.sh index bd8e3c6edf..04ad8227fc 100755 --- a/actor-server/docker.sh +++ b/actor-server/docker.sh @@ -1,3 +1,3 @@ #! /bin/bash - +export BUILD_NUMBER=108 ./sbt docker:stage && docker build --no-cache=true -f Dockerfile -t actor/server . diff --git a/actor-server/project/Build.scala b/actor-server/project/Build.scala index 7d27bc16d5..2daec442fa 100644 --- a/actor-server/project/Build.scala +++ b/actor-server/project/Build.scala @@ -171,8 +171,8 @@ object Build extends sbt.Build with Versioning with Releasing with Packaging { base = file("actor-cli"), settings = defaultSettingsServer ++ Revolver.settings ++ Seq( libraryDependencies ++= Dependencies.cli, - mainClass in Revolver.reStart := Some("im.actor.server.cli.ActorCliApp"), - mainClass in Compile := Some("im.actor.server.cli.ActorCliApp") + mainClass in Revolver.reStart := Some("im.actor.server.cli.ActorCli"), + mainClass in Compile := Some("im.actor.server.cli.ActorCli") ) ) .dependsOn(actorCore, actorFrontend) diff --git a/actor-server/project/Dependencies.scala b/actor-server/project/Dependencies.scala index d237fc0ae0..e55862a5a0 100644 --- a/actor-server/project/Dependencies.scala +++ b/actor-server/project/Dependencies.scala @@ -5,7 +5,7 @@ import sbt._ object Dependencies { object V { val actorCommons = "0.0.20" - val actorBotkit = "1.0.113" + val actorBotkit = "1.0.108" val akka = "2.4.10" val akkaHttpJson = "1.10.0" val cats = "0.7.2" @@ -94,7 +94,7 @@ object Dependencies { val tyrex = "tyrex" % "tyrex" % "1.0.1" - val pushy = "com.relayrides" % "pushy" % "0.6.1" + val pushy = "com.relayrides" % "pushy" % "0.9.2" val logbackClassic = "ch.qos.logback" % "logback-classic" % "1.1.2" val scalaLogging = "com.typesafe.scala-logging" %% "scala-logging" % "3.1.0" @@ -107,8 +107,10 @@ object Dependencies { val apacheCommonsValidator = "commons-validator" % "commons-validator" % "1.4.1" val guava = "com.google.guava" % "guava" % "19.0" - val alpn = "org.eclipse.jetty.alpn" % "alpn-api" % "1.1.2.v20150522" % "runtime" - val tcnative = "io.netty" % "netty-tcnative" % "1.1.33.Fork15" classifier "linux-x86_64" + val alpn = "org.eclipse.jetty.alpn" % "alpn-api" % "1.1.3.v20160715" % "runtime" + //val tcnative = "io.netty" % "netty-tcnative" % "1.1.33.Fork25" classifier "linux-x86_64" + + val tcnative = "io.netty" % "netty-tcnative-boringssl-static" % "1.1.33.Fork25" val silencer = "com.github.ghik" % "silencer-lib" % "0.4" } diff --git a/actor-server/project/Packaging.scala b/actor-server/project/Packaging.scala index 0a517732bf..36d42a958d 100644 --- a/actor-server/project/Packaging.scala +++ b/actor-server/project/Packaging.scala @@ -22,7 +22,7 @@ private[actor] trait Packaging { daemonUser in Linux := "actor", daemonGroup in Linux := (daemonUser in Linux).value, - bashScriptExtraDefines += """addJava "-Dlogback.configurationFile=${app_home}/../conf/logback.xml"""", + //bashScriptExtraDefines += """addJava "-Dlogback.configurationFile=${app_home}/../conf/logback.xml"""", bashScriptExtraDefines += """addJava -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=${app_home}/../logs/dump-`date`.hprof""", linuxPackageMappings += { diff --git a/actor-server/project/Releasing.scala b/actor-server/project/Releasing.scala index af1c24d11d..26af6f9c77 100644 --- a/actor-server/project/Releasing.scala +++ b/actor-server/project/Releasing.scala @@ -32,7 +32,7 @@ trait Releasing { val releaseSettings = Seq( taskSetting, releaseCommitMessage := s"chore(server): setting version to ${(version in ThisBuild).value}", - GithubRelease.repo := "actorapp/actor-platform", + GithubRelease.repo := "dfsilva/actor-platform", GithubRelease.releaseName := "Actor Server", GithubRelease.draft := false, GithubRelease.tag := s"server/v${(version in ThisBuild).value}", diff --git a/actor-server/sbt b/actor-server/sbt index 3214e85315..e9241692ca 100755 --- a/actor-server/sbt +++ b/actor-server/sbt @@ -1,3 +1,4 @@ #!/bin/bash -SBT_OPTS="-Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256M" -java $SBT_OPTS -jar `dirname $0`/sbt-launch.jar "$@" \ No newline at end of file +export BUILD_NUMBER=108 +SBT_OPTS="-Xms512M -Xmx2G -Xss2M -XX:+CMSClassUnloadingEnabled" +java $SBT_OPTS -jar `dirname $0`/sbt-launch.jar "$@" diff --git a/actor-server/sbt-launch.jar b/actor-server/sbt-launch.jar index 0d9dd94c57..34b74b7ef7 100644 Binary files a/actor-server/sbt-launch.jar and b/actor-server/sbt-launch.jar differ diff --git a/actor-server/sbt_debug b/actor-server/sbt_debug new file mode 100755 index 0000000000..55e4e29fd0 --- /dev/null +++ b/actor-server/sbt_debug @@ -0,0 +1,3 @@ +#!/bin/bash +SBT_OPTS="-Xms512M -Xmx2048M -Xss1M -XX:+CMSClassUnloadingEnabled -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 -Dlogback.configurationFile=/home/diego/data/conf/logback.xml" +java $SBT_OPTS -jar `dirname $0`/sbt-launch.jar "$@" diff --git a/actor-server/version.sbt b/actor-server/version.sbt index d46b3d6f4b..189cd0c10e 100644 --- a/actor-server/version.sbt +++ b/actor-server/version.sbt @@ -1 +1 @@ -version in ThisBuild := "3.0.1-SNAPSHOT" \ No newline at end of file +version in ThisBuild := "3.0.30-SNAPSHOT"