How to get information about whether a user is watching a specified content?

38 views
Skip to first unread message

Anurag Balodi

unread,
Jan 23, 2018, 12:23:06 AM1/23/18
to Scroll Viewport Developers

Hi,

I am working on adding watch feature in Scroll Viewport theme. I am using workarround mentioned in https://k15t.jira.com/browse/VPRT-698

It is working fine but is there any way to know whether a current logged in user is watch a specific content or  not?

Actually as per the above mentioned work around, watch and unwatch button is visible all the time. However, it should be visible only according to the condition i.e. page is added in watch list or not. That's why I need to know the user is watching a specified content or not?

I have also tried to use the confluence Rest API but not succeeded:


Any kind of help or guidance is really help full for me?

Thanks
Anurag

Jens Rutschmann (K15t Software)

unread,
Jan 23, 2018, 5:46:58 AM1/23/18
to scroll-vi...@googlegroups.com
Hi Anurag,

I've extended the workaround description with a way to retrieve the watch state: https://k15t.jira.com/browse/VPRT-698

On Confluence 5.9 and later you can simply do a REST call to this URL:
<ConfluenceBaseUrl>/rest/watch-button/1.0/watchState/<PageId>

We'll create a template recipe covering the watch feature later, but this should get you started.


Cheers,
Jens

Anurag Balodi

unread,
Jan 25, 2018, 12:57:11 AM1/25/18
to Scroll Viewport Developers
Thanks Jens.
This is exactly what I have required.

Amit Kapoor

unread,
Jun 25, 2020, 7:24:14 AM6/25/20
to Scroll Viewport Developers
@Anurag,

Can you share how you got this done?
Reply all
Reply to author
Forward
0 new messages