Kaynağa Gözat

feat: /start carries git_identity {name, email} from the saddle row — omitted entirely when unset so the daemon's fallback identity applies

clanker 1 ay önce
ebeveyn
işleme
b878a9178c
1 değiştirilmiş dosya ile 16 ekleme ve 0 silme
  1. 16 0
      src/Services/SaddleService.vala

+ 16 - 0
src/Services/SaddleService.vala

@@ -1010,6 +1010,22 @@ namespace ClankerSaddle.Services {
                 }
             }
 
+            // The wire contract's `git_identity` addition (plan 9): the
+            // name/email the daemon commits as, from the saddle row.
+            // Omitted entirely when unset so the daemon's fallback
+            // identity applies.
+            string identity_name = saddle.git_name ?? "";
+            string identity_email = saddle.git_email ?? "";
+            if (identity_name.length > 0 || identity_email.length > 0) {
+                payload.set_member_name("git_identity");
+                payload.begin_object();
+                payload.set_member_name("name");
+                payload.add_string_value(identity_name);
+                payload.set_member_name("email");
+                payload.add_string_value(identity_email);
+                payload.end_object();
+            }
+
             // The wire contract's `resume_notice` addition: on a
             // workspace-adopting start (a suspended parent's resume), the
             // daemon injects it as the next user turn instead of the