Buddy4all: Difference between revisions
From Salumentis
| Line 14: | Line 14: | ||
==== When new friendship request has been made ==== | ==== When new friendship request has been made ==== | ||
Channel: Websocket | Channel: Websocket and Firebase | ||
Socket message: | |||
<pre> | |||
{ | |||
message: "friendship status changed", | |||
message_type: "api_friendship_status", | |||
status: "new_request",. | |||
friend_id: [:id of the inviting user:], | |||
open_requests: [:# of open friendship requests:], | |||
} | |||
</pre> | |||
==== When a friendship as been accepted ==== | |||
Sent when a friendship request has been accepted, a message is sent to the creator of the request | |||
Channel: Websocket only | |||
Message: | Message: | ||
Revision as of 09:08, 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 and Firebase
Socket message:
{
message: "friendship status changed",
message_type: "api_friendship_status",
status: "new_request",.
friend_id: [:id of the inviting user:],
open_requests: [:# of open friendship requests:],
}
When a friendship as been accepted
Sent when a friendship request has been accepted, a message is sent to the creator of the request
Channel: Websocket only
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
}
