Reimplement compose and add tiling windows
This commit is contained in:
@@ -11,6 +11,7 @@ from core.realtime.typing_state import get_person_typing_state
|
||||
from core.views.compose import (
|
||||
COMPOSE_WS_TOKEN_SALT,
|
||||
ComposeHistorySync,
|
||||
_render_compose_message_rows,
|
||||
_serialize_messages_with_artifacts,
|
||||
)
|
||||
|
||||
@@ -78,6 +79,7 @@ def _load_since(user_id, service, identifier, person_id, after_ts, limit):
|
||||
if not session_ids:
|
||||
return {
|
||||
"messages": [],
|
||||
"messages_html": "",
|
||||
"last_ts": int(after_ts or 0),
|
||||
"person_id": int(person.id) if person is not None else 0,
|
||||
}
|
||||
@@ -140,13 +142,16 @@ def _load_since(user_id, service, identifier, person_id, after_ts, limit):
|
||||
if str(value or "").strip()
|
||||
}
|
||||
|
||||
serialized_messages = _serialize_messages_with_artifacts(
|
||||
rows,
|
||||
counterpart_identifiers=counterpart_identifiers,
|
||||
conversation=conversation,
|
||||
seed_previous=seed_previous,
|
||||
)
|
||||
|
||||
return {
|
||||
"messages": _serialize_messages_with_artifacts(
|
||||
rows,
|
||||
counterpart_identifiers=counterpart_identifiers,
|
||||
conversation=conversation,
|
||||
seed_previous=seed_previous,
|
||||
),
|
||||
"messages": serialized_messages,
|
||||
"messages_html": _render_compose_message_rows(serialized_messages),
|
||||
"last_ts": int(newest or after_ts or 0),
|
||||
"person_id": int(effective_person_id),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user