add: connect to socket by community
direct messages/groups connect by channel id, everything else should connect by channel with the "is_channel" header set to true
This commit is contained in:
parent
c1c8cdbfcd
commit
0304461389
20 changed files with 241 additions and 160 deletions
|
@ -83,7 +83,7 @@ pub async fn proxy_request(
|
|||
None => return Json(Error::NotAllowed.into()),
|
||||
};
|
||||
|
||||
if let None = user.connections.get(&ConnectionService::LastFm) {
|
||||
if user.connections.get(&ConnectionService::LastFm).is_none() {
|
||||
// connection doesn't exist
|
||||
return Json(Error::GeneralNotFound("connection".to_string()).into());
|
||||
};
|
||||
|
|
|
@ -66,11 +66,11 @@ pub async fn me_request(jar: CookieJar, Extension(data): Extension<State>) -> im
|
|||
None => return Json(Error::NotAllowed.into()),
|
||||
};
|
||||
|
||||
return Json(ApiReturn {
|
||||
Json(ApiReturn {
|
||||
ok: true,
|
||||
message: "User exists".to_string(),
|
||||
payload: Some(user),
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
/// Update the settings of the given user.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue