Skip to content

Commit 59dbf89

Browse files
committed
fixup! feat(stores): allow saving thread subscriptions
1 parent 85f006f commit 59dbf89

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

crates/matrix-sdk-base/src/store/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ impl ThreadStatus {
470470

471471
/// Convert a string representation into a [`ThreadStatus`], if it is a
472472
/// valid one, or `None` otherwise.
473-
pub fn from_str(s: &str) -> Option<Self> {
473+
pub fn from_value(s: &str) -> Option<Self> {
474474
match s {
475475
"automatic" => Some(ThreadStatus::Subscribed { automatic: true }),
476476
"manual" => Some(ThreadStatus::Subscribed { automatic: false }),

crates/matrix-sdk-sqlite/src/state_store.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2136,7 +2136,7 @@ impl StateStore for SqliteStateStore {
21362136
.await
21372137
.optional()?
21382138
.map(|data| {
2139-
ThreadStatus::from_str(&data).ok_or_else(|| Error::InvalidData {
2139+
ThreadStatus::from_value(&data).ok_or_else(|| Error::InvalidData {
21402140
details: format!("Invalid thread status: {}", data),
21412141
})
21422142
})

0 commit comments

Comments
 (0)