gnome-shell-extension-gsconnect icon indicating copy to clipboard operation
gnome-shell-extension-gsconnect copied to clipboard

Some coversations can't be selected

Open krzysdz opened this issue 3 years ago • 1 comments

Some messages (MMS and "type": 1 - I have just one such message and no idea what it is) have an empty addresses array. message.addresses[0].address is read in many places in /src/service/ui/messaging.js, but in my case the line 940 causes problems (addresses is thread[0].addresses):

https://github.com/GSConnect/gnome-shell-extension-gsconnect/blob/37994f2f12720d8adbe5c633210c930a2bbbaf67/src/service/ui/messaging.js#L939-L941

Because of that if the first message in thread is an MMS and addresses is empty, the thread can't be selected, because an exception is thrown:

kwi 24 15:36:08 gjs[4781]: JS ERROR: TypeError: addresses[0] is undefined
                           _setHeaderBar@/home/krzys/.local/share/gnome-shell/extensions/[email protected]/service/ui/messaging.js:940:25
                           set thread_id@/home/krzys/.local/share/gnome-shell/extensions/[email protected]/service/ui/messaging.js:923:14
                           _onThreadSelected@/home/krzys/.local/share/gnome-shell/extensions/[email protected]/service/ui/messaging.js:1045:13
                           @/home/krzys/.local/share/gnome-shell/extensions/[email protected]/service/daemon.js:727:17

krzysdz avatar Apr 24 '21 14:04 krzysdz

I have this exact same error. I use a group chat for work and this error prevents me from being able to use messaging on my PC.

skylord123 avatar Aug 02 '21 16:08 skylord123