@atproto/api 0.12.25 → 0.12.26

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.
@@ -141,6 +141,8 @@ function checkMutedWords(
141
141
  return false
142
142
  }
143
143
 
144
+ const postAuthor = subject.author
145
+
144
146
  if (AppBskyFeedPost.isRecord(subject.record)) {
145
147
  // post text
146
148
  if (
@@ -150,6 +152,7 @@ function checkMutedWords(
150
152
  facets: subject.record.facets,
151
153
  outlineTags: subject.record.tags,
152
154
  languages: subject.record.langs,
155
+ actor: postAuthor,
153
156
  })
154
157
  ) {
155
158
  return true
@@ -166,6 +169,7 @@ function checkMutedWords(
166
169
  mutedWords,
167
170
  text: image.alt,
168
171
  languages: subject.record.langs,
172
+ actor: postAuthor,
169
173
  })
170
174
  ) {
171
175
  return true
@@ -179,6 +183,7 @@ function checkMutedWords(
179
183
  if (AppBskyEmbedRecord.isViewRecord(subject.embed.record)) {
180
184
  if (AppBskyFeedPost.isRecord(subject.embed.record.value)) {
181
185
  const embeddedPost = subject.embed.record.value
186
+ const embedAuthor = subject.embed.record.author
182
187
 
183
188
  // quoted post text
184
189
  if (
@@ -188,6 +193,7 @@ function checkMutedWords(
188
193
  facets: embeddedPost.facets,
189
194
  outlineTags: embeddedPost.tags,
190
195
  languages: embeddedPost.langs,
196
+ actor: embedAuthor,
191
197
  })
192
198
  ) {
193
199
  return true
@@ -201,6 +207,7 @@ function checkMutedWords(
201
207
  mutedWords,
202
208
  text: image.alt,
203
209
  languages: embeddedPost.langs,
210
+ actor: embedAuthor,
204
211
  })
205
212
  ) {
206
213
  return true
@@ -216,6 +223,7 @@ function checkMutedWords(
216
223
  mutedWords,
217
224
  text: external.title + ' ' + external.description,
218
225
  languages: [],
226
+ actor: embedAuthor,
219
227
  })
220
228
  ) {
221
229
  return true
@@ -231,6 +239,7 @@ function checkMutedWords(
231
239
  mutedWords,
232
240
  text: external.title + ' ' + external.description,
233
241
  languages: [],
242
+ actor: embedAuthor,
234
243
  })
235
244
  ) {
236
245
  return true
@@ -247,6 +256,7 @@ function checkMutedWords(
247
256
  languages: AppBskyFeedPost.isRecord(embeddedPost.record)
248
257
  ? embeddedPost.langs
249
258
  : [],
259
+ actor: embedAuthor,
250
260
  })
251
261
  ) {
252
262
  return true
@@ -264,6 +274,7 @@ function checkMutedWords(
264
274
  mutedWords,
265
275
  text: external.title + ' ' + external.description,
266
276
  languages: [],
277
+ actor: postAuthor,
267
278
  })
268
279
  ) {
269
280
  return true
@@ -274,6 +285,8 @@ function checkMutedWords(
274
285
  AppBskyEmbedRecordWithMedia.isView(subject.embed) &&
275
286
  AppBskyEmbedRecord.isViewRecord(subject.embed.record.record)
276
287
  ) {
288
+ const embedAuthor = subject.embed.record.record.author
289
+
277
290
  // quoted post text
278
291
  if (AppBskyFeedPost.isRecord(subject.embed.record.record.value)) {
279
292
  const post = subject.embed.record.record.value
@@ -284,6 +297,7 @@ function checkMutedWords(
284
297
  facets: post.facets,
285
298
  outlineTags: post.tags,
286
299
  languages: post.langs,
300
+ actor: embedAuthor,
287
301
  })
288
302
  ) {
289
303
  return true
@@ -300,6 +314,7 @@ function checkMutedWords(
300
314
  languages: AppBskyFeedPost.isRecord(subject.record)
301
315
  ? subject.record.langs
302
316
  : [],
317
+ actor: embedAuthor,
303
318
  })
304
319
  ) {
305
320
  return true