how to determine if gadget viewer is gadget installer ?

0 views
Skip to first unread message

qMax

unread,
Nov 9, 2009, 12:05:18 AM11/9/09
to Google Wave API
Hi.
I want to provide different controls in depend on who is controlling
gadget.
Is there a way to determine if current viewer as returned by
wave.getViewer() is one who installed gadget ?

There's no INSTALL mode
What mode gadget have when it is first time inserted?

Oh!
I guess i can check gadget state and if it is empty that means it is
newly installed gadget, and then catch viewer and store viwerId in
gadget itself as a moderator/installator.

Thanks for the answer :)

Sol Wu

unread,
Nov 9, 2009, 5:20:49 PM11/9/09
to Google Wave API
hi qMax,
you can use wave.getHost() to get the person who added the gadget.
Then check if wave.getViewer() is same as wave.getHost().
Hope it helps,
Sung,
Reply all
Reply to author
Forward
0 new messages