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)
Sat, Oct 26, 2:33 AM
Unknown Object (File)
Sat, Oct 26, 2:32 AM
Unknown Object (File)
Sat, Oct 26, 2:30 AM
Unknown Object (File)
Oct 21 2024, 12:26 PM
Unknown Object (File)
Oct 18 2024, 7:54 AM
Unknown Object (File)
Oct 16 2024, 11:38 PM
Unknown Object (File)
Oct 16 2024, 11:38 PM
Unknown Object (File)
Sep 27 2024, 2:20 AM

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.