我正在使用Google推送通知与Google PubSub,并有一个自定义标签,我想监视任何更改.我使用以下代码为标签注册手表(标签的标识为Label_1)
WatchRequest wr = new WatchRequest();
wr.TopicName = "projects/" + primaryLink.ggProjectId + "/topics/iLink" + segmentId;
if (labels != null && labels.Count > 0)
{
wr.LabelIds = new List<string>();
wr.LabelIds.Add("Label_1");
wr.LabelFilterAction = "include";
}
WatchResponse wrr = gs.Users.Watch(wr, emailAccount).Execute();
return "HistoryId " + wrr.HistoryId.ToString();
Run Code Online (Sandbox Code Playgroud)
}
手表注册正常.问题是我收到任何Gmail更改的推送通知,而不仅仅是标签下的更改.
是否支持自定义标签?
gmail-api ×1