Skip to content
Snippets Groups Projects
Commit be1fc5f4 authored by Matheus CARIUS CASTRO's avatar Matheus CARIUS CASTRO
Browse files

Partially implements Announcement.recipients

Missing the verification of authorisations
parent 5b886b3f
No related branches found
No related tags found
No related merge requests found
...@@ -256,7 +256,7 @@ export class Announcement extends Message { ...@@ -256,7 +256,7 @@ export class Announcement extends Message {
async authors(args, context: Context, info): Promise<Group[]> { async authors(args, context: Context, info): Promise<Group[]> {
//TODO: verifier les authorisations //TODO: verifier les authorisations
throw "Not implemented"; throw "Not implemented";
await this.fetchData(); await this.fetchData();
var ret:Group[]; var ret:Group[];
for(let t of this.m_authors) { for(let t of this.m_authors) {
...@@ -274,10 +274,15 @@ export class Announcement extends Message { ...@@ -274,10 +274,15 @@ export class Announcement extends Message {
* @async * @async
*/ */
async recipients(args, context: Context, info): Promise<Group[]> { async recipients(args, context: Context, info): Promise<Group[]> {
//TODO: verifier les authorisations
throw "Not implemented"; throw "Not implemented";
/*return knex.select({ uid: 'group' }).from('group_message_relationships') await this.fetchData();
.where('message', messageID).where('status', 'recieve');*/ var ret: Group[];
for (let t of this.m_recipients) {
ret.push(new SimpleGroup(t));
}
return ret;
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment