various fixes
This commit is contained in:
parent
4299e138fa
commit
1eea6cc005
9 changed files with 15 additions and 19 deletions
|
@ -113,7 +113,7 @@ class Channel{
|
|||
const params=new URLSearchParams("");
|
||||
params.set("instance",this.info.wellknown)
|
||||
const encoded=params.toString();
|
||||
text.textContent=`${window.location.protocol}//${window.location.host}/invite/${json.code}?${encoded}`
|
||||
text.textContent=`${location.origin}/invite/${json.code}?${encoded}`
|
||||
})
|
||||
}
|
||||
update();
|
||||
|
|
|
@ -137,13 +137,14 @@ class Localuser{
|
|||
"compress": !!DecompressionStream,
|
||||
"presence": {
|
||||
"status": "online",
|
||||
"since": new Date().getTime(),
|
||||
"since": null,//new Date().getTime()
|
||||
"activities": [],
|
||||
"afk": false
|
||||
}
|
||||
}
|
||||
}))
|
||||
});
|
||||
|
||||
let ds:DecompressionStream;
|
||||
let w:WritableStreamDefaultWriter;
|
||||
let r:ReadableStreamDefaultReader;
|
||||
|
@ -1116,7 +1117,7 @@ class Localuser{
|
|||
guild_id:guildid,
|
||||
limit:100,
|
||||
nonce,
|
||||
//presences:true
|
||||
presences:true
|
||||
}
|
||||
}));
|
||||
this.fetchingmembers.set(guildid,true);
|
||||
|
|
|
@ -198,8 +198,8 @@ async function login(username:string, password:string, captcha:string){
|
|||
}}
|
||||
try{
|
||||
const info=JSON.parse(localStorage.getItem("instanceinfo"));
|
||||
const api=info.login;
|
||||
return await fetch(api+'/auth/login',options).then(response=>response.json())
|
||||
const api=info.login+(info.login.startsWith("/")?"/":"");
|
||||
return await fetch(api+'auth/login',options).then(response=>response.json())
|
||||
.then((response) => {
|
||||
console.log(response,response.message)
|
||||
if("Invalid Form Body"===response.message){
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<div>
|
||||
<label for="instance"><b>Instance:</b></label><br>
|
||||
<p id="verify"></p>
|
||||
<input type="text" placeholder="Instance URL" id="instance" name="instance" value="https://spacebar.chat/" id="instancein" required>
|
||||
<input type="text" placeholder="Instance URL" id="instancein" name="instance" value="https://spacebar.chat/" id="instancein" required>
|
||||
</div>
|
||||
<div>
|
||||
<label for="uname"><b>Email:</b></label><br>
|
||||
|
|
|
@ -58,7 +58,8 @@ class User{
|
|||
body:JSON.stringify({"recipients":[this.id]}),
|
||||
headers: this.localuser.headers
|
||||
});
|
||||
})
|
||||
});
|
||||
|
||||
}
|
||||
static clear(){
|
||||
this.userids={};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue