Skip to content

Commit

Permalink
activity: add notified flag to json
Browse files Browse the repository at this point in the history
  • Loading branch information
arthyn committed Jun 5, 2024
1 parent c159988 commit 3dac0b4
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 74 deletions.
147 changes: 75 additions & 72 deletions desk/lib/activity-json.hoon
Original file line number Diff line number Diff line change
Expand Up @@ -146,78 +146,81 @@
::
++ event
|= e=event:a
%+ frond -<.e
?- -<.e
%dm-invite (whom whom.e)
::
%chan-init
%- pairs
:~ channel/s+(nest:enjs:gj channel.e)
group/s+(flag:enjs:gj group.e)
==
::
?(%group-kick %group-join %group-ask %group-invite)
%- pairs
:~ group+s+(flag:enjs:gj group.e)
ship+(ship ship.e)
==
::
%flag-post
%- pairs
:~ key+(msg-key key.e)
channel/s+(nest:enjs:gj channel.e)
group/s+(flag:enjs:gj group.e)
==
::
%flag-reply
%- pairs
:~ parent+(msg-key parent.e)
key+(msg-key key.e)
channel/s+(nest:enjs:gj channel.e)
group/s+(flag:enjs:gj group.e)
==
::
%dm-post
%- pairs
:~ key+(msg-key key.e)
whom+(whom whom.e)
content+(story:enjs:cj content.e)
mention/b+mention.e
==
::
%dm-reply
%- pairs
:~ parent+(msg-key parent.e)
key+(msg-key key.e)
whom+(whom whom.e)
content+(story:enjs:cj content.e)
mention/b+mention.e
==
::
%post
%- pairs
:~ key+(msg-key key.e)
channel/s+(nest:enjs:gj channel.e)
group/s+(flag:enjs:gj group.e)
content+(story:enjs:cj content.e)
mention/b+mention.e
==
::
%reply
%- pairs
:~ parent+(msg-key parent.e)
key+(msg-key key.e)
channel/s+(nest:enjs:gj channel.e)
group/s+(flag:enjs:gj group.e)
content+(story:enjs:cj content.e)
mention/b+mention.e
==
::
%group-role
%- pairs
:~ group/s+(flag:enjs:gj group.e)
ship+(ship ship.e)
roles+a+(turn ~(tap in roles.e) |=(role=sect:g s+role))
%- pairs
:~ notified+b+notified.e
:- -<.e
?- -<.e
%dm-invite (whom whom.e)
::
%chan-init
%- pairs
:~ channel/s+(nest:enjs:gj channel.e)
group/s+(flag:enjs:gj group.e)
==
::
?(%group-kick %group-join %group-ask %group-invite)
%- pairs
:~ group+s+(flag:enjs:gj group.e)
ship+(ship ship.e)
==
::
%flag-post
%- pairs
:~ key+(msg-key key.e)
channel/s+(nest:enjs:gj channel.e)
group/s+(flag:enjs:gj group.e)
==
::
%flag-reply
%- pairs
:~ parent+(msg-key parent.e)
key+(msg-key key.e)
channel/s+(nest:enjs:gj channel.e)
group/s+(flag:enjs:gj group.e)
==
::
%dm-post
%- pairs
:~ key+(msg-key key.e)
whom+(whom whom.e)
content+(story:enjs:cj content.e)
mention/b+mention.e
==
::
%dm-reply
%- pairs
:~ parent+(msg-key parent.e)
key+(msg-key key.e)
whom+(whom whom.e)
content+(story:enjs:cj content.e)
mention/b+mention.e
==
::
%post
%- pairs
:~ key+(msg-key key.e)
channel/s+(nest:enjs:gj channel.e)
group/s+(flag:enjs:gj group.e)
content+(story:enjs:cj content.e)
mention/b+mention.e
==
::
%reply
%- pairs
:~ parent+(msg-key parent.e)
key+(msg-key key.e)
channel/s+(nest:enjs:gj channel.e)
group/s+(flag:enjs:gj group.e)
content+(story:enjs:cj content.e)
mention/b+mention.e
==
::
%group-role
%- pairs
:~ group/s+(flag:enjs:gj group.e)
ship+(ship ship.e)
roles+a+(turn ~(tap in roles.e) |=(role=sect:g s+role))
==
==
==
::
Expand Down
7 changes: 5 additions & 2 deletions packages/shared/src/urbit/activity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,18 @@ export interface ReplyEvent {
};
}

export type ActivityEvent =
export type ActivityEvent = {
notified: boolean;
} & (
| DmInviteEvent
| GroupKickEvent
| GroupJoinEvent
| FlagEvent
| DmPostEvent
| DmReplyEvent
| PostEvent
| ReplyEvent;
| ReplyEvent
);

export interface PostRead {
seen: boolean;
Expand Down

0 comments on commit 3dac0b4

Please sign in to comment.