Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Fix wall and social lint failures

Anand Baburajanfba376d77854
diff --git a/rust/e2e/tests/support/mod.rs b/rust/e2e/tests/support/mod.rs
index a1365c2c4c..e4824f0d48 100644
--- a/rust/e2e/tests/support/mod.rs
+++ b/rust/e2e/tests/support/mod.rs
@@ -1,7 +1,6 @@
pub mod auth;
pub mod contacts;
pub mod legacy;
-pub mod wall;
use uuid::Uuid;
diff --git a/rust/e2e/tests/wall_e2e.rs b/rust/e2e/tests/wall_e2e.rs
index f2699c8540..507b843357 100644
--- a/rust/e2e/tests/wall_e2e.rs
+++ b/rust/e2e/tests/wall_e2e.rs
@@ -1,8 +1,10 @@
mod support;
+#[path = "support/wall.rs"]
+mod wall;
use ente_wall::{OpenWallLinkCtxInput, WallLinkCtx, WallNotificationType};
-use support::{auth, wall};
+use support::auth;
#[tokio::test]
#[ignore = "requires local Museum at ENTE_E2E_ENDPOINT or http://localhost:8080"]
diff --git a/server/wall/repo/common.go b/server/wall/repo/common.go
index 02624bae67..da3a1a1bee 100644
--- a/server/wall/repo/common.go
+++ b/server/wall/repo/common.go
@@ -12,13 +12,6 @@ func normalizeSlug(input string) string {
return strings.ToLower(strings.TrimSpace(input))
}
-func boolToInt64(value bool) int64 {
- if value {
- return 1
- }
- return 0
-}
-
func nullString(value string) sql.NullString {
value = strings.TrimSpace(value)
if value == "" {
diff --git a/server/wall/repo/module_test.go b/server/wall/repo/module_test.go
index dab1a660ef..abadbe6c80 100644
--- a/server/wall/repo/module_test.go
+++ b/server/wall/repo/module_test.go
@@ -154,7 +154,7 @@ func TestWallModuleLifecycle(t *testing.T) {
post, err := module.Posts.GetPost(ctx, postID, bobID)
require.NoError(t, err)
- require.Equal(t, "alice", post.Author)
+ require.Equal(t, "alice", post.Author.WallSlug)
err = module.Posts.SetLike(ctx, postID, bobID, true)
require.NoError(t, err)
diff --git a/web/apps/social/src/screens/NotificationsScreen.tsx b/web/apps/social/src/screens/NotificationsScreen.tsx
index ad2744a435..2a73a22a3b 100644
--- a/web/apps/social/src/screens/NotificationsScreen.tsx
+++ b/web/apps/social/src/screens/NotificationsScreen.tsx
@@ -254,7 +254,9 @@ const NotificationRow: React.FC<NotificationRowProps> = ({
component="button"
type="button"
aria-label={`Open ${actorFirstName}'s profile`}
- onClick={() => onOpenFriend?.(notification.actor.id)}
+ onClick={() =>
+ onOpenFriend?.(notification.actor.id)
+ }
sx={{
appearance: "none",
alignItems: "center",
@@ -324,7 +326,9 @@ const NotificationRow: React.FC<NotificationRowProps> = ({
component="button"
type="button"
aria-label={`Open ${actorFirstName}'s profile`}
- onClick={() => onOpenFriend?.(notification.actor.id)}
+ onClick={() =>
+ onOpenFriend?.(notification.actor.id)
+ }
sx={{
appearance: "none",
bgcolor: "transparent",
diff --git a/web/packages/wasm/src/wall.rs b/web/packages/wasm/src/wall.rs
index 7fc6d5f5b1..7c2e19505b 100644
--- a/web/packages/wasm/src/wall.rs
+++ b/web/packages/wasm/src/wall.rs
@@ -222,9 +222,7 @@ struct FriendJs {
}
fn decode_b64_field(value: &str) -> Result<Vec<u8>, WasmWallError> {
- decode_b64(value)
- .map_err(CoreWallError::from)
- .map_err(Into::into)
+ decode_b64(value).map_err(Into::into)
}
fn utf8_field(bytes: Vec<u8>, field: &str) -> Result<String, WasmWallError> {