| | 1 | | using Cysharp.Threading.Tasks; |
| | 2 | | using DCL; |
| | 3 | | using DCL.Emotes; |
| | 4 | | using DCL.Helpers; |
| | 5 | | using DCL.Providers; |
| | 6 | | using DCLServices.EmotesCatalog; |
| | 7 | | using DCLServices.Lambdas; |
| | 8 | | using DCLServices.WearablesCatalogService; |
| | 9 | | using System; |
| | 10 | | using System.Collections.Generic; |
| | 11 | | using System.Threading; |
| | 12 | | using UnityEngine; |
| | 13 | |
|
| | 14 | | public class LambdasEmotesCatalogService : IEmotesCatalogService |
| | 15 | | { |
| | 16 | | [Serializable] |
| | 17 | | internal class WearableRequest |
| | 18 | | { |
| | 19 | | public List<string> pointers; |
| | 20 | | } |
| | 21 | |
|
| | 22 | | [Serializable] |
| | 23 | | private class EmoteCollectionResponse |
| | 24 | | { |
| | 25 | | public EmoteEntityDto[] entities; |
| | 26 | | } |
| | 27 | |
|
| 63 | 28 | | internal readonly Dictionary<string, WearableItem> emotes = new (new Dictionary<string, WearableItem>(), StringIgnor |
| 63 | 29 | | internal readonly Dictionary<string, HashSet<Promise<WearableItem>>> promises = new (new Dictionary<string, HashSet< |
| | 30 | | StringIgnoreCaseEqualityComparer.Default); |
| 63 | 31 | | internal readonly Dictionary<string, int> emotesOnUse = new (new Dictionary<string, int>(), StringIgnoreCaseEquality |
| 63 | 32 | | internal readonly Dictionary<string, HashSet<Promise<IReadOnlyList<WearableItem>>>> ownedEmotesPromisesByUser = new |
| | 33 | | new Dictionary<string, HashSet<Promise<IReadOnlyList<WearableItem>>>>(), StringIgnoreCaseEqualityComparer.Defaul |
| | 34 | |
|
| | 35 | | private readonly IEmotesRequestSource emoteSource; |
| | 36 | | private readonly IAddressableResourceProvider addressableResourceProvider; |
| | 37 | | private readonly ICatalyst catalyst; |
| | 38 | | private readonly ILambdasService lambdasService; |
| | 39 | | private readonly DataStore dataStore; |
| | 40 | | private readonly KernelConfig kernelConfig; |
| 63 | 41 | | private readonly Dictionary<string, string> ownedUrns = new (new Dictionary<string, string>(), StringIgnoreCaseEqual |
| | 42 | |
|
| | 43 | | private EmbeddedEmotesSO embeddedEmotesSo; |
| | 44 | | private CancellationTokenSource addressableCts; |
| 63 | 45 | | private int retryCount = 3; |
| | 46 | |
|
| 0 | 47 | | private string assetBundlesUrl => dataStore.featureFlags.flags.Get().IsFeatureEnabled("ab-new-cdn") ? "https://ab-cd |
| | 48 | |
|
| 63 | 49 | | public LambdasEmotesCatalogService(IEmotesRequestSource emoteSource, |
| | 50 | | IAddressableResourceProvider addressableResourceProvider, |
| | 51 | | ICatalyst catalyst, |
| | 52 | | ILambdasService lambdasService, |
| | 53 | | DataStore dataStore, |
| | 54 | | KernelConfig kernelConfig) |
| | 55 | | { |
| 63 | 56 | | this.emoteSource = emoteSource; |
| 63 | 57 | | this.addressableResourceProvider = addressableResourceProvider; |
| 63 | 58 | | this.catalyst = catalyst; |
| 63 | 59 | | this.lambdasService = lambdasService; |
| 63 | 60 | | this.dataStore = dataStore; |
| 63 | 61 | | this.kernelConfig = kernelConfig; |
| 63 | 62 | | } |
| | 63 | |
|
| | 64 | | private async UniTaskVoid InitializeAsyncEmbeddedEmotes() |
| | 65 | | { |
| | 66 | | try |
| | 67 | | { |
| 34 | 68 | | addressableCts = new CancellationTokenSource(); |
| 56 | 69 | | embeddedEmotesSo = await addressableResourceProvider.GetAddressable<EmbeddedEmotesSO>("EmbeddedEmotes.asset" |
| 34 | 70 | | } |
| 0 | 71 | | catch (OperationCanceledException) { return; } |
| 0 | 72 | | catch (Exception e) |
| | 73 | | { |
| 0 | 74 | | retryCount--; |
| | 75 | |
|
| 0 | 76 | | if (retryCount < 0) |
| | 77 | | { |
| 0 | 78 | | embeddedEmotesSo = ScriptableObject.CreateInstance<EmbeddedEmotesSO>(); |
| 0 | 79 | | embeddedEmotesSo.Clear(); |
| 0 | 80 | | throw new Exception("Embedded Emotes retry limit reached, they wont work correctly. Please check the Ess |
| | 81 | | } |
| | 82 | |
|
| 0 | 83 | | Debug.LogWarning("Retrying embedded emotes addressables async request..."); |
| 0 | 84 | | DisposeAddressableCancellationToken(); |
| 0 | 85 | | InitializeAsyncEmbeddedEmotes().Forget(); |
| 0 | 86 | | } |
| | 87 | |
|
| 34 | 88 | | EmbedEmotes(); |
| 34 | 89 | | } |
| | 90 | |
|
| | 91 | | public void Initialize() |
| | 92 | | { |
| 34 | 93 | | InitializeAsyncEmbeddedEmotes().Forget(); |
| 34 | 94 | | emoteSource.OnEmotesReceived += OnEmotesReceived; |
| 34 | 95 | | emoteSource.OnEmoteRejected += OnEmoteRejected; |
| 34 | 96 | | emoteSource.OnOwnedEmotesReceived += OnOwnedEmotesReceived; |
| 34 | 97 | | } |
| | 98 | |
|
| | 99 | | public void Dispose() |
| | 100 | | { |
| 0 | 101 | | emoteSource.OnEmotesReceived -= OnEmotesReceived; |
| 0 | 102 | | emoteSource.OnEmoteRejected -= OnEmoteRejected; |
| 0 | 103 | | emoteSource.OnOwnedEmotesReceived -= OnOwnedEmotesReceived; |
| 0 | 104 | | DisposeAddressableCancellationToken(); |
| 0 | 105 | | } |
| | 106 | |
|
| | 107 | | public bool TryGetLoadedEmote(string id, out WearableItem emote) |
| | 108 | | { |
| 0 | 109 | | return emotes.TryGetValue(id, out emote); |
| | 110 | | } |
| | 111 | |
|
| | 112 | | public async UniTask<WearableItem> RequestEmoteFromBuilderAsync(string emoteId, CancellationToken cancellationToken) |
| | 113 | | { |
| 0 | 114 | | string domain = GetBuilderDomainUrl(); |
| 0 | 115 | | string url = $"{domain}/items/{emoteId}/"; |
| 0 | 116 | | string templateUrl = $"{domain}/items/{emoteId}/"; |
| | 117 | |
|
| | 118 | | try |
| | 119 | | { |
| 0 | 120 | | (WearableItemResponseFromBuilder response, bool success) = await lambdasService.GetFromSpecificUrl<WearableI |
| | 121 | | templateUrl, url, |
| | 122 | | isSigned: true, |
| | 123 | | cancellationToken: cancellationToken); |
| | 124 | |
|
| 0 | 125 | | if (!success) |
| 0 | 126 | | throw new Exception($"The request of wearables from builder '{emoteId}' failed!"); |
| | 127 | |
|
| 0 | 128 | | WearableItem wearable = response.data.ToWearableItem( |
| | 129 | | $"{domain}/storage/contents/", |
| | 130 | | assetBundlesUrl); |
| | 131 | |
|
| 0 | 132 | | if (!wearable.IsEmote()) return null; |
| | 133 | |
|
| 0 | 134 | | OnEmoteReceived(wearable); |
| | 135 | |
|
| 0 | 136 | | return wearable; |
| | 137 | | } |
| 0 | 138 | | catch (UnityWebRequestException ex) |
| | 139 | | { |
| 0 | 140 | | if (ex.ResponseCode == 404) |
| 0 | 141 | | Debug.LogWarning($"Emote with id: {emoteId} does not exist"); |
| | 142 | | else |
| 0 | 143 | | Debug.LogException(ex); |
| | 144 | |
|
| 0 | 145 | | return null; |
| | 146 | | } |
| | 147 | | catch (Exception e) |
| | 148 | | { |
| 0 | 149 | | Debug.LogException(e); |
| 0 | 150 | | return null; |
| | 151 | | } |
| 0 | 152 | | } |
| | 153 | |
|
| | 154 | | public Promise<IReadOnlyList<WearableItem>> RequestOwnedEmotes(string userId) |
| | 155 | | { |
| 0 | 156 | | var promise = new Promise<IReadOnlyList<WearableItem>>(); |
| | 157 | |
|
| 0 | 158 | | if (!ownedEmotesPromisesByUser.ContainsKey(userId) || ownedEmotesPromisesByUser[userId] == null) |
| 0 | 159 | | ownedEmotesPromisesByUser[userId] = new HashSet<Promise<IReadOnlyList<WearableItem>>>(); |
| | 160 | |
|
| 0 | 161 | | ownedEmotesPromisesByUser[userId].Add(promise); |
| | 162 | |
|
| 0 | 163 | | emoteSource.RequestOwnedEmotes(userId); |
| | 164 | |
|
| 0 | 165 | | return promise; |
| | 166 | | } |
| | 167 | |
|
| | 168 | | public async UniTask<IReadOnlyList<WearableItem>> RequestOwnedEmotesAsync(string userId, CancellationToken ct = defa |
| | 169 | | { |
| 0 | 170 | | var promise = RequestOwnedEmotes(userId); |
| | 171 | |
|
| | 172 | | try |
| | 173 | | { |
| 0 | 174 | | ct.ThrowIfCancellationRequested(); |
| 0 | 175 | | await promise.WithCancellation(ct); |
| 0 | 176 | | } |
| 0 | 177 | | catch (OperationCanceledException e) { return null; } |
| | 178 | |
|
| 0 | 179 | | return promise.value; |
| 0 | 180 | | } |
| | 181 | |
|
| | 182 | | public async UniTask<IReadOnlyList<WearableItem>> RequestEmoteCollectionAsync(IEnumerable<string> collectionIds, |
| | 183 | | CancellationToken cancellationToken, List<WearableItem> emoteBuffer = null) |
| | 184 | | { |
| 0 | 185 | | List<WearableItem> emotes = emoteBuffer ?? new List<WearableItem>(); |
| 0 | 186 | | var templateURL = $"{catalyst.contentUrl}entities/active/collections/:collectionId"; |
| | 187 | |
|
| 0 | 188 | | foreach (string collectionId in collectionIds) |
| | 189 | | { |
| 0 | 190 | | string url = templateURL.Replace(":collectionId", collectionId); |
| | 191 | |
|
| 0 | 192 | | (EmoteCollectionResponse response, bool success) = await lambdasService.GetFromSpecificUrl<EmoteCollectionRe |
| | 193 | | templateURL, url, |
| | 194 | | cancellationToken: cancellationToken); |
| | 195 | |
|
| 0 | 196 | | if (!success) |
| 0 | 197 | | throw new Exception($"The request for collection of emotes '{collectionId}' failed!"); |
| | 198 | |
|
| 0 | 199 | | foreach (EmoteEntityDto dto in response.entities) |
| | 200 | | { |
| 0 | 201 | | var contentUrl = $"{catalyst.contentUrl}contents/"; |
| 0 | 202 | | var wearable = dto.ToWearableItem(contentUrl); |
| 0 | 203 | | wearable.baseUrl = contentUrl; |
| 0 | 204 | | wearable.baseUrlBundles = assetBundlesUrl; |
| 0 | 205 | | emotes.Add(wearable); |
| | 206 | | } |
| 0 | 207 | | } |
| | 208 | |
|
| 0 | 209 | | OnEmotesReceived(emotes); |
| | 210 | |
|
| 0 | 211 | | return emotes; |
| 0 | 212 | | } |
| | 213 | |
|
| | 214 | | public Promise<WearableItem> RequestEmote(string id) |
| | 215 | | { |
| 42 | 216 | | var promise = new Promise<WearableItem>(); |
| | 217 | |
|
| 42 | 218 | | if (!emotesOnUse.ContainsKey(id)) |
| 21 | 219 | | emotesOnUse[id] = 0; |
| | 220 | |
|
| 42 | 221 | | emotesOnUse[id]++; |
| | 222 | |
|
| 42 | 223 | | if (emotes.TryGetValue(id, out var emote)) |
| | 224 | | { |
| 3 | 225 | | promise.Resolve(emote); |
| 3 | 226 | | return promise; |
| | 227 | | } |
| | 228 | |
|
| 39 | 229 | | if (!promises.ContainsKey(id) || promises[id] == null) |
| 21 | 230 | | promises[id] = new HashSet<Promise<WearableItem>>(); |
| | 231 | |
|
| 39 | 232 | | promises[id].Add(promise); |
| | 233 | |
|
| 39 | 234 | | emoteSource.RequestEmote(id); |
| | 235 | |
|
| 39 | 236 | | return promise; |
| | 237 | | } |
| | 238 | |
|
| | 239 | | public List<Promise<WearableItem>> RequestEmotes(IList<string> ids) |
| | 240 | | { |
| 6 | 241 | | List<Promise<WearableItem>> requestedPromises = new List<Promise<WearableItem>>(ids.Count); |
| | 242 | |
|
| 38 | 243 | | for (int i = 0; i < ids.Count; i++) |
| | 244 | | { |
| 13 | 245 | | string id = ids[i]; |
| 13 | 246 | | requestedPromises.Add(RequestEmote(id)); |
| | 247 | | } |
| | 248 | |
|
| 6 | 249 | | return requestedPromises; |
| | 250 | | } |
| | 251 | |
|
| | 252 | | public async UniTask<WearableItem> RequestEmoteAsync(string id, CancellationToken ct = default) |
| | 253 | | { |
| | 254 | | const int TIMEOUT = 45; |
| 19 | 255 | | CancellationTokenSource timeoutCTS = new CancellationTokenSource(); |
| 19 | 256 | | var timeout = timeoutCTS.CancelAfterSlim(TimeSpan.FromSeconds(TIMEOUT)); |
| 19 | 257 | | ct.ThrowIfCancellationRequested(); |
| 19 | 258 | | Promise<WearableItem> promise = RequestEmote(id); |
| | 259 | |
|
| | 260 | | try |
| | 261 | | { |
| 19 | 262 | | var linkedCt = CancellationTokenSource.CreateLinkedTokenSource(ct, timeoutCTS.Token); |
| 51 | 263 | | await promise.WithCancellation(linkedCt.Token); |
| 3 | 264 | | } |
| 0 | 265 | | catch (UnityWebRequestException ex) |
| | 266 | | { |
| 0 | 267 | | Debug.LogWarning($"Emote with id:{id} does not exist or connection failed"); |
| 0 | 268 | | return null; |
| | 269 | | } |
| 0 | 270 | | catch (PromiseException ex) |
| | 271 | | { |
| 0 | 272 | | Debug.LogWarning($"Emote with id:{id} was rejected"); |
| 0 | 273 | | return null; |
| | 274 | | } |
| 16 | 275 | | catch (OperationCanceledException ex) |
| | 276 | | { |
| 16 | 277 | | if (promises.ContainsKey(id)) |
| | 278 | | { |
| 16 | 279 | | promises[id].Remove(promise); |
| | 280 | |
|
| 16 | 281 | | if (promises[id].Count == 0) |
| 6 | 282 | | promises.Remove(id); |
| | 283 | | } |
| | 284 | |
|
| 16 | 285 | | return null; |
| | 286 | | } |
| | 287 | | catch (Exception ex) |
| | 288 | | { |
| 0 | 289 | | Debug.LogException(ex); |
| 0 | 290 | | return null; |
| | 291 | | } |
| | 292 | | finally |
| | 293 | | { |
| 19 | 294 | | timeout?.Dispose(); |
| 19 | 295 | | timeoutCTS?.Dispose(); |
| | 296 | | } |
| | 297 | |
|
| 3 | 298 | | return promise.value; |
| 19 | 299 | | } |
| | 300 | |
|
| | 301 | | public async UniTask<IReadOnlyList<WearableItem>> RequestEmotesAsync(IList<string> ids, CancellationToken ct = defau |
| | 302 | | { |
| 6 | 303 | | ct.ThrowIfCancellationRequested(); |
| | 304 | |
|
| | 305 | | try |
| | 306 | | { |
| 18 | 307 | | var tasks = ids.Select(x => RequestEmoteAsync(x, ct)); |
| 16 | 308 | | WearableItem[] result = await UniTask.WhenAll(tasks).AttachExternalCancellation(ct); |
| 1 | 309 | | return result; |
| | 310 | | } |
| 10 | 311 | | catch (OperationCanceledException) { return null; } |
| 6 | 312 | | } |
| | 313 | |
|
| | 314 | | public void ForgetEmote(string id) |
| | 315 | | { |
| 3 | 316 | | if (emotesOnUse.ContainsKey(id)) |
| | 317 | | { |
| 2 | 318 | | emotesOnUse[id]--; |
| | 319 | |
|
| 2 | 320 | | if (emotesOnUse[id] > 0) //We are still using this emote |
| 1 | 321 | | return; |
| | 322 | |
|
| 1 | 323 | | emotesOnUse.Remove(id); |
| | 324 | | } |
| | 325 | |
|
| 2 | 326 | | if (!emotes.TryGetValue(id, out WearableItem emote)) |
| 1 | 327 | | return; |
| | 328 | |
|
| 1 | 329 | | emotes.Remove(id); |
| 1 | 330 | | } |
| | 331 | |
|
| | 332 | | public void ForgetEmotes(IList<string> ids) |
| | 333 | | { |
| 0 | 334 | | for (int i = 0; i < ids.Count; i++) |
| | 335 | | { |
| 0 | 336 | | string id = ids[i]; |
| 0 | 337 | | ForgetEmote(id); |
| | 338 | | } |
| 0 | 339 | | } |
| | 340 | |
|
| | 341 | | public bool TryGetOwnedUrn(string shortenedUrn, out string extendedUrn) => |
| 0 | 342 | | ownedUrns.TryGetValue(shortenedUrn, out extendedUrn); |
| | 343 | |
|
| | 344 | | public async UniTask<EmbeddedEmotesSO> GetEmbeddedEmotes() |
| | 345 | | { |
| 11 | 346 | | if (embeddedEmotesSo == null) |
| 198 | 347 | | await UniTask.WaitUntil(() => embeddedEmotesSo != null); |
| | 348 | |
|
| 11 | 349 | | return embeddedEmotesSo; |
| 11 | 350 | | } |
| | 351 | |
|
| | 352 | | public async UniTask<IReadOnlyList<WearableItem>> RequestEmoteCollectionInBuilderAsync(IEnumerable<string> collectio |
| | 353 | | CancellationToken cancellationToken, List<WearableItem> emoteBuffer = null) |
| | 354 | | { |
| 0 | 355 | | string domain = GetBuilderDomainUrl(); |
| 0 | 356 | | var emotes = emoteBuffer ?? new List<WearableItem>(); |
| | 357 | |
|
| 0 | 358 | | var queryParams = new[] |
| | 359 | | { |
| | 360 | | ("page", "1"), |
| | 361 | | ("limit", "5000"), |
| | 362 | | }; |
| | 363 | |
|
| 0 | 364 | | foreach (string collectionId in collectionIds) |
| | 365 | | { |
| 0 | 366 | | var url = $"{domain}/collections/{collectionId}"; |
| 0 | 367 | | var templateUrl = $"{domain}/collections/:collectionId/items/"; |
| | 368 | |
|
| 0 | 369 | | (WearableCollectionResponseFromBuilder response, bool success) = await lambdasService.GetFromSpecificUrl<Wea |
| | 370 | | templateUrl, url, |
| | 371 | | cancellationToken: cancellationToken, |
| | 372 | | isSigned: true, |
| | 373 | | urlEncodedParams: queryParams); |
| | 374 | |
|
| 0 | 375 | | if (!success) |
| 0 | 376 | | throw new Exception($"The request for collection of emotes '{collectionId}' failed!"); |
| | 377 | |
|
| 0 | 378 | | if (response.data?.results == null) continue; |
| | 379 | |
|
| 0 | 380 | | foreach (BuilderWearable bw in response.data.results) |
| | 381 | | { |
| 0 | 382 | | var wearable = bw.ToWearableItem($"{domain}/storage/contents/", |
| | 383 | | assetBundlesUrl); |
| 0 | 384 | | if (!wearable.IsEmote()) continue; |
| 0 | 385 | | emotes.Add(wearable); |
| | 386 | | } |
| 0 | 387 | | } |
| | 388 | |
|
| 0 | 389 | | OnEmotesReceived(emotes); |
| | 390 | |
|
| 0 | 391 | | return emotes; |
| 0 | 392 | | } |
| | 393 | |
|
| | 394 | | private void DisposeAddressableCancellationToken() |
| | 395 | | { |
| 0 | 396 | | if (addressableCts == null) return; |
| 0 | 397 | | addressableCts.Cancel(); |
| 0 | 398 | | addressableCts.Dispose(); |
| 0 | 399 | | addressableCts = null; |
| 0 | 400 | | } |
| | 401 | |
|
| | 402 | | private void OnEmotesReceived(IEnumerable<WearableItem> receivedEmotes) |
| | 403 | | { |
| 24 | 404 | | foreach (var t in receivedEmotes) |
| 6 | 405 | | OnEmoteReceived(t); |
| 6 | 406 | | } |
| | 407 | |
|
| | 408 | | private void OnEmoteReceived(WearableItem emote) |
| | 409 | | { |
| 6 | 410 | | if (!emotesOnUse.ContainsKey(emote.id) || emotesOnUse[emote.id] <= 0) |
| 1 | 411 | | return; |
| | 412 | |
|
| 5 | 413 | | emotes[emote.id] = emote; |
| | 414 | |
|
| 5 | 415 | | if (promises.TryGetValue(emote.id, out var emotePromises)) |
| | 416 | | { |
| 22 | 417 | | foreach (Promise<WearableItem> promise in emotePromises) |
| 6 | 418 | | promise.Resolve(emote); |
| | 419 | |
|
| 5 | 420 | | promises.Remove(emote.id); |
| | 421 | | } |
| 5 | 422 | | } |
| | 423 | |
|
| | 424 | | private void OnEmoteRejected(string emoteId, string errorMessage) |
| | 425 | | { |
| 0 | 426 | | if (!promises.TryGetValue(emoteId, out var setOfPromises)) return; |
| | 427 | |
|
| 0 | 428 | | foreach (var promise in setOfPromises) |
| 0 | 429 | | promise.Reject(errorMessage); |
| | 430 | |
|
| 0 | 431 | | promises.Remove(emoteId); |
| 0 | 432 | | emotesOnUse.Remove(emoteId); |
| 0 | 433 | | emotes.Remove(emoteId); |
| 0 | 434 | | } |
| | 435 | |
|
| | 436 | | private void OnOwnedEmotesReceived(IReadOnlyList<WearableItem> receivedEmotes, string userId, |
| | 437 | | IReadOnlyDictionary<string, string> extendedUrns) |
| | 438 | | { |
| 0 | 439 | | foreach ((string shortenedUrn, string extendedUrn) in extendedUrns) |
| 0 | 440 | | ownedUrns[shortenedUrn] = extendedUrn; |
| | 441 | |
|
| 0 | 442 | | if (!ownedEmotesPromisesByUser.TryGetValue(userId, out HashSet<Promise<IReadOnlyList<WearableItem>>> ownedEmotes |
| 0 | 443 | | ownedEmotesPromises = new HashSet<Promise<IReadOnlyList<WearableItem>>>(); |
| | 444 | |
|
| | 445 | | //Update emotes on use |
| 0 | 446 | | foreach (var emote in receivedEmotes) |
| | 447 | | { |
| 0 | 448 | | emotesOnUse.TryAdd(emote.id, 0); |
| 0 | 449 | | emotesOnUse[emote.id] += ownedEmotesPromises.Count; |
| | 450 | | } |
| | 451 | |
|
| 0 | 452 | | OnEmotesReceived(receivedEmotes); |
| | 453 | |
|
| | 454 | | //Resolve ownedEmotesPromise |
| 0 | 455 | | ownedEmotesPromisesByUser.Remove(userId); |
| | 456 | |
|
| 0 | 457 | | foreach (Promise<IReadOnlyList<WearableItem>> promise in ownedEmotesPromises) |
| 0 | 458 | | promise.Resolve(receivedEmotes); |
| 0 | 459 | | } |
| | 460 | |
|
| | 461 | | private void EmbedEmotes() |
| | 462 | | { |
| 822 | 463 | | foreach (EmbeddedEmote embeddedEmote in embeddedEmotesSo.GetAllEmotes()) |
| | 464 | | { |
| 377 | 465 | | emotes[embeddedEmote.id] = embeddedEmote; |
| 377 | 466 | | emotesOnUse[embeddedEmote.id] = 5000; |
| | 467 | | } |
| 34 | 468 | | } |
| | 469 | |
|
| | 470 | | private string GetBuilderDomainUrl() |
| | 471 | | { |
| 0 | 472 | | string domain = kernelConfig.Get().builderUrl; |
| | 473 | |
|
| 0 | 474 | | if (string.IsNullOrEmpty(domain)) |
| 0 | 475 | | domain = "https://builder-api.decentraland.org/v1"; |
| 0 | 476 | | return domain; |
| | 477 | | } |
| | 478 | | } |