Forum: typing notices, smileys to emoji while typing, no emoji tray

"Holdfény gépel…" shows in threads and private conversations: the page
says over the live connection (every few seconds while typing) that its
member types, and the forum service passes it to those who may see that
place, never back to the typer. The emoji tray is gone (phones have their
emoji keyboard); character smileys turn into emoji as they are typed,
from a longer list shared with the server (which also converts titles
now; <3 is a red heart). Emoji show in colour: the forum's font stack
names the systems' colour emoji fonts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
feco
2026-11-26 11:50:09 +00:00
co-authored by Claude Opus 5.5
parent 2cf7266fc1
commit ee16974c77
15 changed files with 402 additions and 159 deletions
+14 -2
View File
@@ -529,7 +529,7 @@ async fn profiles_share_signs_never_degrees(pool: PgPool) {
profile["member"]["author"]["signs"],
json!({"sun": "pisces", "moon": "cancer", "venus": "aries", "ascendant": "virgo"})
);
assert_eq!(profile["member"]["bio"], "Szia 🤍");
assert_eq!(profile["member"]["bio"], "Szia ❤️");
assert!(!profile.to_string().contains("longitude") && !profile.to_string().contains("345"));
let (status, _) = app
.call("PUT", "/v1/forum/me", Some(&anna), json!({ "nickname": "Csendesvíz", "bio": "www.gyogyitas.hu" }))
@@ -667,7 +667,7 @@ async fn private_messages_start_with_a_request(pool: PgPool) {
.call("POST", &format!("/v1/forum/conversations/{id}/messages"), Some(&anna), json!({"body": "Hahó <3"}))
.await;
assert_eq!(status, StatusCode::CREATED);
assert_eq!(msg["body"], "Hahó 🤍");
assert_eq!(msg["body"], "Hahó ❤️");
assert_eq!(app.get("/v1/forum/nav", Some(&bea)).await["messages"], 1);
let shown = app.get(&format!("/v1/forum/conversations/{id}"), Some(&bea)).await;
assert_eq!(shown["conversation"]["state"], "accepted");
@@ -896,6 +896,18 @@ async fn live_doorbell_over_websocket(pool: PgPool) {
}
}
assert_eq!(heard, vec![format!(r#"{{"id":{thread},"t":"thread"}}"#), r#"{"t":"nav"}"#.to_string()]);
// Anna types in the thread: Bea, there too, sees it; Anna does not hear of herself.
use futures_util::SinkExt;
let (mut bea_ws, _) =
tokio_tungstenite::connect_async(request(&bea.token, Some("https://sorsfonalak.test"))).await.unwrap();
tokio::time::sleep(std::time::Duration::from_millis(200)).await;
let typing = format!(r#"{{"typing":"thread","id":{thread}}}"#);
ws.send(tokio_tungstenite::tungstenite::Message::Text(typing.into())).await.unwrap();
let seen = tokio::time::timeout(std::time::Duration::from_secs(5), futures_next(&mut bea_ws)).await.unwrap();
assert_eq!(seen, Some(format!(r#"{{"id":{thread},"kind":"thread","t":"typing","who":"Csendesvíz"}}"#)));
let echo = tokio::time::timeout(std::time::Duration::from_millis(500), futures_next(&mut ws)).await;
assert!(echo.is_err(), "no echo of one's own typing");
}
/// The next text message of a test WebSocket.