invertase / notifee

⚛️ A feature rich notifications library for React Native.
https://notifee.app
Apache License 2.0
1.88k stars 228 forks source link

Subtitle (and title) notification attributes don't seem to work with communication notification #889

Closed kevinmcalear closed 12 months ago

kevinmcalear commented 1 year ago

Hello, I have followed the PR https://github.com/invertase/notifee/pull/526 from @helenaford and set up Communication Notifications. Thank you so much @helenaford 🥳

The only problem I'm running into is that I want a subtitle to display. I'm using communication notifications primarily for group chats and want to follow the same layout as a WhatsApp group chat notification. I've gotten around this by putting a \n at the start of the body text which leaves an unbolded "subtitle" workaround for now. Any ideas why subtitle might not be displaying properly?

IMG_2733

await notifee.displayNotification({
      id: 'communication-id',
      body: 'Your Team\nMain body content of the notification', // <---- using \n as a workaround 
      title: 'Why you no work', // <--- this doesn't work
      subtitle: 'Your Team', // <---- this doesn't work either
      ios: {
        categoryId: 'communicationId',
        communicationInfo: {
          conversationId: '123',
          sender: {
            id: 'abcde',
            avatar: 'https://avatars.githubusercontent.com/u/******?v=4',
            displayName: 'B****** ******d', 
          },
        },
      },
    });  

Thanks!

Darren120 commented 1 year ago

you need to implement it on the native level

github-actions[bot] commented 1 year ago

Hello 👋, to help manage issues we automatically close stale issues.

This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?

This issue will be closed in 15 days if no further activity occurs.

Thank you for your contributions.

focux commented 8 months ago

Did you find out how to do this? I'm trying to display a subtitle with comm notifications and it's not working.

Edit Just opened a PR to add support for this feature https://github.com/invertase/notifee/pull/1017