소스 검색

Amend field for topic to coincide with Zulip

Mark Rousskov 4 년 전
부모
커밋
a1bb2f6cff
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      src/zulip.rs

+ 3 - 2
src/zulip.rs

@@ -26,7 +26,8 @@ struct Message {
     sender_short_name: Option<String>,
     sender_full_name: String,
     stream_id: Option<u64>,
-    topic: Option<String>,
+    // The topic of the incoming message. Not the stream name.
+    subject: Option<String>,
     #[serde(rename = "type")]
     type_: String,
 }
@@ -663,7 +664,7 @@ async fn post_waiter(ctx: &Context, message: &Message) -> anyhow::Result<String>
             id: message.stream_id.ok_or_else(|| {
                 anyhow::format_err!("private waiting not supported, missing stream id")
             })?,
-            topic: message.topic.as_deref().ok_or_else(|| {
+            topic: message.subject.as_deref().ok_or_else(|| {
                 anyhow::format_err!("private waiting not supported, missing topic")
             })?,
         },