We use push notifications for SendBird chats defined via push notification template: ‘Je hebt een nieuw bericht van XXXXXXX in {channel_name}’
When the user types a very long message 5000 characters. The message content of push notification is cropped (even if we don’t need to include the message text itself in the notification message):
{
"sentTime": 1615476004236,
"data": {
"sendbird": "{\"custom_type\":\"\",\"channel\":{\"channel_unread_message_count\":5,\"custom_type\":\"\",\"name\":\"Pavel 2\",\"channel_url\":\"68234bb6_c97a_4d4a_ade5_1dfdd52458b0\"},\"created_at\":1615476004027,\"message_id\":863360422,\"message\":\"abc def ghi jkl mno pqrs tuv wxyz ABC DEF GHI JKL MNO PQRS TUV WXYZ ! \\\"§ $%& \\/() =? * '<> |; ²³~ @`´ ©«» ¤¼× {} abc def ghi jkl mno pqrs tuv wxyz ABC DEF GHI JKL MNO PQRS TUV WXYZ ! \\\"§ $%& \\/() =? * '<> |; ²³~ @`´ ©«» ¤¼× {} abc def ghi jkl mno pqrs tuv wxyz ABC DEF GHI JKL MNO PQRS TUV WXYZ ! \\\"§ $%& \\/() =? * '<> |; ²³~ @`´ ©«» ¤¼× {} abc def ghi jkl mno pqrs tuv wxyz ABC DEF GHI JKL MNO PQRS TUV WXYZ ! \\\"§ $%& \\/() =? * '<> |; ²³~ @`´ ©«» ¤¼× {} abc def ghi jkl mno pqrs tuv wxyz ABC DEF GHI JKL MNO PQRS TUV WXYZ ! \\\"§ $%& \\/() =? * '<> |; ²³~ @`´ ©«» ¤¼× {} abc def ghi jkl mno pqrs tuv wxyz ABC DEF GHI JKL MNO PQRS TUV WXYZ ! \\\"§ $%& \\/() =? * '<> |; ²³~ @`´ ©«» ¤¼× {} abc def ghi jkl mno pqrs tuv wxyz ABC DEF GHI JKL MNO PQRS TUV WXYZ ! \\\"§ $%& \\/() =? * '<> |; ²³~ @`´ ©«» ¤¼× {} abc def ghi jkl mno pqrs tuv wxyz ABC DEF GHI JKL MNO PQRS TUV WXYZ ! \\\"§ $%& \\/() =? * '<> |; ²³~ @`´ ©«» ¤¼× {} abc def ghi jkl mno pqrs tuv wxyz ABC DEF GHI JKL MNO PQRS TUV WXYZ ! \\\"§ $%& \\/() =? * '<> |; ²³~ @`´ ©«» ¤¼× {} abc def ghi jkl mno pqrs tuv wxyz ABC DEF GHI JKL MNO PQRS TUV WXYZ ! \\\"§ $%& \\/() =? * '<> |; ²³~ @`´ ©«» ¤¼× {} abc def ghi jkl mno pqrs tuv wxyz ABC DEF GHI JKL MNO PQRS TUV WXYZ ! \\\"§ $%& \\/() =? * '<> |; ²³~ @`´ ©«» ¤¼× {} abc def ghi jkl mno pqrs tuv wxyz ABC DEF GHI JKL MNO PQRS TUV WXYZ ! \\\"§ $%& \\/() =? * '<> |; ²³~ @`´ ©«» ¤¼× {} abc def ghi jkl mno pqrs tuv wxyz ABC DEF GHI JKL MNO PQRS TUV WXYZ ! \\\"§ $%& \\/() =? * '<> |; ²³~ @`´ ©«» ¤¼× {} abc def ghi jkl mno pqrs tuv wxyz ABC DEF GHI JKL MNO PQRS TUV WXYZ ! \\\"§ $%& \\/() =? * '<> |; ²³~ @`´ ©«» ¤¼× {} abc def ghi jkl mno pqrs tuv wxyz ABC DEF GHI JKL MNO PQRS TUV WXYZ ! \\\"§ $%& \\/() =? * '<> |; ²³~ @`´ ©«» ¤¼× {} abc def ghi jkl mno pqrs tuv wxyz ABC DEF GHI JKL MNO PQRS TUV WXYZ ! \\\"§ $%& \\/() =? * '<> |; ²³~ @`´ ©«» ¤¼× {} abc def ghi jkl mno pqrs tuv wxyz ABC DEF GHI JKL MNO PQRS TUV WXYZ ! \\\"§ $%& \\/() =? * '<> |; ²³~ @`´ ©«» ¤¼× {} abc def ghi jkl mno pqrs tuv wxyz ABC DEF GHI JKL MNO PQRS TUV WXYZ ! \\\"§ $%& \\/() =? * '<> |; ²³~ @`´ ©«» ¤¼× {} abc def ghi jkl mno pqrs tuv wxyz ABC DEF GHI JKL MNO PQRS TUV WXYZ ! \\\"§ $%& \\/() =? * '<> |; ²³~ @`´ ©«» ¤¼× {} ...\",\"type\":\"MESG\",\"unread_message_count\":5,\"audience_type\":\"only\",\"sender\":{\"require_auth_for_profile_image\":false,\"profile_url\":\"\",\"name\":\"Pavel Zarecky\",\"id\":\"32489371-5142-41c0-99f4-c931aaca997e\"},\"push_sound\":\"default\",\"translations\":{},\"recipient\":{\"name\":\"p z\",\"push_template\":\"default\",\"id\":\"b0ab7639-efb2-4303-b0f1-b568e81ca26c\"},\"files\":[],\"category\":\"messaging:offline_notification\",\"channel_type\":\"group_messaging\",\"mentioned_users\":[],\"app_id\":\"REDACTED\"}",
"message": "Je hebt een nieuw b..."
},
"messageId": "0:16154xxxxxxxxxxxxxxxxxxxxx",
"ttl": 2419200,
"from": "12345xxxxxx"
}
We understand the FCM payload is limited, by why the message based on template is cropped. Why not to crop only the message text itself?