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

"Requested value 'systemEventMessage' was not found." for Chat Messages #536

Closed
1 task done
Ofer-Gal opened this issue Sep 3, 2021 · 4 comments
Closed
1 task done
Assignees
Labels
area: model 📐 Related to the core SDK models bug Something isn't working

Comments

@Ofer-Gal
Copy link

Ofer-Gal commented Sep 3, 2021

Category

  • Bug

Describe the bug

Folowing the code from https://pnp.github.io/pnpcore/using-the-sdk/teams-channel-chat.html for
Getting Chat Messages
I get error "Requested value 'systemEventMessage' was not found" for the line
channel = await channel.GetAsync(o => o.Messages);

Steps to reproduce

using (var context = await pnpContextFactory.CreateAsync(pUri))
                {
                    try
                    {
                        // Get the Team
                        var team = await context.Team.GetAsync(o => o.Channels);
                        // Get the Channels
                        //var channels = team.Channels.AsRequested();
                        foreach (var chan in team.Channels.AsRequested())
                        {

                            string name = chan.DisplayName;
                            // Get the channel               
                            var channel = team.Channels.AsRequested().FirstOrDefault(i => i.DisplayName == chan.DisplayName);

                            channel = await channel.GetAsync(o => o.Messages);
                            var chatMessages = channel.Messages;
                     
                        }
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.Message);
                    }
              }

Thank you very much

@jansenbe jansenbe self-assigned this Sep 3, 2021
@jansenbe jansenbe added area: model 📐 Related to the core SDK models question Further information is requested labels Sep 3, 2021
@jansenbe
Copy link
Contributor

jansenbe commented Sep 4, 2021

@Ofer-Gal : I can reproduce your issue, looking into a fix now.

@jansenbe jansenbe added bug Something isn't working and removed question Further information is requested labels Sep 4, 2021
@jansenbe
Copy link
Contributor

jansenbe commented Sep 4, 2021

@Ofer-Gal : issue has been fixed, next nightly (version 1.3.40) will contain the fix. Thanks for reporting this.

@jansenbe
Copy link
Contributor

jansenbe commented Sep 7, 2021

@Ofer-Gal : you can verify if the latest nightly fixes things for you?

@jansenbe
Copy link
Contributor

jansenbe commented Sep 9, 2021

Closing, don't hesitate to re-open or open a new issue if things still do not work as expected

@jansenbe jansenbe closed this as completed Sep 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: model 📐 Related to the core SDK models bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants