git » sdk » commit a696a68

Rename fn to displayName

author Stephen Paul Weber
2024-03-05 20:34:08 UTC
committer Stephen Paul Weber
2024-03-05 20:34:08 UTC
parent 892228f6fff8c8868668d4e668af01647bfbd08b

Rename fn to displayName

snikket/Client.hx +2 -2

diff --git a/snikket/Client.hx b/snikket/Client.hx
index 89c687e..80364e6 100644
--- a/snikket/Client.hx
+++ b/snikket/Client.hx
@@ -604,7 +604,7 @@ class Client extends EventEmitter {
 
 	// We can ask for caps here because presumably they looked this up
 	// via findAvailableChats
-	public function startChat(chatId:String, fn:Null<String>, caps:Caps):Chat {
+	public function startChat(chatId:String, displayName:Null<String>, caps:Caps):Chat {
 		final existingChat = getChat(chatId);
 		if (existingChat != null) {
 			final channel = Std.downcast(existingChat, Channel);
@@ -626,7 +626,7 @@ class Client extends EventEmitter {
 		} else {
 			getDirectChat(chatId, false);
 		}
-		if (fn != null) chat.setDisplayName(fn);
+		if (displayName != null) chat.setDisplayName(displayName);
 		persistence.storeChat(accountId(), chat);
 		this.trigger("chats/update", [chat]);
 		return chat;