parent
f8de3f9ba7
commit
95dcea9ca7
|
|
@ -320,6 +320,7 @@ message SessionJoin {
|
|||
optional string photo_url = 2;
|
||||
optional string msg = 3;
|
||||
optional int32 track_changes_counter = 4;
|
||||
optional string source_user_id = 5;
|
||||
}
|
||||
|
||||
message SessionDepart {
|
||||
|
|
|
|||
|
|
@ -395,10 +395,11 @@ module JamRuby
|
|||
)
|
||||
end
|
||||
|
||||
def session_join(session_id, photo_url, msg, track_changes_counter)
|
||||
def session_join(session_id, photo_url, source_user_id, msg, track_changes_counter)
|
||||
join = Jampb::SessionJoin.new(
|
||||
:session_id => session_id,
|
||||
:photo_url => photo_url,
|
||||
:source_user_id => source_user_id,
|
||||
:msg => msg,
|
||||
:track_changes_counter => track_changes_counter
|
||||
)
|
||||
|
|
|
|||
|
|
@ -492,6 +492,7 @@ module JamRuby
|
|||
msg = @@message_factory.session_join(
|
||||
music_session.id,
|
||||
user.photo_url,
|
||||
user.id,
|
||||
notification_msg,
|
||||
music_session.track_changes_counter
|
||||
)
|
||||
|
|
|
|||
|
|
@ -218,9 +218,11 @@
|
|||
hoveraction: val.session_id ? "session" : "",
|
||||
avatar_url: context.JK.resolveAvatarUrl(val.photo_url),
|
||||
text: val.formatted_msg,
|
||||
date: $.timeago(val.created_at)
|
||||
date: $.timeago(val.created_at),
|
||||
userId: val.source_user_id
|
||||
});
|
||||
|
||||
|
||||
console.log(val);
|
||||
$list.append(notificationHtml);
|
||||
|
||||
// val.description contains the notification record's description value from the DB (i.e., type)
|
||||
|
|
|
|||
|
|
@ -208,8 +208,8 @@
|
|||
<!-- Notification panel template -->
|
||||
<script type="text/template" id="template-notification-panel">
|
||||
<li session-id="{sessionId}" notification-id="{notificationId}">
|
||||
<div class="avatar-small"><img src="{avatar_url}" /></div>
|
||||
<div session-id="{sessionId}" hoveraction="session" class="note-text">
|
||||
<div class="avatar-small" user-id="{userId}" hoveraction="musician"><img src="{avatar_url}" /></div>
|
||||
<div session-id="{sessionId}" hoveraction="hoveraction" class="note-text">
|
||||
{text}<br/>
|
||||
<em>{date}</em>
|
||||
<div class="note-delete">
|
||||
|
|
|
|||
Loading…
Reference in New Issue