You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 11, 2025. It is now read-only.
error!("Failed to build and append admin room response PDU: \"{e}\"");
167
+
168
+
let error_room_message = RoomMessageEventContent::text_plain(format!("Failed to build and append admin room PDU: \"{e}\"\n\nThe original admin command may have finished successfully, but we could not return the output."));
169
+
170
+
services().rooms.timeline.build_and_append_pdu(
171
+
PduBuilder{
172
+
event_type:TimelineEventType::RoomMessage,
173
+
content: to_raw_value(&error_room_message)
174
+
.expect("event is valid, we just created it"),
175
+
unsigned:None,
176
+
state_key:None,
177
+
redacts:None,
178
+
},
179
+
&conduit_user,
180
+
&conduit_room,
181
+
&state_lock)
182
+
.await?;
183
+
}
184
+
drop(state_lock);
133
185
}
134
-
};
186
+
Err(_) => {
187
+
// TODO: Handle error, Im too unfamiliar with the codebase to know what to do here
135
188
136
-
let mutex_state = Arc::clone(
137
-
services().globals
138
-
.roomid_mutex_state
139
-
.write()
140
-
.await
141
-
.entry(conduit_room.clone())
142
-
.or_default(),
143
-
);
144
189
145
-
let state_lock = mutex_state.lock().await;
190
+
// recv_async returns an error if all senders have been dropped. If the channel is empty, the returned future will yield to the async runtime.
error!("Failed to build and append admin room response PDU: \"{e}\"");
165
-
166
-
let error_room_message = RoomMessageEventContent::text_plain(format!("Failed to build and append admin room PDU: \"{e}\"\n\nThe original admin command may have finished successfully, but we could not return the output."));
0 commit comments