bug fixes

This commit is contained in:
CatAClock 2025-05-30 18:26:24 -07:00
parent d83870f783
commit 2909a35040
2 changed files with 7 additions and 4 deletions

View file

@ -155,7 +155,7 @@ export async function CreatePost(DID, Text, ContentWarning = undefined, Tags = [
let matches = body.message.match(/(\d+)/);
Record.text = Text.slice(0, matches[0] - 1);
body = await CreateRecord(DID, "app.bsky.feed.post", Record, undefined);
if (ReplyID != undefined && RootID != undefined) {
if (ReplyID == undefined && RootID == undefined) {
await CreatePost(DID, Text.slice(matches[0] - 1, Text.length), ContentWarning, Tags, body, body);
} else {
await CreatePost(DID, Text.slice(matches[0] - 1, Text.length), ContentWarning, Tags, body, RootID);

View file

@ -34,13 +34,16 @@ async function Post() {
if (localStorage.getItem(Variables.MastodonAccessToken) != null) {
let TempVisible;
// Adding tags
let TempText = Text + "<br/><br/>";
let TempText = Text;
let Tags = TagsInputArea.value.split(";");
if (Tags.length > 1) {
TempText += "<br/><br/>";
}
for (let i of Tags) {
while (i[0] == " ") {
i = i.substring(1, i.length);
}
if (i[0] != "#") {
if (i[0] != "#" && i.length != 0) {
i = "#" + i;
}
TempText += i + " ";
@ -87,7 +90,7 @@ async function Post() {
while (i[0] == " ") {
i = i.substring(1, i.length);
}
if (i[0] != "#") {
if (i[0] != "#" && i.length != 0) {
i = "#" + i;
}
TagsTemp.push(i);