multitag workie?
This commit is contained in:
parent
fb3d3b552b
commit
3a646be50e
1 changed files with 5 additions and 3 deletions
|
@ -204,18 +204,20 @@ export async function CreatePost(DID, Text, ContentWarning = undefined, Tags = [
|
||||||
}
|
}
|
||||||
if (AddTags == true) {
|
if (AddTags == true) {
|
||||||
let Facets = [];
|
let Facets = [];
|
||||||
|
let LengthStuff = 0;
|
||||||
for (let i of Tags) {
|
for (let i of Tags) {
|
||||||
let ThineIndex = Tags.indexOf(i);
|
let ThineIndex = Tags.indexOf(i, LengthStuff);
|
||||||
Facets.push({
|
Facets.push({
|
||||||
"index": {
|
"index": {
|
||||||
"byteStart": ThineIndex,
|
"byteStart": ThineIndex,
|
||||||
"byteEnd": ThineIndex + i.length
|
"byteEnd": ThineIndex + i.length
|
||||||
},
|
},
|
||||||
"features": {
|
"features": [{
|
||||||
"$type": "app.bsky.richtext.facet#tag",
|
"$type": "app.bsky.richtext.facet#tag",
|
||||||
"tag": i
|
"tag": i
|
||||||
}
|
}]
|
||||||
});
|
});
|
||||||
|
LengthStuff = ThineIndex + i.length;
|
||||||
}
|
}
|
||||||
Record.facets = Facets;
|
Record.facets = Facets;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue