For now? I'm experimenting on an old concept.
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Client: Request posts by ID

+12 -3
+12 -3
client/src/lumina_client.gleam
··· 723 723 <> bool.to_string(has_more) 724 724 <> ").", 725 725 ) 726 - let assert model_type.WsConnectionConnected(_socket) = model.ws 726 + let assert model_type.WsConnectionConnected(socket) = model.ws 727 727 as "Socket not connected" 728 728 let posts_fetches = 729 729 effect.batch( 730 730 list.map(items, fn(post_id) { 731 - let do_to = "Request post with id " <> post_id <> " here" 732 - todo as do_to 731 + PostContentRequest(post_id:) 732 + |> encode_ws_msg 733 + |> json.to_string 734 + |> lustre_websocket.send(socket, _) 733 735 }), 734 736 ) 735 737 ··· 898 900 // Password only once? Yes, the equal password check is done in the view/update themselves. 899 901 password: String, 900 902 ) 903 + PostContentRequest(post_id: String) 901 904 } 902 905 903 906 fn encode_ws_msg(message: WsMsgFromClient) -> json.Json { ··· 931 934 #("by_name", json.string(timeline_name)), 932 935 #("page", json.int(page)), 933 936 ]) 937 + PostContentRequest(post_id:) -> { 938 + json.object([ 939 + #("type", json.string("post_view_request")), 940 + #("post_id", json.string(post_id)), 941 + ]) 942 + } 934 943 } 935 944 } 936 945