Commit 1af5570e47

1af5570e47253f408552cab98b009cccd7bdd512

parent: d5b1c4a2f0

Unregistered key

vaw <git@nlih.de> · 2026-10-24 22:42 UTC
committer: <noreply@github.com>

Support opening message links (#836)

Layout: unified · split

src/main.rs +5 −3
@@ -130,6 +130,8 @@ fn resolve_mxid(
130 id: MatrixId, 130 id: MatrixId,
131 via: Vec<OwnedServerName>, 131 via: Vec<OwnedServerName>,
132) -> IambResult<IambId> { 132) -> IambResult<IambId> {
133 let mut view = RoomView::Main;
134
133 let alias_id = match id { 135 let alias_id = match id {
134 MatrixId::Room(room_id) => room_id.into(), 136 MatrixId::Room(room_id) => room_id.into(),
135 MatrixId::RoomAlias(alias) => { 137 MatrixId::RoomAlias(alias) => {
@@ -146,8 +148,8 @@ fn resolve_mxid(
146 store.application.worker.create_dm(user_id.to_owned())?.into() 148 store.application.worker.create_dm(user_id.to_owned())?.into()
147 } 149 }
148 }, 150 },
149 MatrixId::Event(alias_id, _) => { 151 MatrixId::Event(alias_id, event_id) => {
150 // ignore event id for now 152 view = RoomView::Message(event_id.into());
151 alias_id 153 alias_id
152 }, 154 },
153 _ => { 155 _ => {
@@ -163,7 +165,7 @@ fn resolve_mxid(
163 .or_default() 165 .or_default()
164 .extend(via); 166 .extend(via);
165 167
166 Ok(IambId::Room(alias_id, RoomView::Main)) 168 Ok(IambId::Room(alias_id, view))
167} 169}
168 170
169fn setup_screen( 171fn setup_screen(
src/windows/room/message.rs +1
@@ -221,6 +221,7 @@ impl StatefulWidget for MessageWidget<'_> {
221 221
222 let info = rooms.get_or_default(state.room_id().to_owned()); 222 let info = rooms.get_or_default(state.room_id().to_owned());
223 let Some(msg) = info.get_message(&state.message_id) else { 223 let Some(msg) = info.get_message(&state.message_id) else {
224 saved_tunables.restore(&mut settings.tunables);
224 match &state.message_id { 225 match &state.message_id {
225 MessageId::Origin(event_id) => { 226 MessageId::Origin(event_id) => {
226 self.store 227 self.store