Skip to content

Commit

Permalink
Expose original message text, add empty SetAuthToken method
Browse files Browse the repository at this point in the history
  • Loading branch information
jakub-grzesiowski committed Feb 14, 2025
1 parent 49fb23f commit 29cc679
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
5 changes: 5 additions & 0 deletions c-sharp-chat/PubnubChatApi/PubnubChatApi/Entities/Chat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,11 @@ internal Chat(PubnubChatConfig config, SynchronizationContext? synchronizationCo
fetchUpdatesThread.Start();
}

public void SetAuthToken(string authToken)
{
throw new NotImplementedException();
}

#region Updates handling

private async void FetchUpdatesLoop()
Expand Down
13 changes: 13 additions & 0 deletions c-sharp-chat/PubnubChatApi/PubnubChatApi/Entities/Message.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,19 @@ public virtual string MessageText
}
}

/// <summary>
/// The original, un-edited text of the message.
/// </summary>
public virtual string OriginalMessageText
{
get
{
var buffer = new StringBuilder(32768);
pn_message_get_data_text(pointer, buffer);
return buffer.ToString();
}
}

/// <summary>
/// The time token of the message.
/// <para>
Expand Down
10 changes: 10 additions & 0 deletions c-sharp-chat/PubnubChatApi/PubnubChatApi/Entities/ThreadMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,16 @@ public override string MessageText
}
}

public override string OriginalMessageText
{
get
{
var buffer = new StringBuilder(32768);
pn_thread_message_get_data_text(pointer, buffer);
return buffer.ToString();
}
}

/// <summary>
/// The time token of the message.
/// <para>
Expand Down

0 comments on commit 29cc679

Please sign in to comment.