fix API bugs
This commit is contained in:
parent
1d705a6f63
commit
01be46d5e1
8 changed files with 42 additions and 42 deletions
|
@ -52,7 +52,7 @@ class User{
|
|||
navigator.clipboard.writeText(this.id.id);
|
||||
});
|
||||
this.contextmenu.addbutton("Message user",function(){
|
||||
fetch(this.info.api+"/v9/users/@me/channels",
|
||||
fetch(this.info.api+"/users/@me/channels",
|
||||
{method:"POST",
|
||||
body:JSON.stringify({"recipients":[this.id.id]}),
|
||||
headers: this.localuser.headers
|
||||
|
@ -125,7 +125,7 @@ class User{
|
|||
User.contextmenu.bind(html,this);
|
||||
}
|
||||
static async resolve(id:string,localuser:Localuser){
|
||||
const json=await fetch(localuser.info.api.toString()+"/v9/users/"+id+"/profile",
|
||||
const json=await fetch(localuser.info.api.toString()+"/users/"+id+"/profile",
|
||||
{headers:localuser.headers}
|
||||
).then(_=>_.json());
|
||||
return new User(json,localuser);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue