refactor: remove workbench code from im server
This commit is contained in:
@@ -74,30 +74,6 @@ func createIMSystemNotification(tenantID types.TenantID, uid types.Uid, eventID,
|
||||
})
|
||||
}
|
||||
|
||||
func publishIMMeetingEvent(tenantID types.TenantID, actor types.Uid, meeting *types.Meeting, eventType string) error {
|
||||
if meeting == nil {
|
||||
return types.ErrMalformed
|
||||
}
|
||||
for _, participant := range meeting.Participants {
|
||||
uid := participant.UserID
|
||||
if uid.IsZero() {
|
||||
continue
|
||||
}
|
||||
eventID := stableIMEventID("meeting", meeting.MeetingID, meeting.Version, eventType, uid.UserId())
|
||||
if uid != actor {
|
||||
if err := createIMSystemNotification(tenantID, uid, stableIMEventID(eventID, "notification"), eventType,
|
||||
"会议通知", meeting.Title, types.KVMap{"meeting_id": meeting.MeetingID}); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
if err := enqueueIMBusinessEvent(tenantID, eventID, "user", uid.UserId(), actor, eventType,
|
||||
map[string]any{"meeting_id": meeting.MeetingID, "version": meeting.Version, "state": meeting.State}); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func publishIMRelationEvent(tenantID types.TenantID, actor, target types.Uid, stableID, eventType, title, summary string) error {
|
||||
if target.IsZero() {
|
||||
return types.ErrMalformed
|
||||
|
||||
Reference in New Issue
Block a user