Merge branch 'polyphony-chat:main' into main
This commit is contained in:
commit
e3a5a532c3
|
@ -22,13 +22,13 @@ jobs:
|
||||||
sudo apt-get install -y git python3 build-essential
|
sudo apt-get install -y git python3 build-essential
|
||||||
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
|
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
|
||||||
sudo apt-get install -y nodejs
|
sudo apt-get install -y nodejs
|
||||||
git clone https://github.com/polyphony-chat/spacebarchat-server.git
|
git clone https://github.com/bitfl0wer/server.git
|
||||||
- name: Prepare and start spacebarchat-server
|
- name: Prepare and start Spacebar server
|
||||||
run: |
|
run: |
|
||||||
npm install
|
npm install
|
||||||
npm run setup
|
npm run setup
|
||||||
npm run start &
|
npm run start &
|
||||||
working-directory: ./spacebarchat-server
|
working-directory: ./server
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cargo build --verbose
|
run: cargo build --verbose
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
|
|
|
@ -127,10 +127,10 @@ mod test {
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn send_message() {
|
async fn send_message() {
|
||||||
let channel_id = "1104413094102290492".to_string();
|
let channel_id = "1106954414356168802".to_string();
|
||||||
let mut message = crate::api::schemas::MessageSendSchema::new(
|
let mut message = crate::api::schemas::MessageSendSchema::new(
|
||||||
None,
|
None,
|
||||||
Some("ashjkdhjksdfgjsdfzjkhsdvhjksdf".to_string()),
|
Some("A Message!".to_string()),
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
|
@ -151,8 +151,8 @@ mod test {
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
let login_schema: LoginSchema = LoginSchema::new(
|
let login_schema: LoginSchema = LoginSchema::new(
|
||||||
AuthUsername::new("user1@gmail.com".to_string()).unwrap(),
|
AuthUsername::new("user@test.xyz".to_string()).unwrap(),
|
||||||
"user".to_string(),
|
"transrights".to_string(),
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
|
@ -173,9 +173,9 @@ mod test {
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn send_message_attachment() {
|
async fn send_message_attachment() {
|
||||||
let channel_id = "1104413094102290492".to_string();
|
let channel_id = "1106954414356168802".to_string();
|
||||||
|
|
||||||
let f = File::open("/drive/hdd1/Pictures/polyphony-chorus8bit.png").unwrap();
|
let f = File::open("./README.md").unwrap();
|
||||||
let mut reader = BufReader::new(f);
|
let mut reader = BufReader::new(f);
|
||||||
let mut buffer = Vec::new();
|
let mut buffer = Vec::new();
|
||||||
|
|
||||||
|
@ -183,7 +183,7 @@ mod test {
|
||||||
|
|
||||||
let attachment = crate::api::types::PartialDiscordFileAttachment {
|
let attachment = crate::api::types::PartialDiscordFileAttachment {
|
||||||
id: None,
|
id: None,
|
||||||
filename: "test.png".to_string(),
|
filename: "README.md".to_string(),
|
||||||
description: None,
|
description: None,
|
||||||
content_type: None,
|
content_type: None,
|
||||||
size: None,
|
size: None,
|
||||||
|
@ -220,8 +220,8 @@ mod test {
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
let login_schema: LoginSchema = LoginSchema::new(
|
let login_schema: LoginSchema = LoginSchema::new(
|
||||||
AuthUsername::new("user1@gmail.com".to_string()).unwrap(),
|
AuthUsername::new("user@test.xyz".to_string()).unwrap(),
|
||||||
"user".to_string(),
|
"transrights".to_string(),
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
|
|
|
@ -51,7 +51,7 @@ pub struct UserSettings {
|
||||||
stream_notifications_enabled: bool,
|
stream_notifications_enabled: bool,
|
||||||
theme: String,
|
theme: String,
|
||||||
timezone_offset: i32,
|
timezone_offset: i32,
|
||||||
view_nsfw_guilds: bool,
|
//view_nsfw_guilds: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Serialize, Deserialize)]
|
#[derive(Debug, Serialize, Deserialize)]
|
||||||
|
|
Loading…
Reference in New Issue