示例#1
0
        async Task BroadcastMessageImpl(Db.Topic topic, string formatted)
        {
            var chatIds = await Db.GetChatsForTopic(topic.TopicId);

            foreach (var c in chatIds)
            {
                await SendMessageImpl(c, formatted);
            }
        }
示例#2
0
 public Task HeartbeatSent(Db.Topic topic, string heart)
 => BroadcastMessageImpl(topic, $"!{topic.Description}!:\nHeart \"{heart}\" has started beating.");
示例#3
0
 public Task PublishMessage(Db.Topic topic, string message)
 => BroadcastMessageImpl(topic, $"|{topic.Description}|:\n{message}");