mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 04:53:36 +00:00
frontend: Use topic on message.
This seems like a small change (apart from all the test changes), but it fundamentally changes how the app finds "topic" on message objects. Now all code that used to set "subject" now sets "topic" on message-like objects. We convert incoming messages to have topic, and we write to "topic" all the way up to hitting the server (which now accepts "topic" on incoming endpoints). We fall back to subject as needed, but the code will emit a warning that should be heeded--the "subject" field is prone to becoming stale for things like topic changes.
This commit is contained in:
@@ -147,10 +147,10 @@ run_test('test_unread_logic', () => {
|
||||
assert.deepEqual(history, ['toPic1', 'topic2']);
|
||||
|
||||
const msgs = [
|
||||
{ id: 150, subject: 'TOPIC2' }, // will be ignored
|
||||
{ id: 61, subject: 'unread1' },
|
||||
{ id: 60, subject: 'unread1' },
|
||||
{ id: 20, subject: 'UNREAD2' },
|
||||
{ id: 150, topic: 'TOPIC2' }, // will be ignored
|
||||
{ id: 61, topic: 'unread1' },
|
||||
{ id: 60, topic: 'unread1' },
|
||||
{ id: 20, topic: 'UNREAD2' },
|
||||
];
|
||||
|
||||
_.each(msgs, (msg) => {
|
||||
|
||||
Reference in New Issue
Block a user