about summary refs log tree commit diff
path: root/LibMatrix/Helpers/MessageFormatter.cs
diff options
context:
space:
mode:
Diffstat (limited to 'LibMatrix/Helpers/MessageFormatter.cs')
-rw-r--r--LibMatrix/Helpers/MessageFormatter.cs16
1 files changed, 8 insertions, 8 deletions
diff --git a/LibMatrix/Helpers/MessageFormatter.cs b/LibMatrix/Helpers/MessageFormatter.cs
index ff0a00f..37d7004 100644
--- a/LibMatrix/Helpers/MessageFormatter.cs
+++ b/LibMatrix/Helpers/MessageFormatter.cs
@@ -4,30 +4,30 @@ using LibMatrix.StateEventTypes.Spec;
 namespace LibMatrix.Helpers;
 
 public static class MessageFormatter {
-    public static RoomMessageEventData FormatError(string error) {
-        return new RoomMessageEventData(body: error, messageType: "m.text") {
+    public static RoomMessageEventContent FormatError(string error) {
+        return new RoomMessageEventContent(body: error, messageType: "m.text") {
             FormattedBody = $"<font color=\"#FF0000\">{error}: {error}</font>",
             Format = "org.matrix.custom.html"
         };
     }
 
-    public static RoomMessageEventData FormatException(string error, Exception e) {
-        return new RoomMessageEventData(body: $"{error}: {e.Message}", messageType: "m.text") {
+    public static RoomMessageEventContent FormatException(string error, Exception e) {
+        return new RoomMessageEventContent(body: $"{error}: {e.Message}", messageType: "m.text") {
             FormattedBody = $"<font color=\"#FF0000\">{error}: <pre>{e.Message}</pre>" +
                             $"</font>",
             Format = "org.matrix.custom.html"
         };
     }
 
-    public static RoomMessageEventData FormatSuccess(string text) {
-        return new RoomMessageEventData(body: text, messageType: "m.text") {
+    public static RoomMessageEventContent FormatSuccess(string text) {
+        return new RoomMessageEventContent(body: text, messageType: "m.text") {
             FormattedBody = $"<font color=\"#00FF00\">{text}</font>",
             Format = "org.matrix.custom.html"
         };
     }
 
-    public static RoomMessageEventData FormatSuccessJson(string text, object data) {
-        return new RoomMessageEventData(body: text, messageType: "m.text") {
+    public static RoomMessageEventContent FormatSuccessJson(string text, object data) {
+        return new RoomMessageEventContent(body: text, messageType: "m.text") {
             FormattedBody = $"<font color=\"#00FF00\">{text}: <pre>{data.ToJson(ignoreNull: true)}</pre></font>",
             Format = "org.matrix.custom.html"
         };