Getstream.io如何在实时订阅中包含通知计数

时间:2016-08-06 06:23:30

标签: getstream-io

订阅通知Feed时,有没有办法从getstream实时订阅承诺提供的有效负载中获取看不见和未读的通知计数?如果没有,是否有计划在未来实施这一目标?

我知道我可以执行notificationFeed.get({limit: 0})来检索这些数据,但是,在我们当前的系统中,如果订阅有效负载附带计数,那将会更方便。

this.notificationFeed
    .subscribe((payload) => {
      console.log(payload)
    })
    .then(() => {
      //console.log('Full (Global Feed Flat): Connected to faye channel, waiting for realtime updates');
    }, (err) => {
      console.error('Full (Notification Feed): Could not establish faye connection', err);
    });

目前,当从通知Feed中回馈数据时,有效负载不包括未见或未读的计数。

1 个答案:

答案 0 :(得分:0)

实时通知有效内容不包括Feed的king@DESKTOP-US7LR7D MINGW64 ~/Desktop/_REPOS/misc (master) $ git fsck --full Checking object directories: 100% (256/256), done. error: bad object header1403/1404) error: unknown object type -1 at offset 12 in .git/objects/pack/pack-627dd5f8d19a0d3289d2dc5bb37e776aa845ae2f.pack error: cannot unpack 7884ba2578c7535a2e3b70d410f0286bd2e0016f from .git/objects/pack/pack-627dd5f8d19a0d3289d2dc5bb37e776aa845ae2f.pack at offset 12 Checking objects: 100% (1404/1404), done. king@DESKTOP-US7LR7D MINGW64 ~/Desktop/_REPOS/misc (master) $ rm -f .git/objects/pack/pack-627dd5f8d19a0d3289d2dc5bb37e776aa845ae2f.pack king@DESKTOP-US7LR7D MINGW64 ~/Desktop/_REPOS/misc (master) $ git fsck --full Checking object directories: 100% (256/256), done. Checking objects: 100% (1403/1403), done. missing blob 7884ba2578c7535a2e3b70d410f0286bd2e0016f king@DESKTOP-US7LR7D MINGW64 ~/Desktop/_REPOS/misc (master) $ git commit -m "trying again" . error: invalid object 100644 7884ba2578c7535a2e3b70d410f0286bd2e0016f for '3212703ED955F10C7534BE8497B221F4/tester/history/EURUSD1440_0.fxt' On branch master Your branch is ahead of 'origin/master' by 1 commit. (use "git push" to publish your local commits) nothing to commit, working directory clean king@DESKTOP-US7LR7D MINGW64 ~/Desktop/_REPOS/misc (master) $ git push -u origin master Counting objects: 70, done. Delta compression using up to 4 threads. Compressing objects: 100% (65/65), done. fatal: unable to read 7884ba2578c7535a2e3b70d410f0286bd2e0016f fatal: The remote end hung up unexpectedly fatal: The remote end hung up unexpectedly fatal: write error: Bad file descriptor error: failed to push some refs to 'https://yzpaul@bitbucket.org/yzpaul/misc-scripts.git' king@DESKTOP-US7LR7D MINGW64 ~/Desktop/_REPOS/misc (master) $ git fsck --full Checking object directories: 100% (256/256), done. Checking objects: 100% (1403/1403), done. missing blob 7884ba2578c7535a2e3b70d410f0286bd2e0016f king@DESKTOP-US7LR7D MINGW64 ~/Desktop/_REPOS/misc (master) $ git reflog expire --expire=now --all king@DESKTOP-US7LR7D MINGW64 ~/Desktop/_REPOS/misc (master) $ git push -u origin master Counting objects: 70, done. Delta compression using up to 4 threads. Compressing objects: 100% (65/65), done. fatal: unable to read 7884ba2578c7535a2e3b70d410f0286bd2e0016f fatal: The remote end hung up unexpectedly fatal: The remote end hung up unexpectedly fatal: write error: Bad file descriptor error: failed to push some refs to 'https://yzpaul@bitbucket.org/yzpaul/misc-scripts.git' king@DESKTOP-US7LR7D MINGW64 ~/Desktop/_REPOS/misc (master) $ git hash-object -w 7884ba2578c7535a2e3b70d410f0286bd2e0016f fatal: Cannot open '7884ba2578c7535a2e3b70d410f0286bd2e0016f': No such file or directory king@DESKTOP-US7LR7D MINGW64 ~/Desktop/_REPOS/misc (master) $ git prune king@DESKTOP-US7LR7D MINGW64 ~/Desktop/_REPOS/misc (master) $ git prune --expire=now king@DESKTOP-US7LR7D MINGW64 ~/Desktop/_REPOS/misc (master) $ git push -u origin master Counting objects: 70, done. Delta compression using up to 4 threads. Compressing objects: 100% (65/65), done. fatal: unable to read 7884ba2578c7535a2e3b70d410f0286bd2e0016f fatal: The remote end hung up unexpectedly fatal: The remote end hung up unexpectedly fatal: write error: Bad file descriptor error: failed to push some refs to 'https://yzpaul@bitbucket.org/yzpaul/misc-scripts.git' king@DESKTOP-US7LR7D MINGW64 ~/Desktop/_REPOS/misc (master) $ git push -u origin master --force Counting objects: 70, done. Delta compression using up to 4 threads. Compressing objects: 100% (65/65), done. fatal: unable to read 7884ba2578c7535a2e3b70d410f0286bd2e0016f fatal: The remote end hung up unexpectedly fatal: The remote end hung up unexpectedly fatal: write error: Bad file descriptor error: failed to push some refs to 'https://yzpaul@bitbucket.org/yzpaul/misc-scripts.git' king@DESKTOP-US7LR7D MINGW64 ~/Desktop/_REPOS/misc (master) $ git gc --prune --agressive error: unknown option `agressive' usage: git gc [<options>] -q, --quiet suppress progress reporting --prune[=<date>] prune unreferenced objects --aggressive be more thorough (increased runtime) --auto enable auto-gc mode --force force running gc even if there may be another gc running king@DESKTOP-US7LR7D MINGW64 ~/Desktop/_REPOS/misc (master) $ git gc --prune=8-12-2016 Counting objects: 1418, done. Delta compression using up to 4 threads. Compressing objects: 100% (748/748), done. fatal: unable to read 7884ba2578c7535a2e3b70d410f0286bd2e0016f error: failed to run repack king@DESKTOP-US7LR7D MINGW64 ~/Desktop/_REPOS/misc (master) $ / unseen个计数。如果您监听订阅源的更改并想要更新计数器,则需要执行API调用并从那里检索计数器。