Page MenuHomePhabricator

[services] Tunnelbroker - Changes to handle empty `message_id` inside the Rust `send_by_fcm_client` function
AbandonedPublic

Authored by max on Sep 6 2022, 6:51 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jan 9, 7:00 AM
Unknown Object (File)
Sun, Jan 5, 11:09 AM
Unknown Object (File)
Sun, Jan 5, 11:09 AM
Unknown Object (File)
Sun, Dec 15, 10:17 AM
Unknown Object (File)
Sun, Dec 15, 10:16 AM
Unknown Object (File)
Sun, Dec 15, 10:11 AM
Unknown Object (File)
Dec 3 2024, 11:46 PM
Unknown Object (File)
Nov 26 2024, 8:46 PM

Details

Summary

This diff introduces following changes to the Rust send_by_fcm_client function:

  • As we don't use message_id anywhere at the upper level we should not return it;
  • Properly handling errors by checking the results vector instead of the upper level only.

Related Linear task: ENG-1740

Test Plan
  1. Successfully built using Docker.
  2. Successfully call the function from C++:
#include "cxxbridge_code/src/lib.rs.h"
#include "rust/cxx.h
...
const std::string server_key = argv[1];
const std::string device_token = argv[2];
const std::string message_title = argv[3];
const std::string message_body = argv[4];
sendNotifToFCM(server_key, device_token, message_title, message_body);

Diff Detail

Repository
rCOMM Comm
Branch
void-for-fcm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

max held this revision as a draft.
max published this revision for review.Sep 6 2022, 6:57 AM
max edited the summary of this revision. (Show Details)
max edited the test plan for this revision. (Show Details)
max added reviewers: karol, tomek, varun.

We really need to get a test suite going, these test plans should just be a CI check

Abandon due to ENG-1764: Distinguish common and wrong/expired device token errors in Rust notification library.