Skip to content

Commit ecc46eb

Browse files
committed
Update RSMatrix package to version 1.3.0 and modify StollService to use SendNoticeResponse methods for improved message handling
1 parent bd05783 commit ecc46eb

3 files changed

Lines changed: 8 additions & 6 deletions

File tree

src/RSBotWorks/RSBotWorks.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<PackageReference Include="Microsoft.Data.Sqlite" Version="10.0.3" />
2222
<PackageReference Include="Microsoft.Extensions.Http" Version="10.0.3" />
2323
<PackageReference Include="Seq.Extensions.Logging" Version="9.0.0" />
24-
<PackageReference Include="RSMatrix" Version="1.2.0" />
24+
<PackageReference Include="RSMatrix" Version="1.3.0" />
2525
<PackageReference Include="System.ServiceModel.Syndication" Version="10.0.3" />
2626
</ItemGroup>
2727

src/Stoll/StollService.Reactions.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ private async Task HandleReactionsAsync(RSMatrix.Models.ReceivedTextMessage mess
8282
if (!EmojiProbabilityRamp.Check())
8383
return;
8484

85+
return; // TEMP: disable reactions until we have a chance to do it in a safer way.
86+
8587
var systemPrompt = REACTION_INSTRUCTION;
8688
var composer = ReactionTemplate.Fork()
8789
.SetSystemPrompt(systemPrompt);

src/Stoll/StollService.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -259,21 +259,21 @@ private async Task MessageReceivedAsync(ReceivedTextMessage message)
259259
var fefePost = await GetFefePost();
260260
var html = Markdown.ToHtml(fefePost);
261261
StoreMessageHistory(cachedChannel.Id, cachedUser.SanitizedName, sanitizedMessage, message.Timestamp, fefePost);
262-
await message.SendHtmlResponseAsync(fefePost, html, isReply: false).ConfigureAwait(false);
262+
await message.SendHtmlNoticeResponseAsync(fefePost, html, isReply: false).ConfigureAwait(false);
263263
return;
264264
}
265265

266266
if(sanitizedMessage.StartsWith("!prompt", StringComparison.OrdinalIgnoreCase))
267267
{
268268
var prompt = GetDailyInstruction();
269-
await message.SendResponseAsync(prompt, isReply: false).ConfigureAwait(false);
269+
await message.SendNoticeResponseAsync(prompt, isReply: false).ConfigureAwait(false);
270270
return;
271271
}
272272

273273
if(sanitizedMessage.StartsWith("!topic", StringComparison.OrdinalIgnoreCase))
274274
{
275275
var topic = GetDailyTopic();
276-
await message.SendResponseAsync($"Mein Lieblingsthema heute: {topic}", isReply: false).ConfigureAwait(false);
276+
await message.SendNoticeResponseAsync($"Mein Lieblingsthema heute: {topic}", isReply: false).ConfigureAwait(false);
277277
return;
278278
}
279279

@@ -347,10 +347,10 @@ public async Task RespondToMessage(ReceivedTextMessage message, JoinedTextChanne
347347
if (LooksLikeMarkdown(response))
348348
{
349349
var html = Markdown.ToHtml(response);
350-
await message.SendHtmlResponseAsync(response, html, isReply: mentions == null, mentions: mentions).ConfigureAwait(false);
350+
await message.SendHtmlNoticeResponseAsync(response, html, isReply: mentions == null, mentions: mentions).ConfigureAwait(false);
351351
}
352352
else
353-
await message.SendResponseAsync(response, isReply: mentions == null, mentions: mentions).ConfigureAwait(false);
353+
await message.SendNoticeResponseAsync(response, isReply: mentions == null, mentions: mentions).ConfigureAwait(false);
354354
}
355355
catch (AnthropicApiException ex)
356356
{

0 commit comments

Comments
 (0)