Skip to content

Commit

Permalink
Lexicon: support for post embeds on chat messages (#2533)
Browse files Browse the repository at this point in the history
* lexicon: record embed views on chat messages

* lexicon: support for post embeds on chat messages
  • Loading branch information
devinivy authored May 29, 2024
1 parent ca0ca08 commit c4af6a4
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .changeset/big-birds-drum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@atproto/api": patch
---

Support for post embeds in chat lexicons
2 changes: 1 addition & 1 deletion lexicons/chat/bsky/convo/defs.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
},
"embed": {
"type": "union",
"refs": ["app.bsky.embed.record"]
"refs": ["app.bsky.embed.record#view"]
},
"sender": { "type": "ref", "ref": "#messageViewSender" },
"sentAt": { "type": "string", "format": "datetime" }
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/client/lexicons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8379,7 +8379,7 @@ export const schemaDict = {
},
embed: {
type: 'union',
refs: ['lex:app.bsky.embed.record'],
refs: ['lex:app.bsky.embed.record#view'],
},
sender: {
type: 'ref',
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/client/types/chat/bsky/convo/defs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export interface MessageView {
text: string
/** Annotations of text (mentions, URLs, hashtags, etc) */
facets?: AppBskyRichtextFacet.Main[]
embed?: AppBskyEmbedRecord.Main | { $type: string; [k: string]: unknown }
embed?: AppBskyEmbedRecord.View | { $type: string; [k: string]: unknown }
sender: MessageViewSender
sentAt: string
[k: string]: unknown
Expand Down
2 changes: 1 addition & 1 deletion packages/bsky/src/lexicon/lexicons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8379,7 +8379,7 @@ export const schemaDict = {
},
embed: {
type: 'union',
refs: ['lex:app.bsky.embed.record'],
refs: ['lex:app.bsky.embed.record#view'],
},
sender: {
type: 'ref',
Expand Down
2 changes: 1 addition & 1 deletion packages/bsky/src/lexicon/types/chat/bsky/convo/defs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export interface MessageView {
text: string
/** Annotations of text (mentions, URLs, hashtags, etc) */
facets?: AppBskyRichtextFacet.Main[]
embed?: AppBskyEmbedRecord.Main | { $type: string; [k: string]: unknown }
embed?: AppBskyEmbedRecord.View | { $type: string; [k: string]: unknown }
sender: MessageViewSender
sentAt: string
[k: string]: unknown
Expand Down
2 changes: 1 addition & 1 deletion packages/ozone/src/lexicon/lexicons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8379,7 +8379,7 @@ export const schemaDict = {
},
embed: {
type: 'union',
refs: ['lex:app.bsky.embed.record'],
refs: ['lex:app.bsky.embed.record#view'],
},
sender: {
type: 'ref',
Expand Down
2 changes: 1 addition & 1 deletion packages/ozone/src/lexicon/types/chat/bsky/convo/defs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export interface MessageView {
text: string
/** Annotations of text (mentions, URLs, hashtags, etc) */
facets?: AppBskyRichtextFacet.Main[]
embed?: AppBskyEmbedRecord.Main | { $type: string; [k: string]: unknown }
embed?: AppBskyEmbedRecord.View | { $type: string; [k: string]: unknown }
sender: MessageViewSender
sentAt: string
[k: string]: unknown
Expand Down
2 changes: 1 addition & 1 deletion packages/pds/src/lexicon/lexicons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8379,7 +8379,7 @@ export const schemaDict = {
},
embed: {
type: 'union',
refs: ['lex:app.bsky.embed.record'],
refs: ['lex:app.bsky.embed.record#view'],
},
sender: {
type: 'ref',
Expand Down
2 changes: 1 addition & 1 deletion packages/pds/src/lexicon/types/chat/bsky/convo/defs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export interface MessageView {
text: string
/** Annotations of text (mentions, URLs, hashtags, etc) */
facets?: AppBskyRichtextFacet.Main[]
embed?: AppBskyEmbedRecord.Main | { $type: string; [k: string]: unknown }
embed?: AppBskyEmbedRecord.View | { $type: string; [k: string]: unknown }
sender: MessageViewSender
sentAt: string
[k: string]: unknown
Expand Down

0 comments on commit c4af6a4

Please sign in to comment.