bug fixes
This commit is contained in:
parent
d83870f783
commit
2909a35040
2 changed files with 7 additions and 4 deletions
|
@ -155,7 +155,7 @@ export async function CreatePost(DID, Text, ContentWarning = undefined, Tags = [
|
||||||
let matches = body.message.match(/(\d+)/);
|
let matches = body.message.match(/(\d+)/);
|
||||||
Record.text = Text.slice(0, matches[0] - 1);
|
Record.text = Text.slice(0, matches[0] - 1);
|
||||||
body = await CreateRecord(DID, "app.bsky.feed.post", Record, undefined);
|
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);
|
await CreatePost(DID, Text.slice(matches[0] - 1, Text.length), ContentWarning, Tags, body, body);
|
||||||
} else {
|
} else {
|
||||||
await CreatePost(DID, Text.slice(matches[0] - 1, Text.length), ContentWarning, Tags, body, RootID);
|
await CreatePost(DID, Text.slice(matches[0] - 1, Text.length), ContentWarning, Tags, body, RootID);
|
||||||
|
|
|
@ -34,13 +34,16 @@ async function Post() {
|
||||||
if (localStorage.getItem(Variables.MastodonAccessToken) != null) {
|
if (localStorage.getItem(Variables.MastodonAccessToken) != null) {
|
||||||
let TempVisible;
|
let TempVisible;
|
||||||
// Adding tags
|
// Adding tags
|
||||||
let TempText = Text + "<br/><br/>";
|
let TempText = Text;
|
||||||
let Tags = TagsInputArea.value.split(";");
|
let Tags = TagsInputArea.value.split(";");
|
||||||
|
if (Tags.length > 1) {
|
||||||
|
TempText += "<br/><br/>";
|
||||||
|
}
|
||||||
for (let i of Tags) {
|
for (let i of Tags) {
|
||||||
while (i[0] == " ") {
|
while (i[0] == " ") {
|
||||||
i = i.substring(1, i.length);
|
i = i.substring(1, i.length);
|
||||||
}
|
}
|
||||||
if (i[0] != "#") {
|
if (i[0] != "#" && i.length != 0) {
|
||||||
i = "#" + i;
|
i = "#" + i;
|
||||||
}
|
}
|
||||||
TempText += i + " ";
|
TempText += i + " ";
|
||||||
|
@ -87,7 +90,7 @@ async function Post() {
|
||||||
while (i[0] == " ") {
|
while (i[0] == " ") {
|
||||||
i = i.substring(1, i.length);
|
i = i.substring(1, i.length);
|
||||||
}
|
}
|
||||||
if (i[0] != "#") {
|
if (i[0] != "#" && i.length != 0) {
|
||||||
i = "#" + i;
|
i = "#" + i;
|
||||||
}
|
}
|
||||||
TagsTemp.push(i);
|
TagsTemp.push(i);
|
||||||
|
|
Loading…
Add table
Reference in a new issue