A different way of making this work
This commit is contained in:
parent
3a646be50e
commit
3b665e8ca8
1 changed files with 3 additions and 4 deletions
|
@ -206,18 +206,17 @@ export async function CreatePost(DID, Text, ContentWarning = undefined, Tags = [
|
|||
let Facets = [];
|
||||
let LengthStuff = 0;
|
||||
for (let i of Tags) {
|
||||
let ThineIndex = Tags.indexOf(i, LengthStuff);
|
||||
Facets.push({
|
||||
"index": {
|
||||
"byteStart": ThineIndex,
|
||||
"byteEnd": ThineIndex + i.length
|
||||
"byteStart": LengthStuff,
|
||||
"byteEnd": LengthStuff + i.length
|
||||
},
|
||||
"features": [{
|
||||
"$type": "app.bsky.richtext.facet#tag",
|
||||
"tag": i
|
||||
}]
|
||||
});
|
||||
LengthStuff = ThineIndex + i.length;
|
||||
LengthStuff += 1;
|
||||
}
|
||||
Record.facets = Facets;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue