mirror of
https://gitlab.com/comunic/comunicapiv2
synced 2024-11-22 05:19:22 +00:00
Add "canEveryoneAddMembers" add conversation creation time
This commit is contained in:
parent
40e9733955
commit
9f54670cf1
@ -41,6 +41,7 @@ export class ConversationsController {
|
||||
name: name == "false" ? "" : removeHTMLNodes(name),
|
||||
following: h.postBool("follow"),
|
||||
members: members,
|
||||
canEveryoneAddMembers: h.postBool("canEveryoneAddMembers", true),
|
||||
}
|
||||
|
||||
const convID = await ConversationsHelper.Create(conv);
|
||||
@ -156,7 +157,8 @@ export class ConversationsController {
|
||||
ownerID: h.getUserId(),
|
||||
name: "",
|
||||
following: true,
|
||||
members: new Set([h.getUserId(), otherUser])
|
||||
members: new Set([h.getUserId(), otherUser]),
|
||||
canEveryoneAddMembers: true
|
||||
});
|
||||
|
||||
list.push(convID);
|
||||
|
@ -8,7 +8,8 @@ export interface BaseConversation {
|
||||
ownerID: number,
|
||||
name: string,
|
||||
following: boolean,
|
||||
members: Set<number>
|
||||
members: Set<number>,
|
||||
canEveryoneAddMembers: boolean,
|
||||
}
|
||||
|
||||
export interface Conversation extends BaseConversation {
|
||||
|
@ -30,7 +30,8 @@ export class ConversationsHelper {
|
||||
"user_id": conv.ownerID,
|
||||
"name": conv.name,
|
||||
"last_active": time(),
|
||||
"creation_time": time()
|
||||
"creation_time": time(),
|
||||
"can_everyone_add_members": conv.canEveryoneAddMembers ? 1 : 0
|
||||
});
|
||||
|
||||
// Add the members to the conversation
|
||||
|
Loading…
Reference in New Issue
Block a user