Skip to content

Commit 4f89a16

Browse files
committed
chore: log command name not content
Instead of logging the content when receiving custom commands, only log the name of the command.
1 parent 764fed1 commit 4f89a16

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,21 @@ All notable changes to this project will be documented in this file.
4747
> For `serde_rusqlite` to properly match the column to structs, it must be
4848
> explicitly named, which is not the case for aggregation functions like
4949
> `COUNT(*)`.
50+
- Update existing cmd on conflict.
51+
> When adding a new command, and the command in fact already exists, thus,
52+
> it's an update, replace the content of the command instead of failing.
53+
- Reconnect on websocket close.
54+
- Only create missing subscriptions.
55+
> Trying to create a new event subscription with the same type fails if
56+
> one already exists (seems to be the case with reconnects). Thus, only
57+
> create the subs that are missing.
58+
- Don't split custom cmd content again.
59+
> A refactoring leftover that split the content again (due to the same
60+
> naming of a variable for the whole message payload, before the
61+
> refactor).
62+
>
63+
> This is not needed anymore, and even truncated the content of the
64+
> content, resulting in unexpected command contents.
5065
5166
### 🚜 Refactor
5267

@@ -88,5 +103,6 @@ All notable changes to this project will be documented in this file.
88103
- Clean up cargo-deny config.
89104
- Add justfile for common tasks.
90105
- Move state module out of folder.
106+
- Update changelog.
91107

92108
<!-- generated by git-cliff -->

src/handler/user.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ pub fn custom(state: &State, source: Source, name: &str) -> Option<response::Use
143143
.get_custom_command(source, name)
144144
.transpose()
145145
.map(|res| {
146-
if let Ok(name) = &res {
146+
if res.is_ok() {
147147
info!("user: received custom `{name}` command");
148148
}
149149
response::User::Custom(res)

0 commit comments

Comments
 (0)