@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Populating Channel Id's

Summary: Modified the conduitAPI_chatlog_record method to populate channel Id's

Test Plan: Check if the new chatlog channel table is getting populated with entries

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4979

authored by

Afaque Hussain and committed by
epriestley
6c1043cf 638d1b44

+21 -2
+21 -2
src/applications/chatlog/conduit/ConduitAPI_chatlog_record_Method.php
··· 40 40 41 41 $objs = array(); 42 42 foreach ($logs as $log) { 43 + $channel_name = idx($log, 'channel'); 44 + $service_name = idx($log, 'serviceName'); 45 + $service_type = idx($log, 'serviceType'); 46 + 47 + $channel = id(new PhabricatorChatLogChannel()) 48 + ->loadOneWhere( 49 + 'channelName = %s AND serviceName = %s 50 + AND serviceType = %s', $channel_name, 51 + $service_name, $service_type 52 + ); 53 + 54 + if (!$channel) { 55 + $channel = id(new PhabricatorChatLogChannel()) 56 + ->setChannelName($channel_name) 57 + ->setserviceName($service_name) 58 + ->setServiceType($service_type) 59 + ->save(); 60 + } 61 + 43 62 $obj = clone $template; 44 - $obj->setChannel(idx($log, 'channel')); 45 - $obj->setChannelID(0); 63 + $obj->setChannel($channel_name); 64 + $obj->setChannelID($channel->getID()); 46 65 $obj->setType(idx($log, 'type')); 47 66 $obj->setAuthor(idx($log, 'author')); 48 67 $obj->setEpoch(idx($log, 'epoch'));