@quenty/userserviceutils 3.9.1-canary.402.5852ffd.0 → 3.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -3,9 +3,12 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
# [3.10.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/userserviceutils@3.9.0...@quenty/userserviceutils@3.10.0) (2023-08-23)
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* Add UserInfoService:ObserveDisplayName(userId) ([950c121](https://github.com/Quenty/NevermoreEngine/commit/950c121c35d734d7a66415ada647b146e06c4bf7))
|
|
9
12
|
|
|
10
13
|
|
|
11
14
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/userserviceutils",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.10.0",
|
|
4
4
|
"description": "Utilities involving UserService in Roblox",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -25,15 +25,16 @@
|
|
|
25
25
|
"Quenty"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@quenty/baseobject": "6.
|
|
29
|
-
"@quenty/loader": "6.
|
|
30
|
-
"@quenty/maid": "2.
|
|
31
|
-
"@quenty/math": "2.
|
|
32
|
-
"@quenty/promise": "6.
|
|
33
|
-
"@quenty/
|
|
28
|
+
"@quenty/baseobject": "^6.3.0",
|
|
29
|
+
"@quenty/loader": "^6.3.0",
|
|
30
|
+
"@quenty/maid": "^2.6.0",
|
|
31
|
+
"@quenty/math": "^2.5.0",
|
|
32
|
+
"@quenty/promise": "^6.8.0",
|
|
33
|
+
"@quenty/rx": "^7.15.0",
|
|
34
|
+
"@quenty/servicebag": "^6.9.0"
|
|
34
35
|
},
|
|
35
36
|
"publishConfig": {
|
|
36
37
|
"access": "public"
|
|
37
38
|
},
|
|
38
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "3b7e47e2180964b6b0b156d07814810e063ef7ed"
|
|
39
40
|
}
|
|
@@ -46,6 +46,18 @@ function UserInfoServiceClient:PromiseDisplayName(userId)
|
|
|
46
46
|
return self._aggregator:PromiseDisplayName(userId)
|
|
47
47
|
end
|
|
48
48
|
|
|
49
|
+
--[=[
|
|
50
|
+
Observes the user display name for the userId
|
|
51
|
+
|
|
52
|
+
@param userId number
|
|
53
|
+
@return Observable<string>
|
|
54
|
+
]=]
|
|
55
|
+
function UserInfoServiceClient:ObserveDisplayName(userId)
|
|
56
|
+
assert(type(userId) == "number", "Bad userId")
|
|
57
|
+
|
|
58
|
+
return self._aggregator:ObserveDisplayName(userId)
|
|
59
|
+
end
|
|
60
|
+
|
|
49
61
|
function UserInfoServiceClient:Destroy()
|
|
50
62
|
self._maid:DoCleaning()
|
|
51
63
|
end
|
|
@@ -46,6 +46,19 @@ function UserInfoService:PromiseDisplayName(userId)
|
|
|
46
46
|
return self._aggregator:PromiseDisplayName(userId)
|
|
47
47
|
end
|
|
48
48
|
|
|
49
|
+
--[=[
|
|
50
|
+
Observes the user display name for the userId
|
|
51
|
+
|
|
52
|
+
@param userId number
|
|
53
|
+
@return Observable<string>
|
|
54
|
+
]=]
|
|
55
|
+
function UserInfoService:ObserveDisplayName(userId)
|
|
56
|
+
assert(type(userId) == "number", "Bad userId")
|
|
57
|
+
|
|
58
|
+
return self._aggregator:ObserveDisplayName(userId)
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
|
|
49
62
|
function UserInfoService:Destroy()
|
|
50
63
|
self._maid:DoCleaning()
|
|
51
64
|
end
|
|
@@ -9,6 +9,7 @@ local require = require(script.Parent.loader).load(script)
|
|
|
9
9
|
local BaseObject = require("BaseObject")
|
|
10
10
|
local Promise = require("Promise")
|
|
11
11
|
local UserServiceUtils = require("UserServiceUtils")
|
|
12
|
+
local Rx = require("Rx")
|
|
12
13
|
|
|
13
14
|
local UserInfoAggregator = setmetatable({}, BaseObject)
|
|
14
15
|
UserInfoAggregator.ClassName = "UserInfoAggregator"
|
|
@@ -63,6 +64,18 @@ function UserInfoAggregator:PromiseDisplayName(userId)
|
|
|
63
64
|
end)
|
|
64
65
|
end
|
|
65
66
|
|
|
67
|
+
--[=[
|
|
68
|
+
Observes the user display name for the userId
|
|
69
|
+
|
|
70
|
+
@param userId number
|
|
71
|
+
@return Observable<string>
|
|
72
|
+
]=]
|
|
73
|
+
function UserInfoAggregator:ObserveDisplayName(userId)
|
|
74
|
+
assert(type(userId) == "number", "Bad userId")
|
|
75
|
+
|
|
76
|
+
return Rx.fromPromise(self:PromiseUserInfo(userId))
|
|
77
|
+
end
|
|
78
|
+
|
|
66
79
|
function UserInfoAggregator:_sendAggregatedPromises()
|
|
67
80
|
local promiseMap = self._unsentPromises
|
|
68
81
|
self._unsentPromises = {}
|