This repository has been archived by the owner on Dec 22, 2021. It is now read-only.
forked from nielsandriesse/session-open-group-server
-
Notifications
You must be signed in to change notification settings - Fork 11
Adds a pinned message to the rooms table #21
Open
darcys22
wants to merge
2
commits into
oxen-io:dev
Choose a base branch
from
darcys22:pinned-messages
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TODO
To address migration code in a separate PR after #24 and other changes for the next release |
darcys22
commented
Sep 10, 2021
msgmaxim
reviewed
Sep 10, 2021
jagerman
reviewed
Sep 13, 2021
darcys22
commented
Sep 15, 2021
Waiting for #24, which will handle the DB changes. |
darcys22
force-pushed
the
pinned-messages
branch
from
September 16, 2021 03:49
ad9cb57
to
64af5ea
Compare
darcys22
force-pushed
the
pinned-messages
branch
from
October 15, 2021 05:37
64af5ea
to
d857700
Compare
msgmaxim
reviewed
Oct 18, 2021
The pinned messages table will keep track of a pinned messages for rooms so that clients can highlight certain message for that room. Three associated endpoints have been added to keep track of these pinned messages. Currently the endpoints only keep track of a single message per room however the database structure will allow for multiple in future if needed. GET pinned_message Will return the pinned_message struct which contains the message id for the pinned message. POST pin_message Takes a single i64 corresponding to a message id and updates the pinned_message table to keep record of this message. DELETE pinned_message Deletes the pinned message for the specified room table to null for no pinned message All endpoints are under authorisation and POSTING and DELETING require moderator status.
darcys22
force-pushed
the
pinned-messages
branch
2 times, most recently
from
October 19, 2021 02:51
6f37486
to
b3528c2
Compare
darcys22
force-pushed
the
pinned-messages
branch
from
October 19, 2021 02:55
b3528c2
to
c204e94
Compare
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The rooms table will keep track of a single i64 to track a pinned
message for that room. Three associated endpoints have been added to
keep track of this pinned message.
GET pinned_message
Will return the pinned_message_id which should map to the pinned message
to display
POST pin_message
Takes a single i64 corresponding to a message id and updates the room
table to keep record of this message id as a pinned message
DELETE pinned_message
Resets the pinned message in the rooms table to 0 for no pinned message
All endpoints are under authorisation and POSTING and DELETING require
moderator status.