fix(messages): pins API returns array not object, remove alert() for empty pins
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
577d3df206
commit
bc4791f9b7
@ -1938,14 +1938,15 @@
|
||||
if (!state.currentConversationId) return;
|
||||
try {
|
||||
var data = await api('/api/conversations/' + state.currentConversationId + '/pins');
|
||||
var pins = data.pins || [];
|
||||
// API returns array directly, not {pins: [...]}
|
||||
var pins = Array.isArray(data) ? data : (data.pins || []);
|
||||
|
||||
if (!pins.length) {
|
||||
alert('Brak przypiętych wiadomości');
|
||||
Pins.updateBar(0);
|
||||
return;
|
||||
}
|
||||
|
||||
// Show pins in a simple list overlay
|
||||
// Show pins in a modal overlay
|
||||
var overlay = document.createElement('div');
|
||||
overlay.style.position = 'fixed';
|
||||
overlay.style.top = '0';
|
||||
|
||||
@ -245,7 +245,7 @@ window.__CSRF_TOKEN__ = '{{ csrf_token() }}';
|
||||
// Load conversations.js after data is set
|
||||
(function() {
|
||||
var s = document.createElement('script');
|
||||
s.src = '{{ url_for("static", filename="js/conversations.js") }}?v=3';
|
||||
s.src = '{{ url_for("static", filename="js/conversations.js") }}?v=4';
|
||||
document.body.appendChild(s);
|
||||
})();
|
||||
{% endblock %}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user