Explicitly process reaction notifications as unsupported.

This commit is contained in:
levlam 2022-05-26 17:23:52 +03:00
parent a90dd653af
commit 43e51f8f65

View File

@ -3201,7 +3201,7 @@ Status NotificationManager::process_push_notification_payload(string payload, bo
return Status::Error("Receive wrong chat type");
}
if (begins_with(loc_key, "CHAT_MESSAGE") || loc_key == "CHAT_ALBUM") {
if (begins_with(loc_key, "CHAT_MESSAGE") || begins_with(loc_key, "CHAT_REACT") || loc_key == "CHAT_ALBUM") {
loc_key = loc_key.substr(5);
}
if (loc_args.empty()) {
@ -3232,6 +3232,11 @@ Status NotificationManager::process_push_notification_payload(string payload, bo
return Status::Error(406, "Phone call notification is not supported");
}
if (begins_with(loc_key, "REACT_")) {
// TODO REACT_* notifications
return Status::Error(406, "Reaction notifications are unsupported");
}
loc_key = convert_loc_key(loc_key);
if (loc_key.empty()) {
return Status::Error("Push type is unknown");