Upgrade conduit from 0.6 to next

This commit is contained in:
Natsu Kagami 2023-11-07 13:48:55 +01:00
parent 7d71caa8db
commit 2693126dca
Signed by: nki
GPG key ID: 55A032EB38B49ADB
5 changed files with 47 additions and 10 deletions

View file

@ -31,16 +31,16 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1691686916, "lastModified": 1694631477,
"narHash": "sha256-TpNssMHvSKcxJMas5lQNWEbIv09u4/niBN2C27Mp0JY=", "narHash": "sha256-35SgWnBkWTyyRwVPyUKoShjzXfX0H1+HDdEEjZ/LsXc=",
"owner": "famedly", "owner": "famedly",
"repo": "conduit", "repo": "conduit",
"rev": "0c2cfda3ae923d9e922d5edf379e4d8976a52d4e", "rev": "3bfdae795d4d9ec9aeaac7465e7535ac88e47756",
"type": "gitlab" "type": "gitlab"
}, },
"original": { "original": {
"owner": "famedly", "owner": "famedly",
"ref": "v0.6.0", "ref": "next",
"repo": "conduit", "repo": "conduit",
"type": "gitlab" "type": "gitlab"
} }

View file

@ -39,7 +39,7 @@
}; };
dtth-phanpy.url = "git+ssh://gitea@git.dtth.ch/nki/phanpy"; dtth-phanpy.url = "git+ssh://gitea@git.dtth.ch/nki/phanpy";
conduit = { conduit = {
url = gitlab:famedly/conduit/v0.6.0; url = gitlab:famedly/conduit/next;
inputs.nixpkgs.follows = "nixpkgs-unstable"; inputs.nixpkgs.follows = "nixpkgs-unstable";
}; };
eza.url = github:eza-community/eza/v0.12.0; eza.url = github:eza-community/eza/v0.12.0;

View file

@ -138,9 +138,14 @@ with lib;
})) }))
]; ];
}; };
extraConfig =
# Enable CORS from anywhere since we want all clients to find us out # Enable CORS from anywhere since we want all clients to find us out
extraConfig = '' ''
add_header 'Access-Control-Allow-Origin' "*"; add_header 'Access-Control-Allow-Origin' "*";
'' +
# Force returning values to be JSON data
''
default_type application/json;
''; '';
}) })
cfg.instances; cfg.instances;

View file

@ -29,7 +29,11 @@ let
sway = prev.sway.override { sway-unwrapped = final.swayfx-unwrapped; }; sway = prev.sway.override { sway-unwrapped = final.swayfx-unwrapped; };
deploy-rs = inputs.deploy-rs.packages.default; deploy-rs = inputs.deploy-rs.packages.default;
dtth-phanpy = inputs.dtth-phanpy.packages.${final.system}.default; dtth-phanpy = inputs.dtth-phanpy.packages.${final.system}.default;
matrix-conduit = inputs.conduit.packages.${final.system}.default; matrix-conduit = inputs.conduit.packages.${final.system}.default.overrideAttrs (attrs: {
patches = (if "patches" ? attrs then attrs.patches else [ ]) ++ [
./overlays/conduit-remove-dbg.patch
];
});
exa = inputs.eza.packages.${final.system}.default.overrideAttrs (attrs: { exa = inputs.eza.packages.${final.system}.default.overrideAttrs (attrs: {
postInstall = attrs.postInstall + '' postInstall = attrs.postInstall + ''
ln -sv $out/bin/eza $out/bin/exa ln -sv $out/bin/eza $out/bin/exa

View file

@ -0,0 +1,28 @@
diff --git a/src/api/client_server/sync.rs b/src/api/client_server/sync.rs
index a275b06..ed4e5c6 100644
--- a/src/api/client_server/sync.rs
+++ b/src/api/client_server/sync.rs
@@ -1172,7 +1172,6 @@ fn share_encrypted_room(
pub async fn sync_events_v4_route(
body: Ruma<sync_events::v4::Request>,
) -> Result<sync_events::v4::Response, RumaResponse<UiaaResponse>> {
- dbg!(&body.body);
let sender_user = body.sender_user.expect("user is authenticated");
let sender_device = body.sender_device.expect("user is authenticated");
let mut body = body.body;
@@ -1689,7 +1688,7 @@ pub async fn sync_events_v4_route(
let _ = tokio::time::timeout(duration, watcher).await;
}
- Ok(dbg!(sync_events::v4::Response {
+ Ok(sync_events::v4::Response {
initial: globalsince == 0,
txn_id: body.txn_id.clone(),
pos: next_batch.to_string(),
@@ -1744,5 +1743,5 @@ pub async fn sync_events_v4_route(
},
},
delta_token: None,
- }))
+ })
}