mirror of
https://github.com/m1k1o/neko.git
synced 2025-08-06 10:20:26 +02:00
legacy: only update name if its different.
This commit is contained in:
parent
82aa68097b
commit
e018bcc886
1 changed files with 8 additions and 5 deletions
|
@ -49,6 +49,8 @@ func (s *session) wsToBackend(msg []byte) error {
|
|||
if request.DisplayName != "" {
|
||||
s.name = request.DisplayName
|
||||
|
||||
// Update display name if it's different
|
||||
if s.name == "" || s.name != request.DisplayName {
|
||||
err = s.apiReq(http.MethodPost, "/api/profile", map[string]any{
|
||||
"name": request.DisplayName,
|
||||
}, nil)
|
||||
|
@ -56,6 +58,7 @@ func (s *session) wsToBackend(msg []byte) error {
|
|||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return s.toBackend(event.SIGNAL_ANSWER, &message.SignalDescription{
|
||||
SDP: request.SDP,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue