MM-56071: Track multiple threads (#25775)

We can have 2 types of threads open at the same time. One from
the thread view, and another from RHS.

We add another variable to distinguish between the 2 states.

In future, if we have the ability for more than 2 threads, then
we would need to track by threadID.

https://mattermost.atlassian.net/browse/MM-56071

```release-note
NONE
```
Этот коммит содержится в:
Agniva De Sarker
2023-12-21 08:42:58 +05:30
коммит произвёл GitHub
родитель 3f2351c71f
Коммит 7dcf5f85a5
7 изменённых файлов: 48 добавлений и 24 удалений

Просмотреть файл

@@ -441,7 +441,12 @@ func TestWebSocketPresence(t *testing.T) {
require.Nil(t, resp.Error)
require.Equal(t, resp.SeqReply, wsClient.Sequence-1, "bad sequence number")
wsClient.UpdateActiveThread("threadID")
wsClient.UpdateActiveThread(true, "threadID")
resp = <-wsClient.ResponseChannel
require.Nil(t, resp.Error)
require.Equal(t, resp.SeqReply, wsClient.Sequence-1, "bad sequence number")
wsClient.UpdateActiveThread(false, "threadID")
resp = <-wsClient.ResponseChannel
require.Nil(t, resp.Error)
require.Equal(t, resp.SeqReply, wsClient.Sequence-1, "bad sequence number")