Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get-GSGroupMemberListPrivate fails with 0 members in group #77

Closed
arnoutvandervorst opened this issue Aug 6, 2018 · 8 comments
Closed
Assignees
Labels

Comments

@arnoutvandervorst
Copy link

On line 46 of Get-GSGroupMemberListPrivate.ps1, I would recommend to do this:

if ($null -ne $result.MembersValue) { $result.MembersValue | Add-Member -MemberType NoteProperty -Name 'Group' -Value $Id -PassThru | Add-Member -MemberType ScriptMethod -Name ToString -Value {$this.Email} -PassThru -Force }

Otherwise the Add-Member will fail with you do this on a group with 0 members.

@scrthq
Copy link
Member

scrthq commented Aug 7, 2018

thanks, @arnoutvandervorst ! nice catch!

@scrthq scrthq self-assigned this Aug 7, 2018
@scrthq scrthq added the bug label Aug 7, 2018
@arnoutvandervorst
Copy link
Author

Np, thanks for the great library, use it a lot!

@scrthq
Copy link
Member

scrthq commented Aug 8, 2018

That's awesome, I'm glad to hear it!!

Working on this ASAP, just need to clean up my current workspace to get prepped for the next release soon 😃 I'll make sure to include this, should be within the next couple days!

@ghost ghost added the work in progress label Aug 15, 2018
@scrthq scrthq closed this as completed in 886e3ba Aug 15, 2018
scrthq added a commit that referenced this issue Aug 15, 2018
…ot.GChat.Backend

#### 2.13.0

* Fixed: Private list functions to check if a value is actually returned before adding members to the returned objects ([Issue #77](#77))
* Added: `Update-GSChatMessage` to allow updating existing messages in Chat (i.e. on Card Clicked events)
* Updated: Order of parameters in `Get-GSToken` to place `Scopes` first, as it's the only required parameter
* Updated: `Get-GSChatSpace` now updates the config with Space names/shortnames for ease of use
* Updated: `Send-GSChatMessage` to also support calling the REST API as an additional option. This is necessary for PoshBot due to the deserialization of objects passed back to result parser breaking the Google SDK type references
* Updated: `Get-GSChatConfig` to always fetch the latest config if no ConfigName is passed instead of using `Show-PSGSuiteConfig`
* Updated: `Set-PSGSuiteConfig` to refresh the Spaces dictionary each time in order to remove stale spaces (i.e. on removal of bot from a Room or DM)
* Fixed: `Add-GSChatOnClick` now properly builds the hashtable for the Webhook object
* Updated: `Get-GSUser` to allow passing User ID's instead of emails by checking if value passed is a `decimal` before concatenating the domain name.
@ghost ghost removed the work in progress label Aug 15, 2018
@scrthq
Copy link
Member

scrthq commented Aug 15, 2018

@arnoutvandervorst deployed as of now in v2.13.0! Thanks again!

@queks
Copy link

queks commented Aug 28, 2018 via email

@scrthq
Copy link
Member

scrthq commented Aug 28, 2018

@queks I don't think it's the same issue since this was specific to trying to run Add-Member against non-existent objects, but not sure 100% since your screenshot didn't come through 😢. Can you resend your screenshot when possible? Also, what version of PSGSuite and PowerShell are you using?

@queks
Copy link

queks commented Aug 28, 2018

Here's the screenshot again:
psgsuite_error

Ran this on PSGSuite v2.13.1, PSVersion 5.1.16299.251

@scrthq
Copy link
Member

scrthq commented Aug 28, 2018

@queks thanks! since this appears to be specific to Get-GSGroup, not Get-GSGroupMember, I'm going to transition this to a new ticket and leave this one closed out. Issue #82 opened up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants