Franz: [FB Messenger] Notification title from group chat showing up as [object Object]

Created on 24 Oct 2017  路  8Comments  路  Source: meetfranz/franz

bug: when I'm in a Facebook group chat, the desktop notification name of the group/person will show up as [object Object]

Expected Behavior

Notification title should show up as the name of the group chat, or the name of the user who posted the message

Current Behavior

Notification title shows up as [object Object]

Screenshots (if appropriate):

example

Possible Solution

not sure?

Steps to Reproduce (for bugs)

  1. Create a group chat with 3 or more participants
  2. Receive a message in the group chat (with desktop notifications turned on)

Context

Can't see sender/group name of message

Your Environment

  • Franz Version used: 5.0.0-beta.10
  • Operating System and version: macOS 10.13 (17A405) High Sierra
bug help wanted

Most helpful comment

I need to do a few more checks but we might just need to optimize the messenger recipe a little further. The update will be rolled out automatically without a necessary client update. Just expect that notifications will work as expected sometime soon. ;)

All 8 comments

In AppStore.js#143 we need to check what the title is to send the correct notification.

Franz 4 is showing the same problem. Did the messenger change something?

Debug point: webview/notification.js#12

This is the notification that messenger is sending:

image

MDN says the title should be a DOMString: https://developer.mozilla.org/en-US/docs/Web/API/notification/title :confused:

If this is a specific case for this recipe, a specific notification parser should be used (maybe defined in the recipe's webview.js)

@GustavoKatel You are right, thats a great idea.

On top, in ServiceStore.js@_handleIPCMessage() we should add a check if the value for title and text is anything else than a string to provide fallback values.

Is there something specific you want to take care of?

@adlk I agree with the fallback values. I can create a PR covering the checkboxes :+1:

PS.: By meetfranz/recipe, you mean meetfranz/plugins ?

[x] Add additional checks in ServiceStore
[x] Add onNotify to docs in www.github.com/meetfranz/recipe
[x] Update the messenger recipe

I hope everything is ok :) Otherwise, let me know

Updated to the latest 5.0.0-beta.12 on macOS 10.12.6 and FB Messenger group chat notifications stopped showing up as [object Object] like in previous builds, but instead are just plain empty.

screen shot 2017-11-06 at 5 45 30 pm

I need to do a few more checks but we might just need to optimize the messenger recipe a little further. The update will be rolled out automatically without a necessary client update. Just expect that notifications will work as expected sometime soon. ;)

Was this page helpful?
0 / 5 - 0 ratings