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, May 9, 5:21 PM
Unknown Object (File)
Thu, May 9, 5:21 PM
Unknown Object (File)
Thu, May 9, 5:21 PM
Unknown Object (File)
Thu, May 2, 3:36 PM
Unknown Object (File)
Thu, May 2, 3:33 PM
Unknown Object (File)
Thu, May 2, 3:13 PM
Unknown Object (File)
Apr 8 2024, 7:04 AM
Unknown Object (File)
Mar 28 2024, 12:54 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.