Example #1
0
        public IEnumerable <ChannelMessageHeader> GetHeaders()
        {
            BuildRestClient();

            var messages = client.GetMessages(FbMessageFolder.Inbox).ToList();

            foreach (FbMessage fbMessage in messages)
            {
                var header = new ChannelMessageHeader();

                header.MessageIdentifier = fbMessage.MessageId;
                header.MessageNumber     = fbMessage.MessageId;
                header.Context           = fbMessage.Subject;
                header.From                    = fbMessage.From;
                header.To                      = fbMessage.To;
                header.Body                    = fbMessage.Body;
                header.IsRead                  = fbMessage.Read;
                header.DateReceived            = fbMessage.DateCreated;
                header.Metadata.i2mpRelationId = fbMessage.ThreadId;

                yield return(header);
            }
        }