Buddy4all: Difference between revisions

From Salumentis
Line 12: Line 12:
=== Friendship endpoints ===
=== Friendship endpoints ===


==== When new friendship request has been made ===
==== When new friendship request has been made ====


Channel: Websocket
Channel: Websocket
Message:  
Message:  
<pre>
<pre>
[
{
   'message' =>  "Mesage text,
   'message': "Message text,
            'message_type' => 'friendship_request',
  'message_type': 'friendship_request',
            'friend_id' => $this->friend->id,
  'friend_id': [:id of the inviting user:],
            'open_requests' => $n,
  'open_requests': [:# of open friendship requests:],
            'tooltip' => $tooltip,
  'tooltip': "a message related to the open requests",
            'with_sound' => !$this->broadcastOnly
  'with_sound' => true|false
        ];
}
</pre>
</pre>

Revision as of 09:00, 29 September 2023

Introduction

User's Guide

Developers Guide

Notification messages

Notifications are sent by the backend via Websocket and/or Firebase push notifications. The following notification are sent:

Friendship endpoints

When new friendship request has been made

Channel: Websocket Message:

{
  'message': "Message text,
  'message_type': 'friendship_request',
  'friend_id': [:id of the inviting user:],
  'open_requests': [:# of open friendship requests:],
  'tooltip': "a message related to the open requests",
  'with_sound' => true|false
}