mirror of
https://gitlab.com/comunic/comunicapiv2
synced 2025-06-20 00:25:17 +00:00
Can mark conversation messages as seen
This commit is contained in:
@ -258,6 +258,25 @@ export class ConversationsHelper {
|
||||
})).map(m => this.DBToConversationMessage(convID, m));
|
||||
}
|
||||
|
||||
/**
|
||||
* Mark the user has seen the last messages of the conversation
|
||||
*
|
||||
* @param convID Target conversation ID
|
||||
* @param userID Target user ID
|
||||
*/
|
||||
public static async MarkUserSeen(convID: number, userID: number) {
|
||||
await DatabaseHelper.UpdateRows({
|
||||
table: USERS_TABLE,
|
||||
where: {
|
||||
conv_id: convID,
|
||||
user_id: userID
|
||||
},
|
||||
set: {
|
||||
saw_last_message: 1
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the list of members of a conversation
|
||||
*
|
||||
|
Reference in New Issue
Block a user