generateChatId

fun generateChatId(sender: String, receiver: String): String

Generates a stable, deterministic chat ID from two user identifiers.

The two identifiers are sorted alphabetically so both users will always compute the same ID for the same pair.

Return

A hyphen-joined chat ID such as "userA-userB".

Parameters

sender

The identifier of the sender.

receiver

The identifier of the receiver.