gpt4 book ai didi

javascript - Firebase 通知重复消息

转载 作者:行者123 更新时间:2023-11-30 20:35:38 33 4
gpt4 key购买 nike

我遇到了一个严重的问题,我收到了多个推送通知。我发现它生成了很多注册 token 。这些 token 是由同一个人制作的,使用相同的桌面,在相同的网络域中。我尝试向这些 token 发送测试消息。这些 token 有效。

/* 1 */
{
"_id" : ObjectId("5ab330e1a8dbc4623df77853"),
"token" : "d8DtmhvF4_c:APA91bEaGFkn-g2B0-dpOIxfgrvfVbXiB-mLiRPaVfQpGlo4vSYC_FHJfnyQWzLnYmU9CWHqpX1rx1nR7YM7msd5umooOXPXS3dHY9QdQl0NlIkdJ8HQJth1NKPTMy7DhV9HPFrBDQvm",
"agent" : "mozilla/5.0 (windows nt 6.1; win64; x64) applewebkit/537.36 (khtml, like gecko) chrome/65.0.3325.181 safari/537.36",
"status" : "enable",
"session" : "89196faa-df82-1e0f-b36b-2854ed3c7b95",
"time" : "2018-03-22 12:28:17"
}

/* 2 */
{
"_id" : ObjectId("5ab9b593403ab4ac0f777a63"),
"token" : "fu-CQUJz8VA:APA91bEn0L-U14Nz0x9nw-Ck3UXbT6CeXpYJZTFBPYCfRH3eGyez3__O6GzA_isY_M_tJiKgofIXrrfhc66tBtiv1ffZ34kuQTe8Qh8oDg43zNo1HSJbQebR1WuMm3P7i28RROTaUpC2",
"agent" : "mozilla/5.0 (windows nt 6.1; win64; x64) applewebkit/537.36 (khtml, like gecko) chrome/65.0.3325.181 safari/537.36",
"session" : "89196faa-df82-1e0f-b36b-2854ed3c7b95",
"status" : "enable",
"time" : "2018-03-27 11:08:03"
}

/* 3 */
{
"_id" : ObjectId("5abc6b6ebf33dee27bc0ccd5"),
"token" : "d8DtmhvF4_c:APA91bFUSmTLhe5RHwPBkpUIZCsqzxBjH7yf6HBcmj709xZVG8LaJ07XZTbIZrumb2rKXJ_V9IM6ez6rSKuZqT6iuwRScNEzNQ_CS3Kvcwgp4xrf2VHkYVF5uW7gzF3tq7_izdxwYvvl",
"agent" : "mozilla/5.0 (windows nt 6.1; win64; x64) applewebkit/537.36 (khtml, like gecko) chrome/65.0.3325.181 safari/537.36",
"status" : "enable",
"session" : "89196faa-df82-1e0f-b36b-2854ed3c7b95",
"time" : "2018-03-29 12:28:30"
}

/* 4 */
{
"_id" : ObjectId("5acab503a94c4152379c6983"),
"token" : "d8DtmhvF4_c:APA91bFKKQox-DMLej4Mf2zdUfpE3MR0ew48i7lJ-iX7mMskp4KhCJPIhzYsTH88YZXC2FhkLJuUBOsa086Z5OLZ-jU0XFRJz4i2BJI5gWxVa5Npkd5fLsWo4t2nBTdNOZra0SD0gdXb",
"agent" : "mozilla/5.0 (windows nt 6.1; win64; x64) applewebkit/537.36 (khtml, like gecko) chrome/65.0.3325.181 safari/537.36",
"status" : "enable",
"session" : "89196faa-df82-1e0f-b36b-2854ed3c7b95",
"time" : "2018-04-09 08:34:11"
}

/* 5 */
{
"_id" : ObjectId("5ad3efbeb98df3232dfc7fb3"),
"token" : "d8DtmhvF4_c:APA91bHsynAV6riwAF4statZxwMt5YJUN19zCd44HRoxp9AOoLwCTG4yrq-aX5UA7ik1UB2H5l30GIYXSqaAqcOYQwyio4jMZF7-SeJ-KR6_LtqlIVNQOuRrvWpW5EAnjWyyhrX3A3rh",
"agent" : "mozilla/5.0 (windows nt 6.1; win64; x64) applewebkit/537.36 (khtml, like gecko) chrome/65.0.3325.181 safari/537.36",
"status" : "enable",
"session" : "89196faa-df82-1e0f-b36b-2854ed3c7b95",
"time" : "2018-04-16 08:35:10"
}

有什么建议对我有帮助吗?

最佳答案

这是 Firebase 中的一个错误。我们最近修复了它,它不应该再发生了。只要 token 有效,SDK 就会一直使用同一个 token ,除非当前 token 被撤销,否则不会生成额外的 token 。

由于之前生成的 token 仍然有效,您必须从服务器中删除额外的 token (来自同一用户)。

关于javascript - Firebase 通知重复消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49869904/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com