Example #1
0
        public async Task PushOnCreatedSignIn(string circleKey, Guid eventId, int?myId)
        {
            var creatorName   = string.Empty;
            var memberService = new MemberService();

            if (myId != null)
            {
                creatorName = memberService.UserIdToAccount(myId.Value).Name;
            }
            var learningcircleService = new LearningCircleService();
            var members      = learningcircleService.GetCircleMemberList(circleKey, myId);
            var eventMessage = string.Format("{0}新增了點名活動", creatorName);
            var pushService  = new PushService();
            // 推播文字:點名活動即將開始({日期} {時間})
            // var message = string.Format("{0}(建立時間:{1:yyyy/M/d HH:mm})", eventMessage, DateTime.Now);
            var message = string.Format("{0}", eventMessage);

            if (members.Count > 0)
            {
                await pushService.PushMsgAsync("ToEventCard", circleKey, eventId, "推播_查看點名-開始", members.ToArray(), message);
            }
        }