@quenty/chatproviderservice 9.17.1-canary.519.cd4d0d8.0 → 9.18.1-canary.520.0c6df93.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,7 +3,24 @@
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
- ## [9.17.1-canary.519.cd4d0d8.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/chatproviderservice@9.17.0...@quenty/chatproviderservice@9.17.1-canary.519.cd4d0d8.0) (2024-11-12)
6
+ ## [9.18.1-canary.520.0c6df93.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/chatproviderservice@9.18.0...@quenty/chatproviderservice@9.18.1-canary.520.0c6df93.0) (2024-11-14)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * Create properties from metadata instead of caching ([f23602e](https://github.com/Quenty/NevermoreEngine/commit/f23602e73a41ce4135ca18bc4ab7f01e935b2cab))
12
+ * pcall metadata in case it isn't a hex color ([0c6df93](https://github.com/Quenty/NevermoreEngine/commit/0c6df93f4e611dcdcf8c1fde454ee4bf7fa43ef0))
13
+
14
+
15
+ ### Features
16
+
17
+ * Add way to send system messages ([4db9577](https://github.com/Quenty/NevermoreEngine/commit/4db95775860f06b6e4cd9793c6a0e6457a27a0e1))
18
+
19
+
20
+
21
+
22
+
23
+ # [9.18.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/chatproviderservice@9.17.0...@quenty/chatproviderservice@9.18.0) (2024-11-13)
7
24
 
8
25
  **Note:** Version bump only for package @quenty/chatproviderservice
9
26
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/chatproviderservice",
3
- "version": "9.17.1-canary.519.cd4d0d8.0",
3
+ "version": "9.18.1-canary.520.0c6df93.0",
4
4
  "description": "Provide wrapper around chat system to allow tags to be set",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -25,34 +25,35 @@
25
25
  "Quenty"
26
26
  ],
27
27
  "dependencies": {
28
- "@quenty/attributeutils": "14.12.0",
28
+ "@quenty/attributeutils": "14.13.0",
29
29
  "@quenty/baseobject": "10.7.1",
30
- "@quenty/binder": "14.14.0",
31
- "@quenty/brio": "14.12.0",
32
- "@quenty/clienttranslator": "14.13.0",
33
- "@quenty/cmdrservice": "13.15.1-canary.519.cd4d0d8.0",
34
- "@quenty/color3utils": "11.12.0",
35
- "@quenty/datastore": "13.15.0",
36
- "@quenty/instanceutils": "13.12.0",
30
+ "@quenty/binder": "14.15.0",
31
+ "@quenty/brio": "14.13.0",
32
+ "@quenty/clienttranslator": "14.14.0",
33
+ "@quenty/cmdrservice": "13.16.0",
34
+ "@quenty/color3utils": "11.13.0",
35
+ "@quenty/datastore": "13.16.0",
36
+ "@quenty/instanceutils": "13.13.0",
37
37
  "@quenty/loader": "10.7.1",
38
- "@quenty/localizedtextutils": "12.12.0",
38
+ "@quenty/localizedtextutils": "12.13.0",
39
39
  "@quenty/maid": "3.4.0",
40
- "@quenty/permissionprovider": "14.14.0",
41
- "@quenty/playerbinder": "14.14.0",
42
- "@quenty/playerutils": "8.12.0",
40
+ "@quenty/permissionprovider": "14.15.0",
41
+ "@quenty/playerbinder": "14.15.0",
42
+ "@quenty/playerutils": "8.13.0",
43
43
  "@quenty/preferredparentutils": "4.3.0",
44
44
  "@quenty/promise": "10.8.0",
45
+ "@quenty/remoting": "12.14.0",
45
46
  "@quenty/richtext": "1.3.0",
46
- "@quenty/rx": "13.12.0",
47
- "@quenty/rxbinderutils": "14.14.0",
47
+ "@quenty/rx": "13.13.0",
48
+ "@quenty/rxbinderutils": "14.15.0",
48
49
  "@quenty/servicebag": "11.10.0",
49
50
  "@quenty/signal": "7.9.0",
50
51
  "@quenty/string": "3.3.0",
51
- "@quenty/table": "3.6.0",
52
- "@quenty/valueobject": "13.12.0"
52
+ "@quenty/table": "3.7.0",
53
+ "@quenty/valueobject": "13.13.0"
53
54
  },
54
55
  "publishConfig": {
55
56
  "access": "public"
56
57
  },
57
- "gitHead": "cd4d0d82a87e31683ac8f4948962e2735ce28972"
58
+ "gitHead": "0c6df93f4e611dcdcf8c1fde454ee4bf7fa43ef0"
58
59
  }
@@ -36,6 +36,20 @@ function ChatProviderServiceClient:Start()
36
36
  TextChatService.OnIncomingMessage = function(textChatMessage)
37
37
  self.MessageIncoming:Fire(textChatMessage)
38
38
 
39
+ local metadata = textChatMessage.Metadata
40
+ if metadata then
41
+ local isValidColor = pcall(function()
42
+ return Color3.fromHex(metadata)
43
+ end)
44
+
45
+ if isValidColor then
46
+ local overrideProperties = Instance.new("TextChatMessageProperties")
47
+ overrideProperties.Text = `<font color="#{metadata}">{textChatMessage.Text}</font>`
48
+
49
+ return overrideProperties
50
+ end
51
+ end
52
+
39
53
  local textSource = textChatMessage.TextSource
40
54
  if not textSource then
41
55
  return
@@ -53,6 +67,14 @@ function ChatProviderServiceClient:Start()
53
67
  end
54
68
  end
55
69
 
70
+ function ChatProviderServiceClient:SendSystemMessage(channel: TextChannel, message: string, color: Color3?)
71
+ assert(typeof(channel) == "Instance" and channel.ClassName == "TextChannel", "[ChatProviderServiceClient.SendSystemMessage] - Bad channel")
72
+ assert(typeof(message) == "string", "[ChatProviderServiceClient.SendSystemMessage] - Bad message")
73
+ assert(typeof(color) == "Color3" or color == nil, "[ChatProviderServiceClient.SendSystemMessage] - Bad color")
74
+
75
+ channel:DisplaySystemMessage(message, color and color:ToHex())
76
+ end
77
+
56
78
  function ChatProviderServiceClient:_renderTags(textSource)
57
79
  local player = Players:GetPlayerByUserId(textSource.UserId)
58
80
  if not player then