Add user pronouns to message body, fixup changelog
parent
b3fa390c72
commit
da51a37b49
18
CHANGELOG.md
18
CHANGELOG.md
|
@ -3,6 +3,17 @@
|
||||||
- `/api/register` & `/api/login` now use JSON data
|
- `/api/register` & `/api/login` now use JSON data
|
||||||
- Changing user info now uses Enum (Name, Pin, or Pronouns)
|
- Changing user info now uses Enum (Name, Pin, or Pronouns)
|
||||||
|
|
||||||
|
### 0.6.1
|
||||||
|
- Add basic support for different user roles & moderator commands
|
||||||
|
- Any user names "admin" will be made into an Admin user
|
||||||
|
- User pronouns are stored in message body now
|
||||||
|
|
||||||
|
## 0.5.0
|
||||||
|
- Most actions should now fail on a NULL token
|
||||||
|
- Cookie should now expire after a week
|
||||||
|
- Use sled database instead of json file to store users
|
||||||
|
- Now use `GET /api/token/<name>` to validate a users session token
|
||||||
|
|
||||||
### 0.5.2
|
### 0.5.2
|
||||||
- When changing a username, it now deletes the previous user instead of creating a new one
|
- When changing a username, it now deletes the previous user instead of creating a new one
|
||||||
- Database functions should now use some error handling
|
- Database functions should now use some error handling
|
||||||
|
@ -13,13 +24,6 @@
|
||||||
- Add basic support for different message types
|
- Add basic support for different message types
|
||||||
- Messages now use unix timestamps
|
- Messages now use unix timestamps
|
||||||
- Backend finds timestamp
|
- Backend finds timestamp
|
||||||
|
|
||||||
## 0.5.0
|
|
||||||
- Most actions should now fail on a NULL token
|
|
||||||
- Cookie should now expire after a week
|
|
||||||
- Use sled database instead of json file to store users
|
|
||||||
- Now use `GET /api/token/<name>` to validate a users session token
|
|
||||||
|
|
||||||
## 0.4.0
|
## 0.4.0
|
||||||
- Serve frontend code
|
- Serve frontend code
|
||||||
- Set cookie for token
|
- Set cookie for token
|
||||||
|
|
|
@ -576,6 +576,25 @@ version = "0.2.98"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "320cfe77175da3a483efed4bc0adc1968ca050b098ce4f2f1c13a56626128790"
|
checksum = "320cfe77175da3a483efed4bc0adc1968ca050b098ce4f2f1c13a56626128790"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "lila-chat"
|
||||||
|
version = "0.6.0"
|
||||||
|
dependencies = [
|
||||||
|
"bincode",
|
||||||
|
"chrono",
|
||||||
|
"env_logger",
|
||||||
|
"log 0.4.14",
|
||||||
|
"once_cell",
|
||||||
|
"random-string",
|
||||||
|
"rocket",
|
||||||
|
"rocket_contrib",
|
||||||
|
"serde",
|
||||||
|
"serde_json",
|
||||||
|
"sha1",
|
||||||
|
"sled",
|
||||||
|
"uuid",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lock_api"
|
name = "lock_api"
|
||||||
version = "0.4.4"
|
version = "0.4.4"
|
||||||
|
@ -805,25 +824,6 @@ version = "2.1.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e"
|
checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "pogchat"
|
|
||||||
version = "0.6.0"
|
|
||||||
dependencies = [
|
|
||||||
"bincode",
|
|
||||||
"chrono",
|
|
||||||
"env_logger",
|
|
||||||
"log 0.4.14",
|
|
||||||
"once_cell",
|
|
||||||
"random-string",
|
|
||||||
"rocket",
|
|
||||||
"rocket_contrib",
|
|
||||||
"serde",
|
|
||||||
"serde_json",
|
|
||||||
"sha1",
|
|
||||||
"sled",
|
|
||||||
"uuid",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "polyval"
|
name = "polyval"
|
||||||
version = "0.4.5"
|
version = "0.4.5"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[package]
|
[package]
|
||||||
name = "lila-chat"
|
name = "lila-chat"
|
||||||
description = "A basic chat server written in rust"
|
description = "A basic chat server written in rust"
|
||||||
version = "0.6.0"
|
version = "0.6.1"
|
||||||
documentation = "https://git.lavender.software/erin/lila-chat/wiki"
|
documentation = "https://git.lavender.software/erin/lila-chat/wiki"
|
||||||
repository = "https://git.lavender.software/erin/lila-chat/"
|
repository = "https://git.lavender.software/erin/lila-chat/"
|
||||||
license = "CNPLv6+"
|
license = "CNPLv6+"
|
||||||
|
|
|
@ -42,6 +42,7 @@ fn create_message(message: Json<MessageInput>, user: &User) -> JsonValue {
|
||||||
id: Uuid::new_v4(),
|
id: Uuid::new_v4(),
|
||||||
event_type,
|
event_type,
|
||||||
user: user.name.to_lowercase().to_owned(),
|
user: user.name.to_lowercase().to_owned(),
|
||||||
|
pronouns: user.pronouns.to_lowercase().to_owned(),
|
||||||
body: message.body.to_string(),
|
body: message.body.to_string(),
|
||||||
created_at: Utc::now(),
|
created_at: Utc::now(),
|
||||||
};
|
};
|
||||||
|
|
|
@ -21,6 +21,7 @@ pub struct Message {
|
||||||
pub id: Uuid,
|
pub id: Uuid,
|
||||||
pub event_type: MessageType,
|
pub event_type: MessageType,
|
||||||
pub user: String,
|
pub user: String,
|
||||||
|
pub pronouns: String,
|
||||||
pub body: String,
|
pub body: String,
|
||||||
pub created_at: DateTime<Utc>,
|
pub created_at: DateTime<Utc>,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue