Hi,
I have a subcommunity that I want all users to receive email notifications for. I just want to bulk-subscribe all my users to it.
I thought that I could insert a row in the jiveWatch table for each user for that subcommunity, but that doesn't seem to have worked. What am I missing?
Thanks,
Beau
Can you show the ID of the community and the query you were using to insert rows into the jiveWatch table?
Hey Vinh,
Sorry for the delay here.
I ran this SQL statement:
insert into jiveWatch (userID, objectType, objectID, watchType, expirable) values (3230, 14, 2168, 1, 1)
The subcommunity ID is 2168, the userID is 3230. This statement does not appear to subscribe the user to email notifications. (When I log in as that user and go to the subcommunity, the message still says "Receive email notifications" instead of "stop email notifications."
CS Community 2.5.3.
Beau
Beau,
I just did something similar but used the WatchManager class. Using that I was able to programmatically build RSS feeds based on what they were "watching" in the community and send those to a richclient/rssreader. Looking at the class, there is a createWatch(User,JiveObject) method which probably does what you want.
Good idea. Looks like I can get to this via the watchService webservice too, which will work better for my use case. I will give that a shot.
Thanks.
I agree with Brad's recommendation of web services, as that will make the necessary calls to the API to add a watch for that user to the database. Let me know if you have problems with this.
Vinh
Jive combines collaboration software, community software & social networking software into the leading SBS solution.
© Copyright 2000–2009 Jive Software. All rights reserved.
915 SW Stark St., Suite 400, Portland, OR 97205