@sockethub/server 5.0.0-alpha.4 → 5.0.0-alpha.6
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/README.md +54 -60
- package/bin/sockethub +4 -3
- package/package.json +42 -54
- package/res/socket.io.js +4908 -0
- package/res/sockethub-client.js +602 -0
- package/res/sockethub-client.min.js +19 -0
- package/sockethub.config.example.json +2 -3
- package/src/bootstrap/init.d.ts +16 -13
- package/src/bootstrap/init.test.ts +211 -0
- package/src/bootstrap/init.ts +152 -76
- package/src/bootstrap/load-platforms.ts +151 -0
- package/src/config.test.ts +27 -22
- package/src/config.ts +82 -86
- package/src/defaults.json +24 -16
- package/src/index.ts +61 -22
- package/src/janitor.test.ts +191 -169
- package/src/janitor.ts +141 -118
- package/src/listener.ts +148 -58
- package/src/middleware/create-activity-object.test.ts +28 -8
- package/src/middleware/create-activity-object.ts +16 -10
- package/src/middleware/expand-activity-stream.test.data.ts +331 -345
- package/src/middleware/expand-activity-stream.test.ts +65 -66
- package/src/middleware/expand-activity-stream.ts +26 -21
- package/src/middleware/store-credentials.test.ts +74 -60
- package/src/middleware/store-credentials.ts +14 -8
- package/src/middleware/validate.test.data.ts +240 -242
- package/src/middleware/validate.test.ts +39 -78
- package/src/middleware/validate.ts +62 -36
- package/src/middleware.test.ts +168 -138
- package/src/middleware.ts +57 -55
- package/src/platform-instance.test.ts +508 -214
- package/src/platform-instance.ts +324 -231
- package/src/platform.test.ts +375 -0
- package/src/platform.ts +306 -117
- package/src/process-manager.ts +75 -51
- package/src/routes.test.ts +43 -89
- package/src/routes.ts +40 -78
- package/src/sentry.test.ts +106 -0
- package/src/sentry.ts +19 -0
- package/src/sockethub.ts +190 -129
- package/src/util.ts +5 -0
- package/coverage/tmp/coverage-39338-1663949520416-0.json +0 -1
- package/dist/bootstrap/init.d.ts +0 -18
- package/dist/bootstrap/init.js +0 -64
- package/dist/bootstrap/init.js.map +0 -1
- package/dist/bootstrap/platforms.js +0 -75
- package/dist/config.d.ts +0 -12
- package/dist/config.js +0 -107
- package/dist/config.js.map +0 -1
- package/dist/defaults.json +0 -28
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -29
- package/dist/index.js.map +0 -1
- package/dist/janitor.d.ts +0 -30
- package/dist/janitor.js +0 -120
- package/dist/janitor.js.map +0 -1
- package/dist/listener.d.ts +0 -31
- package/dist/listener.js +0 -94
- package/dist/listener.js.map +0 -1
- package/dist/middleware/create-activity-object.d.ts +0 -8
- package/dist/middleware/create-activity-object.js +0 -19
- package/dist/middleware/create-activity-object.js.map +0 -1
- package/dist/middleware/expand-activity-stream.d.ts +0 -3
- package/dist/middleware/expand-activity-stream.js +0 -36
- package/dist/middleware/expand-activity-stream.js.map +0 -1
- package/dist/middleware/expand-activity-stream.test.data.d.ts +0 -480
- package/dist/middleware/expand-activity-stream.test.data.js +0 -360
- package/dist/middleware/expand-activity-stream.test.data.js.map +0 -1
- package/dist/middleware/store-credentials.d.ts +0 -3
- package/dist/middleware/store-credentials.js +0 -9
- package/dist/middleware/store-credentials.js.map +0 -1
- package/dist/middleware/validate.d.ts +0 -2
- package/dist/middleware/validate.js +0 -56
- package/dist/middleware/validate.js.map +0 -1
- package/dist/middleware/validate.test.data.d.ts +0 -532
- package/dist/middleware/validate.test.data.js +0 -263
- package/dist/middleware/validate.test.data.js.map +0 -1
- package/dist/middleware.d.ts +0 -21
- package/dist/middleware.js +0 -56
- package/dist/middleware.js.map +0 -1
- package/dist/platform-instance.d.ts +0 -78
- package/dist/platform-instance.js +0 -226
- package/dist/platform-instance.js.map +0 -1
- package/dist/platform.d.ts +0 -6
- package/dist/platform.js +0 -176
- package/dist/platform.js.map +0 -1
- package/dist/process-manager.d.ts +0 -11
- package/dist/process-manager.js +0 -82
- package/dist/process-manager.js.map +0 -1
- package/dist/routes.d.ts +0 -13
- package/dist/routes.js +0 -83
- package/dist/routes.js.map +0 -1
- package/dist/sockethub.d.ts +0 -18
- package/dist/sockethub.js +0 -112
- package/dist/sockethub.js.map +0 -1
- package/src/bootstrap/platforms.js +0 -75
- package/test/init-suite.js +0 -41
- package/test/sockethub-suite.js +0 -25
- package/tsconfig.json +0 -18
- package/views/examples/dummy.ejs +0 -95
- package/views/examples/feeds.ejs +0 -90
- package/views/examples/irc.ejs +0 -239
- package/views/examples/shared.js +0 -72
- package/views/examples/xmpp.ejs +0 -217
- package/views/index.ejs +0 -17
|
@@ -1,365 +1,351 @@
|
|
|
1
1
|
export default [
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
"name": "basic invalid type",
|
|
11
|
-
"valid":true,
|
|
12
|
-
"type":"credentials",
|
|
13
|
-
"input":{
|
|
14
|
-
"id":"foo",
|
|
15
|
-
"type":"send",
|
|
16
|
-
"context":"dummy",
|
|
17
|
-
"actor":{
|
|
18
|
-
"id":"dood@irc.freenode.net",
|
|
19
|
-
"type":"person",
|
|
20
|
-
"name":"dood"
|
|
21
|
-
},
|
|
22
|
-
"target":{
|
|
23
|
-
"id":"irc.freenode.net/service",
|
|
24
|
-
"type":"person",
|
|
25
|
-
"name":"service"
|
|
26
|
-
},
|
|
27
|
-
"object":{
|
|
28
|
-
"type":"credentials"
|
|
29
|
-
}
|
|
2
|
+
{
|
|
3
|
+
name: "not an object",
|
|
4
|
+
valid: false,
|
|
5
|
+
type: "message",
|
|
6
|
+
input: "hello world",
|
|
7
|
+
error: "Error: message received is not an object.",
|
|
30
8
|
},
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
9
|
+
{
|
|
10
|
+
name: "basic invalid type",
|
|
11
|
+
valid: true,
|
|
12
|
+
type: "credentials",
|
|
13
|
+
input: {
|
|
14
|
+
id: "foo",
|
|
15
|
+
type: "send",
|
|
16
|
+
context: "dummy",
|
|
17
|
+
actor: {
|
|
18
|
+
id: "dood@irc.freenode.net",
|
|
19
|
+
type: "person",
|
|
20
|
+
name: "dood",
|
|
21
|
+
},
|
|
22
|
+
target: {
|
|
23
|
+
id: "irc.freenode.net/service",
|
|
24
|
+
type: "person",
|
|
25
|
+
name: "service",
|
|
26
|
+
},
|
|
27
|
+
object: {
|
|
28
|
+
type: "credentials",
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
output: "same",
|
|
54
32
|
},
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
33
|
+
{
|
|
34
|
+
name: "basic valid type",
|
|
35
|
+
valid: true,
|
|
36
|
+
type: "credentials",
|
|
37
|
+
input: {
|
|
38
|
+
id: "foo",
|
|
39
|
+
type: "credentials",
|
|
40
|
+
context: "dummy",
|
|
41
|
+
actor: {
|
|
42
|
+
id: "dood@irc.freenode.net",
|
|
43
|
+
type: "person",
|
|
44
|
+
name: "dood",
|
|
45
|
+
},
|
|
46
|
+
target: {
|
|
47
|
+
id: "irc.freenode.net/service",
|
|
48
|
+
type: "person",
|
|
49
|
+
name: "service",
|
|
50
|
+
},
|
|
51
|
+
object: {
|
|
52
|
+
type: "credentials",
|
|
53
|
+
},
|
|
73
54
|
},
|
|
74
|
-
|
|
75
|
-
},
|
|
76
|
-
"object":{
|
|
77
|
-
"type":"credentials",
|
|
78
|
-
"nick":"sh-9K3Vk",
|
|
79
|
-
"port":6667,
|
|
80
|
-
"secure":false,
|
|
81
|
-
"server":"irc.freenode.net"
|
|
82
|
-
}
|
|
55
|
+
output: "same",
|
|
83
56
|
},
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
57
|
+
{
|
|
58
|
+
name: "new format",
|
|
59
|
+
valid: true,
|
|
60
|
+
type: "credentials",
|
|
61
|
+
input: {
|
|
62
|
+
type: "credentials",
|
|
63
|
+
context: "irc",
|
|
64
|
+
actor: {
|
|
65
|
+
id: "sh-9K3Vk@irc.freenode.net",
|
|
66
|
+
type: "person",
|
|
67
|
+
name: "sh-9K3Vk",
|
|
68
|
+
image: {
|
|
69
|
+
height: 250,
|
|
70
|
+
mediaType: "image/jpeg",
|
|
71
|
+
url: "https://example.org/image.jpg",
|
|
72
|
+
width: 250,
|
|
73
|
+
},
|
|
74
|
+
url: "https://sockethub.org",
|
|
75
|
+
},
|
|
76
|
+
object: {
|
|
77
|
+
type: "credentials",
|
|
78
|
+
nick: "sh-9K3Vk",
|
|
79
|
+
port: 6667,
|
|
80
|
+
secure: false,
|
|
81
|
+
server: "irc.freenode.net",
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
output: "same",
|
|
100
85
|
},
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
86
|
+
{
|
|
87
|
+
name: "no type specified",
|
|
88
|
+
valid: false,
|
|
89
|
+
type: "credentials",
|
|
90
|
+
input: {
|
|
91
|
+
actor: "hyper_rau@localhost",
|
|
92
|
+
context: "xmpp",
|
|
93
|
+
object: {
|
|
94
|
+
username: "hyper_rau",
|
|
95
|
+
password: "123",
|
|
96
|
+
server: "localhost",
|
|
97
|
+
port: 5222,
|
|
98
|
+
resource: "laptop",
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
error: "Error: activity stream must contain a type property.",
|
|
114
102
|
},
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
103
|
+
{
|
|
104
|
+
name: "expand unknown actor",
|
|
105
|
+
type: "message",
|
|
106
|
+
valid: "true",
|
|
107
|
+
input: {
|
|
108
|
+
context: "foo",
|
|
109
|
+
type: "bar",
|
|
110
|
+
actor: "foo@bar",
|
|
111
|
+
object: {
|
|
112
|
+
content: "bar",
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
output: {
|
|
116
|
+
context: "foo",
|
|
117
|
+
type: "bar",
|
|
118
|
+
actor: {
|
|
119
|
+
id: "foo@bar",
|
|
120
|
+
},
|
|
121
|
+
object: {
|
|
122
|
+
content: "bar",
|
|
123
|
+
},
|
|
124
|
+
},
|
|
137
125
|
},
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
126
|
+
{
|
|
127
|
+
name: "expand unknown actor 2",
|
|
128
|
+
type: "message",
|
|
129
|
+
valid: "true",
|
|
130
|
+
input: {
|
|
131
|
+
context: "foo",
|
|
132
|
+
type: "bar",
|
|
133
|
+
actor: "someone@example.org/resource",
|
|
134
|
+
object: {
|
|
135
|
+
content: "bar",
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
output: {
|
|
139
|
+
context: "foo",
|
|
140
|
+
type: "bar",
|
|
141
|
+
actor: {
|
|
142
|
+
id: "someone@example.org/resource",
|
|
143
|
+
},
|
|
144
|
+
object: {
|
|
145
|
+
content: "bar",
|
|
146
|
+
},
|
|
147
|
+
},
|
|
160
148
|
},
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
149
|
+
{
|
|
150
|
+
name: "expand unknown actor 2",
|
|
151
|
+
type: "message",
|
|
152
|
+
valid: "true",
|
|
153
|
+
input: {
|
|
154
|
+
context: "foo",
|
|
155
|
+
type: "bar",
|
|
156
|
+
actor: "xmpp:someone@example.org/resource",
|
|
157
|
+
object: {
|
|
158
|
+
content: "bar",
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
output: {
|
|
162
|
+
context: "foo",
|
|
163
|
+
type: "bar",
|
|
164
|
+
actor: {
|
|
165
|
+
id: "xmpp:someone@example.org/resource",
|
|
166
|
+
},
|
|
167
|
+
object: {
|
|
168
|
+
content: "bar",
|
|
169
|
+
},
|
|
170
|
+
},
|
|
181
171
|
},
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
172
|
+
{
|
|
173
|
+
name: "person",
|
|
174
|
+
type: "message",
|
|
175
|
+
valid: true,
|
|
176
|
+
input: {
|
|
177
|
+
context: "some context",
|
|
178
|
+
type: "some type",
|
|
179
|
+
actor: "blah",
|
|
180
|
+
object: {},
|
|
181
|
+
},
|
|
182
|
+
output: {
|
|
183
|
+
context: "some context",
|
|
184
|
+
type: "some type",
|
|
185
|
+
actor: {
|
|
186
|
+
id: "blah",
|
|
187
|
+
type: "person",
|
|
188
|
+
name: "dood",
|
|
189
|
+
},
|
|
190
|
+
object: {},
|
|
191
|
+
},
|
|
202
192
|
},
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
"am",
|
|
213
|
-
"extras"
|
|
214
|
-
]
|
|
215
|
-
},
|
|
216
|
-
"object": {}
|
|
217
|
-
}
|
|
218
|
-
},
|
|
219
|
-
{
|
|
220
|
-
"name":"bad parent object",
|
|
221
|
-
"valid":false,
|
|
222
|
-
"type":"message",
|
|
223
|
-
"input":{
|
|
224
|
-
"string":"this is a string",
|
|
225
|
-
"array":[
|
|
226
|
-
"this",
|
|
227
|
-
"is",
|
|
228
|
-
{
|
|
229
|
-
"an":"array"
|
|
230
|
-
}
|
|
231
|
-
],
|
|
232
|
-
"as":{
|
|
233
|
-
"id":"blah",
|
|
234
|
-
"type":"send",
|
|
235
|
-
"context":"hello",
|
|
236
|
-
"actor":{
|
|
237
|
-
"name":"dood"
|
|
193
|
+
{
|
|
194
|
+
name: "person with extras",
|
|
195
|
+
valid: true,
|
|
196
|
+
type: "message",
|
|
197
|
+
input: {
|
|
198
|
+
context: "some context",
|
|
199
|
+
type: "some type",
|
|
200
|
+
actor: "blah2",
|
|
201
|
+
object: {},
|
|
238
202
|
},
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
203
|
+
output: {
|
|
204
|
+
context: "some context",
|
|
205
|
+
type: "some type",
|
|
206
|
+
actor: {
|
|
207
|
+
id: "blah2",
|
|
208
|
+
type: "person",
|
|
209
|
+
name: "bob",
|
|
210
|
+
hello: "there",
|
|
211
|
+
i: ["am", "extras"],
|
|
212
|
+
},
|
|
213
|
+
object: {},
|
|
242
214
|
},
|
|
243
|
-
"object":{
|
|
244
|
-
"type":"credentials"
|
|
245
|
-
}
|
|
246
|
-
},
|
|
247
|
-
"noId":{
|
|
248
|
-
"name":"dood"
|
|
249
|
-
},
|
|
250
|
-
"noId2":{
|
|
251
|
-
"type":"person",
|
|
252
|
-
"name":"bob"
|
|
253
|
-
},
|
|
254
|
-
"noDisplayName":{
|
|
255
|
-
"id":"larg"
|
|
256
|
-
}
|
|
257
215
|
},
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
216
|
+
{
|
|
217
|
+
name: "bad parent object",
|
|
218
|
+
valid: false,
|
|
219
|
+
type: "message",
|
|
220
|
+
input: {
|
|
221
|
+
string: "this is a string",
|
|
222
|
+
array: [
|
|
223
|
+
"this",
|
|
224
|
+
"is",
|
|
225
|
+
{
|
|
226
|
+
an: "array",
|
|
227
|
+
},
|
|
228
|
+
],
|
|
229
|
+
as: {
|
|
230
|
+
id: "blah",
|
|
231
|
+
type: "send",
|
|
232
|
+
context: "hello",
|
|
233
|
+
actor: {
|
|
234
|
+
name: "dood",
|
|
235
|
+
},
|
|
236
|
+
target: {
|
|
237
|
+
type: "person",
|
|
238
|
+
name: "bob",
|
|
239
|
+
},
|
|
240
|
+
object: {
|
|
241
|
+
type: "credentials",
|
|
242
|
+
},
|
|
243
|
+
},
|
|
244
|
+
noId: {
|
|
245
|
+
name: "dood",
|
|
246
|
+
},
|
|
247
|
+
noId2: {
|
|
248
|
+
type: "person",
|
|
249
|
+
name: "bob",
|
|
250
|
+
},
|
|
251
|
+
noDisplayName: {
|
|
252
|
+
id: "larg",
|
|
253
|
+
},
|
|
254
|
+
},
|
|
255
|
+
error: "Error: activity stream must contain a context property",
|
|
271
256
|
},
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
257
|
+
{
|
|
258
|
+
name: "no actor specified",
|
|
259
|
+
valid: false,
|
|
260
|
+
type: "message",
|
|
261
|
+
input: {
|
|
262
|
+
type: "some type",
|
|
263
|
+
context: "xmpp",
|
|
264
|
+
object: {
|
|
265
|
+
type: "error",
|
|
266
|
+
content: "error message",
|
|
267
|
+
},
|
|
268
|
+
},
|
|
269
|
+
error: "Error: activity stream must contain an actor property.",
|
|
283
270
|
},
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
},
|
|
306
|
-
"target":"dooder"
|
|
271
|
+
{
|
|
272
|
+
name: "expand actor and target of unknowns",
|
|
273
|
+
valid: true,
|
|
274
|
+
type: "message",
|
|
275
|
+
input: {
|
|
276
|
+
actor: "irc://uuu@localhost",
|
|
277
|
+
type: "join",
|
|
278
|
+
context: "irc",
|
|
279
|
+
target: "irc://irc.dooder.net/a-room",
|
|
280
|
+
},
|
|
281
|
+
output: {
|
|
282
|
+
actor: {
|
|
283
|
+
id: "irc://uuu@localhost",
|
|
284
|
+
},
|
|
285
|
+
type: "join",
|
|
286
|
+
context: "irc",
|
|
287
|
+
target: {
|
|
288
|
+
id: "irc://irc.dooder.net/a-room",
|
|
289
|
+
},
|
|
290
|
+
},
|
|
307
291
|
},
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
"context":"irc",
|
|
331
|
-
"object":{
|
|
332
|
-
|
|
333
|
-
}
|
|
292
|
+
{
|
|
293
|
+
name: "expand actor and target of unknowns",
|
|
294
|
+
valid: true,
|
|
295
|
+
type: "message",
|
|
296
|
+
input: {
|
|
297
|
+
actor: "hyper_rau@localhost",
|
|
298
|
+
type: "join",
|
|
299
|
+
context: "xmpp",
|
|
300
|
+
object: {},
|
|
301
|
+
target: "dooder",
|
|
302
|
+
},
|
|
303
|
+
output: {
|
|
304
|
+
actor: {
|
|
305
|
+
id: "hyper_rau@localhost",
|
|
306
|
+
},
|
|
307
|
+
type: "join",
|
|
308
|
+
context: "xmpp",
|
|
309
|
+
object: {},
|
|
310
|
+
target: {
|
|
311
|
+
id: "dooder",
|
|
312
|
+
},
|
|
313
|
+
},
|
|
334
314
|
},
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
315
|
+
{
|
|
316
|
+
name: "expand known person",
|
|
317
|
+
valid: true,
|
|
318
|
+
type: "message",
|
|
319
|
+
input: {
|
|
320
|
+
actor: "sh-9K3Vk@irc.freenode.net",
|
|
321
|
+
target: "blah3",
|
|
322
|
+
type: "send",
|
|
323
|
+
context: "irc",
|
|
324
|
+
object: {},
|
|
345
325
|
},
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
326
|
+
output: {
|
|
327
|
+
actor: {
|
|
328
|
+
id: "sh-9K3Vk@irc.freenode.net",
|
|
329
|
+
type: "person",
|
|
330
|
+
name: "sh-9K3Vk",
|
|
331
|
+
image: {
|
|
332
|
+
height: 250,
|
|
333
|
+
mediaType: "image/jpeg",
|
|
334
|
+
url: "https://example.org/image.jpg",
|
|
335
|
+
width: 250,
|
|
336
|
+
},
|
|
337
|
+
url: "https://sockethub.org",
|
|
338
|
+
},
|
|
339
|
+
target: {
|
|
340
|
+
id: "blah3",
|
|
341
|
+
type: "person",
|
|
342
|
+
name: "bob",
|
|
343
|
+
hello: "there",
|
|
344
|
+
i: ["am", "extras"],
|
|
345
|
+
},
|
|
346
|
+
type: "send",
|
|
347
|
+
context: "irc",
|
|
348
|
+
object: {},
|
|
349
|
+
},
|
|
350
|
+
},
|
|
365
351
|
];
|