feat(bridge,ui): sort channels by last activity

- Add last_post_at field to Channel model (Rust)
- Sort channels by last_post_at descending in dashboard (Emacs)
This commit is contained in:
Ivan I. Ovchinnikov
2026-11-21 11:26:25 +03:00
parent 628df77588
commit 452005b98c
2 changed files with 14 additions and 2 deletions
+4 -2
View File
@@ -85,9 +85,12 @@ pub struct Channel {
pub id: ChannelId,
pub team_id: TeamId,
#[serde(rename = "type")]
pub channel_type: String, // "O" (Open), "P" (Private), "D" (Direct), "G" (Group)
pub channel_type: String,
pub display_name: String,
pub name: String,
/// Timestamp of the last post in this channel (milliseconds since epoch).
#[serde(default)]
pub last_post_at: i64,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
@@ -103,7 +106,6 @@ pub struct Post {
#[serde(default)]
pub file_ids: Vec<String>,
/// Populated by the bridge after resolving user_id via /users/ids.
/// Skipped during deserialization from Mattermost API.
#[serde(default, skip_deserializing)]
pub user_display_name: String,
}