matterhorn-chat / matterhorn

A feature-rich Unix terminal client for the Mattermost chat system
BSD 3-Clause "New" or "Revised" License
1.05k stars 77 forks source link

Unread messages indicator does not go to 0 #815

Closed marvinwankersteen closed 10 months ago

marvinwankersteen commented 1 year ago

Hey,

we have recently upgraded our mattermost server from 8.1.3 to 9.1.0.

Since then, we have had a lot of problems with matterhorn in terms of unread messages. It is also difficult to say exactly when or under what circumstances it happens.

Visually, Unread: 1 is displayed and the channel (I think it only happens in channels) is marked with the "unread"-color (cyan).

You can then also switch from another window to the unread channel with Alt+u. However, no new message will be displayed there with the New message-line. Even Alt+l does not change this.

The only thing that helps is if you write something new in the channel yourself. Then you can press Alt+l again and the unread messages are set to Unread: 0. The "unread"-color (cyan) of the channel then also is gone.

I have already looked in the matterhorn logfile to see if I can see anything there, but unfortunately not.

The mattermost webapp does not show unread messages.

If you need more information or you can tell us how to debug this better, please contact us.

We use:

matterhorn 50200.19.0 (master@6a28afd)
 using mattermost-api 50200.15.0 (HEAD@ba89670)

Kind regards Marven

jtdaugherty commented 1 year ago

Hi @marvinwankersteen - thanks for reporting this. We have also seen issues on 9 and above and have some fixes in the works. I don't know when they'll be ready for release, but if you're at all interested in building from source, the fixes are on the develop branch.

marvinwankersteen commented 1 year ago

Hi @jtdaugherty,

that was quick with the answer and of course I'm glad that you already have a fix! 😃 👍

I'll take a look at the build from develop.

Edit* Build is done. Now I run:

matterhorn 50200.19.0 (develop@00a6178)
 using mattermost-api 50200.15.0

I will inform you if the problem with this version is gone.

geirskjo commented 1 year ago

Have the same problem. To me it seems to be related to people leaving (and possibly joining) channels as well.

marvinwankersteen commented 1 year ago

Have the same problem. To me it seems to be related to people leaving (and possibly joining) channels as well.

I can confirm that. That was also the first time I noticed it.

Since the test with the develop branch, I have not noticed any more problems. Previously, I had to keep switching back and forth between the teams because the unread messages "hung up".

Now I can switch cleanly without false messages. Looks good. 👍

thlc commented 1 year ago

I've compiled and tested develop and can confirm that it fixed the issue for me! Thanks!

lambdatronic commented 12 months ago

Hi folks,

I've been using Matterhorn daily for the past few years, and it's been a great experience. However, a few months back, my company upgraded our Mattermost server to 9.0.0, and suddenly channels are no longer correctly marked as being unread in the Matterhorn client. It looks like this is the conversation thread for debugging this issue, so hopefully you'll be able to figure out what it going wrong on my end.

I see that a few posters above said that the unread indicator issue was fixed on the develop branch of this repository. I tried checking it out and building it locally, but I get this compile-time error on commit 00a61782979b8eb4b71ecbba0a2eaf84a2f565d0. Is this a known error, and if so, how do we get it fixed?

running "runhaskell Setup.hs" with command "build" and parameters ()
Preprocessing library for matterhorn-50200.19.0..
Building library for matterhorn-50200.19.0..
[  1 of 123] Compiling Matterhorn.Prelude
[  2 of 123] Compiling Matterhorn.IOUtil
[  3 of 123] Compiling Matterhorn.Emoji
[  4 of 123] Compiling Matterhorn.Constants
[  5 of 123] Compiling Matterhorn.Config.Schema
[  6 of 123] Compiling Matterhorn.TimeUtils
[  7 of 123] Compiling Matterhorn.Types.Common
[  8 of 123] Compiling Matterhorn.Types.DirectionalSeq
[  9 of 123] Compiling Matterhorn.Types.NonemptyStack
[ 10 of 123] Compiling Matterhorn.Types.RichText
[ 11 of 123] Compiling Matterhorn.Types.Posts
[ 12 of 123] Compiling Matterhorn.Types.Core
[ 13 of 123] Compiling Matterhorn.Types.Messages
[ 14 of 123] Compiling Matterhorn.Types.TabbedWindow
[ 15 of 123] Compiling Matterhorn.Types.Users
[ 16 of 123] Compiling Matterhorn.Types.EditState
[ 17 of 123] Compiling Matterhorn.Types.MessageInterface
[ 18 of 123] Compiling Matterhorn.Types.Channels

src/Matterhorn/Types/Channels.hs:129:52: error:
    • Couldn't match type ‘Integer’ with ‘Int’
      Expected: ChannelMember -> Int
        Actual: ChannelMember -> Integer
    • In the first argument of ‘to’, namely ‘channelMemberMsgCount’
      In the second argument of ‘(^.)’, namely ‘to channelMemberMsgCount’
      In the ‘_cdViewedMessageCount’ field of a record
    |
129 |           , _cdViewedMessageCount = chanMember^.to channelMemberMsgCount
    |                                                    ^^^^^^^^^^^^^^^^^^^^^
jtdaugherty commented 12 months ago

@lambdatronic What commit is your submodules/mattermost-api submodule directory pointing to?

lambdatronic commented 11 months ago

@jtdaugherty I'm using mattermost-api 50200.15.0 from hackage.

jtdaugherty commented 11 months ago

@lambdatronic you'll need to update the submodules with git submodule update --init. See the instructions here in general.

jtdaugherty commented 10 months ago

Matterhorn 90000.0.0 was released today and it ought to address issues like the one in this ticket. Please open a new ticket if you run into anything!