Add user pronouns to message body, fixup changelog

main
~erin 2021-07-26 15:00:35 -04:00
parent b3fa390c72
commit da51a37b49
Signed by: erin
GPG Key ID: DA70E064A8C70F44
5 changed files with 33 additions and 27 deletions

View File

@ -3,6 +3,17 @@
- `/api/register` & `/api/login` now use JSON data
- 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
- When changing a username, it now deletes the previous user instead of creating a new one
- Database functions should now use some error handling
@ -13,13 +24,6 @@
- Add basic support for different message types
- Messages now use unix timestamps
- 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
- Serve frontend code
- Set cookie for token

38
Cargo.lock generated
View File

@ -576,6 +576,25 @@ version = "0.2.98"
source = "registry+https://github.com/rust-lang/crates.io-index"
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]]
name = "lock_api"
version = "0.4.4"
@ -805,25 +824,6 @@ version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
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]]
name = "polyval"
version = "0.4.5"

View File

@ -1,7 +1,7 @@
[package]
name = "lila-chat"
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"
repository = "https://git.lavender.software/erin/lila-chat/"
license = "CNPLv6+"

View File

@ -42,6 +42,7 @@ fn create_message(message: Json<MessageInput>, user: &User) -> JsonValue {
id: Uuid::new_v4(),
event_type,
user: user.name.to_lowercase().to_owned(),
pronouns: user.pronouns.to_lowercase().to_owned(),
body: message.body.to_string(),
created_at: Utc::now(),
};

View File

@ -21,6 +21,7 @@ pub struct Message {
pub id: Uuid,
pub event_type: MessageType,
pub user: String,
pub pronouns: String,
pub body: String,
pub created_at: DateTime<Utc>,
}